[xsl] How to work xml string line with a xslt file

Subject: [xsl] How to work xml string line with a xslt file
From: "Yang" <sfyang@xxxxxxxxxxxxx>
Date: Thu, 12 Apr 2001 18:40:13 +0800
Hi,
      I have a problem of applying xslt file to a xml string.

      I try to apply the following typical  codings  which are using xml
file and xsl file to work our a html page
      for the xml string data.

      First ,I form a simple  xml string , <doc><d>10</d></doc>   and
directly insert it as argument of source.load like this

           source.load('<doc><d>10</d></doc>')    but I got a blank page.

      Then change to   source.loadxml(xmlstring) command  I got error
message that the object is not supported.
       I am using IE5.5  msxml3.

      Please someone give me a help.

      ** typical processing xml and xsl coding;***
       source = new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
                source.async = false;
                source.load('a.xml');

                style = new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
                style.async = false;
                style.load('a.xsl');

                transformer = new ActiveXObject("MSXML2.XSLTemplate");
                transformer.stylesheet = style.documentElement;

                var xslproc = transformer.createProcessor();
                xslproc.input = source;
                xslproc.addParameter("ProdCode", prodcode);

                xslproc.transform();...


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread