[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL to output new XML document with root node

Subject: Re: XSL to output new XML document with root node
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 01 May 2006 23:07:17 -0400
xsl add root node
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.