This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: MS XML Parser
- From: "Julian Reschke" <julian dot reschke at gmx dot de>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 16 Nov 2001 09:46:56 +0100
- Subject: RE: [xsl] MS XML Parser
- Reply-to: xsl-list at lists dot mulberrytech dot com
You can't have a *special* type of CR in XML output -- it's normalized in
XML. If you need a special encoding, you'll have to post-process the output.
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Ruane,
> Conleth
> Sent: Friday, November 16, 2001 8:59 AM
> To: xsl-list@lists.mulberrytech.com
> Subject: [xsl] MS XML Parser
>
>
> I'm having a problem that I think has to do with the MS XML Parser.
>
> the XSL snippet:
>
> <someTag><xsl:text
> disable-output-escaping="yes">XXXX&#x0D;&#x0A;YYYY</xsl:text></s
> omeTag>
>
> outputs
>
> <someTag>XXXX
YYYY</someTag>
>
> when processed by Saxon, which is what I want,
> but the following VB code in an asp page produces just
>
> <someTag>XXXX
> YYYY</someTag>
>
> The line is a Unix linefeed (just 1 character) instead of DOS linefeed
> which is what I want.
>
>
>
> *******************************
> ' load the xml message sent
> set doc = Server.CreateObject("Msxml2.DOMDocument.3.0")
> doc.async=false
> doc.resolveExternals = false
> doc.validateOnParse = false
> doc.load Request
>
> ' check for errors
> if doc.parseError <> 0 then
> writeFail "Error parsing initial XML message: " &
> doc.parseError
> cleanUpAsp
> Response.End
> end if
>
> ' XSL Transformation
> 'Load the XSL
> set xsl = Server.CreateObject("Msxml2.DOMDocument.3.0")
> xsl.async = false
> xsl.load Server.MapPath("xslScript")
>
> 'Transform
> set sblDoc = Server.CreateObject("Msxml2.DOMDocument.3.0")
> sblDoc.async = false
> sblDoc.validateOnParse = true
> sblDoc.preserveWhiteSpace = true
> Doc.preserveWhiteSpace = true
>
> doc.transformNodeToObject xsl, sblDoc
>
> ********************************************
> sblDoc.xml then contains
>
> <someTag>XXXX
> YYYY</someTag>
>
> It seems that DOMDocument is interpreting the escaped chars again before
> outputing the XML
>
> Any ideas how I can force the required output.
>
> Conleth Ruane
> > COMPAQ EMEA HQ IM, Munich
> Telephone: +49-89-9392-4393
> mailto:Conleth.Ruane@compaq.com
>
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list