Community
Participate
Working Groups
Build Identifier: 20100617-1415 If you create a stylesheet, set the version to 2.0, and then make some sort of variable, param, etc of name='text', you will get a validation error any time you reference that variable in an XPath. If you set to version 1.0, there is no error reported. It doesn't really pose any problem other than marking the file as being in an error state. A simple fix is to just rename the variable and all is well. I don't know if this is a change between versions of XSLT's specification, but Saxon is able to handle this case without warnings. Reproducible: Always Steps to Reproduce: 1. Create a style sheet such as this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:variable name="text" select='"hello"' /> <xsl:value-of select='$text' /> </xsl:template> </xsl:stylesheet> 2. Try to validate it 3. Observe the error on the $text
This is actually an issue with the XPath 2.0 Processor. text() is a reserved function name so the processor is getting confused. Jesper we probably need to add text to the ever growing list of words to handle specially.
That's a good find, but luckily we already fixed that in bug 311480 (since it was general for all QNames). So, it's available in 3.2.1 (which is only present in a separate WTP download location). If you got WTP with a Helios download, the fix will be present in the Helios SR1 release (which for WTP is called 3.2.2). Thank you for reporting! *** This bug has been marked as a duplicate of bug 311480 ***