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]
Other format: [Raw text]

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&amp;#x0D;&amp;#x0A;YYYY</xsl:text></s
omeTag>

outputs 

<someTag>XXXX&#x0D;&#x0A;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


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