This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How to work xml string line with a xslt file
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] How to work xml string line with a xslt file
- From: "Yang" <sfyang at unisvr dot net dot tw>
- Date: Thu, 12 Apr 2001 18:40:13 +0800
- Reply-To: xsl-list at lists dot mulberrytech dot com
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