xsl-list
[Top] [All Lists]

RE: [xsl] XSL to output new XML document with root node

2006-05-02 02:00:44
Hi.  I have an XSL sheet to extract certain data from an XML 
document.  I use Saxon for the transform and have the output 
as XML.  I need to have the outputted XML document to contain 
a root node.  How do I code the XSL sheet to create the root 
node for the XML output document?  The purpose is so I am 
able to run a different XSL transform on the output XML 
document.  Thanks.

As Ken explained, your terminology is confused, which makes it difficult to
understand your problem. I'm wondering though, perhaps what you are trying
to do is to generate an <?xml-stylesheet?> processing instruction in the
output? If so, you can do that with an <xsl:processing-instruction> element
in the stylesheet. However, unless the next transformation is to run in a
browser, this isn't the way I would normally implement stylesheet chaining:
I would fire off the sequence of transformations from some controlling
application, written in Java, Ant, shell-script, or a pipeline language,
depending on the environment.

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>