This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: xml newsfeed.
- To: xsl-list at mulberrytech dot com
- Subject: Re: xml newsfeed.
- From: Mike Brown <mike at skew dot org>
- Date: Thu, 17 Aug 2000 12:33:56 -0600 (MDT)
- Reply-To: xsl-list at mulberrytech dot com
Peter Bates wrote:
> for the code to work, i need the line
>
> <?xml-stylesheet type="text/xsl" href="index.xsl" ?>
>
> inserted before the doctype. However this line is not present in the
> files as I receive them. Is it necessary, in which case i'd have to use
> asp to add in the extra line for each file, or can I do this without the
> line being inserted.
To insert the line, you could do an identity transformation on the input,
as per:
http://www.w3.org/TR/xslt#copying
except when processing the root node, add the processing instruction:
http://www.w3.org/TR/xslt#section-Creating-Processing-Instructions
As for whether or not it is necessary, it depends on what you're doing. I
assume you're expecting people to be accessing the XML document directly,
and you want the <?xml-stylesheet ...?> processing instruction to tell
their application what stylesheet is associated with the document. You're
assuming that their application will act on that information, which is
fine if they're using IE5/MSXML.
- Mike
____________________________________________________________________
Mike J. Brown, software engineer at My XML/XSL resources:
webb.net in Denver, Colorado, USA http://www.skew.org/xml/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list