You might also want to check that you are not wanting to utilise multiple 
stylesheets as the 'getAssociatedStylesheet' function (to retrieve the 
stylesheet) is  broken for use with multiple stylesheets.

Rob Tice



-----Original Message-----
From:   Andy Clark [SMTP:[EMAIL PROTECTED]
Sent:   18 April 2002 14:05
To:     [EMAIL PROTECTED]
Subject:        Re: Help in attaching XSL reference to XML

Pavani Mukthipudi wrote:
> ProcessingInstruction pi = 
doc.createProcessingInstruction("xml-stylesheet",
> "href=\"foo.xsl\" type=\"text/xsl\"" ) );
> doc.appendChild(pi);

And if your document already has a root element, then you might
want to insert the PI before that. For example:

  doc.insertBefore(pi, doc.getFirstChild());

--
Andy Clark * [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to