| Summary: | Error validating Dojo library .xsl file | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Michael Moser <mmo> | ||||
| Component: | wst.xsl | Assignee: | David Carver <d_a_carver> | ||||
| Status: | ASSIGNED --- | QA Contact: | David Carver <d_a_carver> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | bruce.edge, Russell.Gonsalves, thatnitind | ||||
| Version: | 3.2.2 | ||||||
| Target Milestone: | Future | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Michael Moser
Created attachment 181111 [details]
screenshot showing .xsl file validation problem
(In reply to comment #0) > Since the last Helios update (Helios Service Release 1, Build id: > 20100917-0705) I am getting an error indication when using the Dojo library! > I am using Dojo 1.4.1 (available e.g. via > http://ajax.googleapis.com/ajax/libs/dojo/1.4.1/dojo/dojo.xd.js or > http://ajax.googleapis.com/ajax/libs/dojo/1.4.1/dojo/dojo.xd.js.uncompressed.js.uncompressed.js, > resp.). > > The offending file is: <dojo_root>/dojox/gfx/resources/svg2gfx.xsl (downlod > e.g. from > http://ajax.googleapis.com/ajax/libs/dojo/1.4.1/dojox/gfx/resources/svg2gfx.xsl). > > Lines 728, 780 and 1043 contain an XPath-expression "&SupportedElements;" which > is flagged as invalid. That error was *not* flagged with the Helios release > version (i.e. prior to the service release update) and IMHO is also *not* > correct, i.e. there is no error. Correct this is not an error but is something that should be avoided. The WTP DOM does not support expanding the entity-reference, so when the XPath expression string is validated it is actually validating the &SupportedElements; as a string, which it is not a valid XPath expression. There are two options. Replace the Entity with the actual element list or XPath expression that is stored in the XSL file. !DOCTYPE xsl:stylesheet [ <!ENTITY SupportedElements "svg:a|svg:circle|svg:ellipse|svg:g|svg:image|svg:line|svg:path|svg:polygon|svg:polyline|svg:rect|svg:text|svg:textPath|svg:use"> ]> So replace that line in the expression itself. The other option which I think I can handle, is to look up the XML content model, and see if I can find Entity's that match within the XPath expression, do a replace before passing the value onto the Expression to be validated. If you aren't interested in Validiting that file, you can also turn off XSL Validation or add it to the Exclusion list in the Validation preferences as well. Hi and thanks for looking into this. > Correct this is not an error but is something that should be avoided. OK, but if it's not an error it should at most be flagged as a warning. An error breaks builds! > The other option which I think I can handle, ... do a replace before passing the value ... IMHO that sounds like a good improvement to the validator! You have my vote for that! Esp. in the light, that Dojo is definitely a widely used library that's not so easy to get modified globally. > If you aren't interested in Validiting that file, you can also turn off XSL Validation I only found a flag to globally turn validation off (which I wouldn't want to do). There is no option to just ignore a specific file, is there? Michael (In reply to comment #3) > Hi and thanks for looking into this. > > > Correct this is not an error but is something that should be avoided. > OK, but if it's not an error it should at most be flagged as a warning. An > error breaks builds! You can change this in the Preferences->XML->XSL->Validation preference setting so that XPath errors are flagged as Warnings instead of Errors. Retargetting for 3.3M6. (In reply to comment #5) > Retargetting for 3.3M6. Any update on this? The problem is still present in: SpringSource Tool Suite Version: 2.7.0.M1 Build Id: 201105101000 Which is based on eclipse 3.6.2 Sorry I have not had a chance to look at this further. The work around is to lower the severity of the XPath errors in the XSL preference pages, you can do this on a per project basis. Just ran into this on Kepler (4.3). Please consider devoting resources to this. |