[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: microsoft latest, bug with extension elements?
Sebastian, 1. Your first example is a bug that we should have caught (it basically makes extension elements useless, since no attributes can be used on them). 2. Your second example is actually by design. When we parse an XML document, we strip all non-significant (no xml:space in scope) space by default and replace it with bit flags that mark where space existed at one time (this cuts down the memory footprint significantly). When the document is passed to the XSL processor, the processor cannot determine what whitespace was originally present within the xsl:text element, so it outputs a single space by default. There are several ways to get the output you desire, ordered from least expensive (in terms of parse time and memory usage): - Use an entity to specify a significant whitespace character -- <xsl:text>
</xsl:text> - Use xml:space on the xsl:text element -- <xsl:text xml:space="preserve">(CR here)</xsl:text> - Instruct the parser to preserve all space -- dom.preserveWhiteSpace = true before calling dom.load ~Andy Kimball MSXSL Dev -----Original Message----- From: Sebastian Rahtz [mailto:sebastian.rahtz@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] Sent: Monday, July 31, 2000 6:33 AM To: xsl-list@xxxxxxxxxxxxxxxx Subject: microsoft latest, bug with extension elements? In a test file, I say <xsl:variable name="processor"> <xsl:value-of select="system-property('xsl:vendor')"/> </xsl:variable> <xsl:choose> <xsl:when test="contains($processor,'Clark')"> <xt:document href="{$filename}"> <xsl:call-template name="writestone"/> </xt:document> </xsl:when> ... <xsl:otherwise> <xsl:message>No support for multiple output files </xsl:message> <xsl:call-template name="writestone"/> </xsl:otherwise> </xsl:choose> but when I run the MSXML processor, it says "Attribute href is invalid on xt:document" (or the like). Can anyone see how the processor gets into the XT <when> statement? or is it when parsing the XSL stylesheet? also, I find that when output method is text, the following <xsl:template name="Show"> <xsl:value-of select="name()"/> <xsl:text> </xsl:text> <xsl:value-of select="generate-id()"/> <xsl:text> </xsl:text> </xsl:template> does not generate a new line, just a space. surely wrong? is there some easy way to report bugs to Microsoft? Sebastian XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|