This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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>&#xA;</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@computing-services.oxford.ac.uk]
Sent: Monday, July 31, 2000 6:33 AM
To: xsl-list@mulberrytech.com
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]