Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Empty XML output after ASP XSL transformation

From: "Oleg Tkachenko [MVP]" <oleg@--!----!---------------.--->
To: NULL
Date: 7/3/2005 11:47:00 AM
doneill@a... wrote:

> 		"<xsl:template match=""/"">" & _
> 			"<div>" & _
> 				"<div>test1</div>" & _
> 				"<div>test2</div>" & _
> 			"</div>" & _
> 			"<div>test3</div><!--Remove this line and it works-->" & _
> 		"</xsl:template>" & _

The result is not an XML document, but XML fragment as it has two root 
elements.

> Set objXSL = Server.CreateObject("MSXML2.DOMDocument")
> objXSL.loadXML(strXSL)
> 
> Set objXML = Server.CreateObject("MSXML2.DOMDocument")
> With objXML
> 	.async = false
> 	.preserveWhitespace = false
> 	Call .loadXML(strXML)
> 	Call .transformNodetoObject(objXSL, objXML)

That's weird. You are transforming objXML and place result in objXML 
too? Anyway, MSXML2.DOMDocument can't handle XML fragments, but only XML 
documents with a single root element.

-- 
Oleg Tkachenko [XML MVP, MCAD]
http://www.xmllab.net
http://blog.tkachenko.com


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent