[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
> 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 ________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|