Subject:Output as XML? Author:Stan Lanson Date:23 Feb 2007 10:54 PM
Hi,
I have a newbie question:
I have XML as input and also want XML as output, I also use the <xsl:output method="xml" version="1.0"> tag to declare that but it doesnt work. I added my stylesheet-path to the header of an XML and than open the XML in my browser.
But the browser always shows HTML and doenst print the the new XML tree. (Tried firefox and IE)
Subject:Output as XML? Author:(Deleted User) Date:26 Feb 2007 08:47 AM
Hi Stan,
both browser display HTML, not XML, so they will render just the text nodes contained in the final XML (in this case, just 'Peter Inspector').
Subject:Output as XML? Author:Stan Lanson Date:26 Feb 2007 02:31 PM
Hi Alberto,
thanks for your response.
Nontheless I dont understand why I can't display the result as XML. Both browsers can display XML (tree view -> when you open an .XML file you can see it). Can't I force the browser to interpret the result as XML and not HTML?
Subject:Re: Output as XML? Author:(Deleted User) Date:26 Feb 2007 04:35 PM
Hi Stan,
the problem is that the XML view that both Firefox and IE show when
asked to display an XML file is built through an XSLT stylesheet
itself (e.g. for IE it's stored in the MSXML.dll and can be accessed
via res://msxml.dll/DEFAULTSS.xsl). And this stylesheet is invoked
only when an XML file is loaded, not when the XML comes from the
generation of another stylesheet.