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

Re: problem adding a new element to an XML document us

Subject: Re: problem adding a new element to an XML document using xsl:element...
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 23 Sep 2004 16:02:20 +0100
document to add xsl
> I notice I still have to include the <ROWSET> and </ROWSET> literals in 
> the stylesheet.

I tend to do that but you can replace ROWSET by xsl:copy if you prefer
Your template for ROWSET basically should look like the template for the
identity transform, with the one extra bit that you want to add, namely
the TABLE element. In teh identity transform as you are matching * you
have to use xsl:copy as you don't know the element name, but when
matching an explict element it's a matter of taste which to use.

> the current solution implies that I would have to manually 
> recontruct any attributes the ROWSET element might have in the input XML?

No, just add
<xsl:copy-of select="@*"/>
and it'll copy all the attributes over, again this should also be in
your identity transform (the one in the xslt spec applys templates to @*
rather than copying them but it's the same thing as the templates
matching attribute nodes then copy the nodes)


David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.