Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: "G. Ken Holman" <gkholman@-------------------->
To:
Date: 5/2/2006 3:08:00 AM
At 2006-05-01 21:48 -0500, Gary E. Daniels wrote:
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?

All result documents have a root node ... it is the parent of the 
document element.  It has no name and it is the top of the node tree 
that represents the result document.  It has no reification in the 
syntax of the serialized result tree (if you choose to serialize the 
result tree).



Are you instead asking about creating a specific document element for 
the result document?



The purpose is so I am able to run a different XSL transform on the 
output XML document.  Thanks.

I think you will need to provide more information because your use of 
the terminology makes it difficult to answer the question as it is now posed.



In a transform, the result document begins with a root node.  If you 
add a single element child to that root and then only children and 
descendants of that element, then you are creating an XML document 
result.  If you add zero or more than one elements as children of the 
result tree root node, you are creating an external parsed general entity.



Can you rephrase your question with an example of what you have as 
input and what you want as output?  That may help us help you by 
better illustrating what you need to learn.



I hope this helps.



. . . . . . . . . . Ken




--
Registration open for XSLT/XSL-FO training: Wash.,DC 2006-06-12/16
Also for XSLT/XSL-FO training:    Minneapolis, MN 2006-07-31/08-04
Also for XML/XSLT/XSL-FO training:Birmingham,England 2006-05-22/25
Also for XSLT/XSL-FO training:    Copenhagen,Denmark 2006-05-08/11
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


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