This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to create xsl-stylesheet processing instruction with DOM API?
- To: xsl-list at mulberrytech dot com
- Subject: Re: How to create xsl-stylesheet processing instruction with DOM API?
- From: Warren Hedley <w dot hedley at auckland dot ac dot nz>
- Date: Fri, 30 Jun 2000 09:20:24 -0400
- CC: "Meukens, Kris" <kris dot meukens at eds dot com>
- Organization: Department of Engineering Science, The University of Auckland
- References: <BF684446A4ACD311851E00805FBEF289025A4714@beahm003.be.eds.com>
- Reply-To: xsl-list at mulberrytech dot com
"Meukens, Kris" wrote:
>
> How can I create a xsl-stylesheet <?xml-stylesheet
> href="hello-page-html.xsl" type="text/xsl"?> processing instruction with the
> DOM API?
I'm not an expert on the DOM, but wouldn't the following work?
pi = document.createProcessingInstruction("xml-stylesheet",
"href=\"hello-page-html.xsl\" type=\"text/xsl\"");
document.insertBefore(pi, document.getDocumentElement());
The only thing I'm not sure about is if putting it before the
root element works - maybe this is what you were asking?
--
Warren Hedley
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list