Next in thread → Next in month →

Re: [xml-dev] Adding Style Sheet tag

From
Mike Champion <>
To
Xml-Dev <>, Karl Stubsjoen <>
Date
2002-07-30T23:39:17Z
ID
<WQ87LHHBROS73DB5QJE4WEDIEE4Z.3d4723a5@MChamp>
Thread
Re: [xml-dev] Adding Style Sheet tag
7/30/2002 5:25:02 PM, "Karl Stubsjoen" <> 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);
Next in thread → Next in month →