[
Lists Home |
Date Index |
Thread Index
]
7/30/2002 5:25:02 PM, "Karl Stubsjoen" <karl@excelbus.com> 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);
|