Subject: RE: [xsl] XML in String value From: Jeff Beadle <Jbeadle@xxxxxxxx> Date: Tue, 22 Jan 2002 13:47:11 -0500 |
you're missing one thing ... > Set oXmlDoc = Server.CreateObject("MICROSOFT.XMLDOM") > Set oXslDoc = Server.CreateObject("MICROSOFT.XMLDOM") > oXmlDoc.async = false > oXslDoc.async = false oXslDoc.validateOnParse = false this will tell the msxsl parser to not attempt to validate the namespaces included--and necessary for xsl--otherwise it'll fail validation every time. If looked at the parse error results, you'd see the problem. (See the msxml sdk for more details ... I believe the interface is IXMLDOMParseError, you can access this interface via the parseError member on the IXMLDOMDocument interface). -Jeff -----Original Message----- From: John_Radgowski@xxxxxxxxxxxxxxx [mailto:John_Radgowski@xxxxxxxxxxxxxxx] Sent: Tuesday, January 22, 2002 1:30 PM To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] XML in String value Hello all Is it possible to use a string value instead of an XML file when applying an XSL file. The XSL file appears to be parsing the XML if I put the XML string into a file but does not if I have it in a string ex: Does not work: sXml = (some XML string) sXsl = "webmenu.xsl" --. XSL file on server Set oXmlDoc = Server.CreateObject("MICROSOFT.XMLDOM") Set oXslDoc = Server.CreateObject("MICROSOFT.XMLDOM") oXmlDoc.async = false oXslDoc.async = false oXmlDoc.load(sXml) --> not loaded from file oXslDoc.load(Server.MapPath(sXsl)) Response.Write(oXmlDoc.transformNode(oXslDoc)) -> XSL file not working correctly Works: sXml = "webmenu.xml" --> file has same XML as string value sXsl = "webmenu.xsl" --. XSL file on server Set oXmlDoc = Server.CreateObject("MICROSOFT.XMLDOM") Set oXslDoc = Server.CreateObject("MICROSOFT.XMLDOM") oXmlDoc.async = false oXslDoc.async = false oXmlDoc.load(sXml) --> not loaded from file oXslDoc.load(Server.MapPath(sXsl)) Response.Write(oXmlDoc.transformNode(oXslDoc)) -> XSL file not working correctly XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XML in String value, Jeni Tennison | Thread | [xsl] Re: Re: Muenchian method, and, Dimitre Novatchev |
Re: [xsl] problem using saxon:funct, Trevor Nash | Date | Re: [xsl] XML in String value, Jeni Tennison |
Month |