Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


xml to another mime type

From: "mike" <hillmw@-------.--->
To: NULL
Date: 7/5/2005 1:05:00 PM
I have an app that puts out xml and xslt stylesheet in an html page.
When the user makes a selection the "innerHTML" gets transformed as per
the stylesheet.

The xml in the page looks someting like:

<xml id=3D"xmlXYZ">
<root>
  <data><snip>....</snip></data>
</root>
</xml>

The xslt in the page looks something like:

<xml id=3D"xslXYZ">
<xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"
version=3D"1.0">
<xsl:output method=3D"html"/>
<xsl:template match=3D"/">
   <html>blah, blah, blah, stuff was output</html>
</xsl>
</xml>

The javascript looks something like:
var src =3D new ActiveXObject("Msxml2.DOMDocument.5.0");
src.load(xmlXYZ);

var sf =3D new ActiveXObject("Msxml2.FreeThreadedDOMDocument.5.0");
sf.load(xslXYZ);

xmlTarget.innerHTML =3D src.transformNode(sf);

What I would like to do is create another kind of stylesheet in the
page and give the capability for the user to call it. The style sheet
would open the results in Excel.

The new stylesheet would output in xml format to the excel app.
something like:

<xml id=3D"xslSHAZAM">
<xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"
version=3D"1.0">
<xsl:output method=3D"xml" media-type=3D"Application/vnd.ms=ADexcel"/>
<xsl:template match=3D"/">
  <data><snip....</snip></data>
</xsl>
</xml>

Of course this does not work. Any ideas how I would get this to work?



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