Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: "Michael Kay" <mike@------------>
To:
Date: 5/2/2006 9:01:00 AM
> 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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent