|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Inconsistency between XPath 1.0 and XSLT 1.0 treatment
I've encountered an apparent discrepancy between how the
xsl:processing-instruction element behaves and the XPath 1.0 data model.
The XPath 1.0 data model specifically excludes leading white space from the string-value of a processing instruction node: The string-value <http://www.w3.org/TR/xpath#dt-string-value> of a processing instruction node is the part of the processing instruction following the target and any whitespace. However, "The content of the |xsl:processing-instruction| element is a template for the string-value of the processing instruction node." It is an error if this template contains non-text nodes. However, it is not an error if this template contains leading white space. For example, this case from the OASIS Microsoft XSLT comformance test suite is legal: <xsl:template match="/"> BEFORE <xsl:processing-instruction name="testcase"> This is the content of a PI </xsl:processing-instruction> AFTER </xsl:template> </xsl:stylesheet> In other words, the xsl:processing-instruction element appears able to create processing instructions that are not legal in the XPath 1.0 data model. Advice and comments would be appreciated. If I'm not missing something here, an erratum or clarification might be called for. -- Elliotte Rusty Harold
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








