[Home] [By Thread] [By Date] [Recent Entries]


7/30/2002 5:25:02 PM, "Karl Stubsjoen" <karl@e...> wrote:

     
>    Is it possible to add the style sheet tag to an xml document using the
>    XML Dom?  So add this:
>
>    <?xml-stylesheet href="order_confirm.xsl" type="text/xsl"?>
>    Above my top level Root Element (after my DTD decleration).
>     
>    I'm familiar with the createprocessinginstruction method, do I use this?
>
Yes.  Or at least in a DOM (e.g. on the server side) that does not support CSS.

Something like ... 

newPI = doc.createProcessingInstruction("xm-stylesheet", "href="order_confirm.xsl" type="text/xsl"');
doc.insertBefore(newPI, doc.firstChild);



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member