Subject: RE: running msxml3 from command line From: Andrew Kimball <akimball@xxxxxxxxxxxxx> Date: Mon, 31 Jul 2000 13:44:49 -0700 |
Excerpted from a previous response: 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 FYI, if you're wondering if this is conformant, see my response to Mike Brown's message earlier today. ~Andy Kimball MSXSL Dev -----Original Message----- From: Chris Bayes [mailto:Chris@xxxxxxxxxxx] Sent: Monday, July 31, 2000 1:43 PM To: xsl-list@xxxxxxxxxxxxxxxx Subject: RE: running msxml3 from command line After a little investigation on the dirtoftp.xslt stylesheet the problem is with the xml:space="preserve" on the template <xsl:template match="/" xml:space="preserve"> I added this as the only way to get all 3 (xt,saxon,msxml) to output crlf between <xsl:template match="/">open <xsl:value-of select="$host" /> <xsl:value-of select="$username" /> <xsl:value-of select="$password" /> I tried this <xsl:template match="/">open <xsl:value-of select="$host" /> <xsl:text> </xsl:text> <xsl:value-of select="$username" /> <xsl:text> </xsl:text> <xsl:value-of select="$password" /> <xsl:text> </xsl:text> but only xt and saxon honoured the crlf (ok lf). msxml STILL doesn't honour the crlf. Does anyone know I can solve this? TIA Chris >-----Original Message----- >From: owner-xsl-list@xxxxxxxxxxxxxxxx >[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Chris Bayes >Sent: 31 July 2000 21:05 >To: xsl-list@xxxxxxxxxxxxxxxx >Subject: RE: running msxml3 from command line > > >I can't say without seeing your docs but that is an error from the parser >itself not the script. I just installed the july release and am getting odd >errors on stylesheets that did run on the last one. See >dirtoftp.xslt. Works >fine in xt and saxon and the last release but spits the dummy with >Keyword xsl:apply-templates may not contain PCDATA nodes. >ho hum > >>-----Original Message----- >>From: owner-xsl-list@xxxxxxxxxxxxxxxx >>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Sebastian Rahtz >>Sent: 31 July 2000 12:11 >>To: xsl-list@xxxxxxxxxxxxxxxx >>Subject: running msxml3 from command line >> >> >>Chris Bayes writes: >> > sheesh i can't type >> > oh well it is friday evening and i should be down the pub >> > http://www.bayes.co.uk/xml/index.xml?/xml/utils/translate.xml >> > >>does this work for anyone? the Microsoft IE5.5 + July update which I >>just installed says that its an invalid XML declaration >> >>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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: running msxml3 from command lin, Chris Bayes | Thread | RE: running msxml3 from command lin, Chris Bayes |
RE: running msxml3 from command lin, Chris Bayes | Date | Re: microsoft latest, bug with exte, Sebastian Rahtz |
Month |