Subject: [xsl] trying to load xml and xsl nothing happing From: Meir <umen@xxxxxxxxxxxxxxxx> Date: Sun, 16 Jun 2002 21:35:49 -0700 |
Hello list , i have this code : var XMLDoc; var XSLDoc; var result ; XMLDoc=new ActiveXObject('Msxml2.DOMDocument.3.0'); XMLDoc.async = false; XSLDoc=new ActiveXObject('Msxml2.DOMDocument.3.0') ; XSLDoc.async = false; XMLDoc.load("flashCTL.xml"); XSLDoc.load("flashCTL.xsl"); result = XMLDoc.documentElement.transformNode(XSLDoc); alert(result); Tree.innerHTML = result; i keep geting <?xml version="1.0" encoding="UTF-16"?> , why? why i dont geting the result of the xml and xsl output ? my xsl file looks like this : <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:for-each select="/CdList//*"> <xsl:call-template name="print"/> </xsl:for-each> </xsl:template> <xsl:template name="print"> <xsl:value-of select="name()"/><xsl:text>=</xsl:text> <xsl:value-of select="./@id"/> <br/> </xsl:template> </xsl:stylesheet> and the xml file looks like this : <?xml version="1.0"?> <CdList> <Dir id='flash'> <File id='battletank.zip'/> <File id='flashquest.zip'/> <File id='3d.fla'/> <File id='3d.swf'/> <File id='3D_Engin-KStor-189.zip'/> <Dir id='1'><File id='level1.txt'/> <File id='flash_quest.swf'/> <File id='level2.txt'/> <File id='level3.txt'/> <File id='level4.txt'/> <File id='FKSingapore.txt'/> </Dir><Dir id='3D_Engin'> <File id='3DengineForDummies.fla'/> <File id='3DengineForDummies.swf'/> <File id='actionscriptsummary.swf'/> <File id='button.jpg'/> <File id='line.jpg'/> <File id='rotating menu.html'/> <File id='TheWayWeDoIt.jpg'/> </Dir> </Dir> </CdList> by the way if i run the xml + xsl file whitout loading them to the dom its working fine tnx for the help XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] testing procmail rule, my apo, Jonathan Furrer | Thread | RE: [xsl] trying to load xml and xs, Max Dunn |
RE: [xsl] is it possible to constru, Michael Leditschke | Date | Re: [xsl] trying to load xml and xs, Meir |
Month |