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

RE: Generally appending XML document to another one (u

Subject: RE: Generally appending XML document to another one (using XSL)
From: Americo Albuquerque <melinor@xxxxxxxx>
Date: Thu, 2 Oct 2003 00:20:50 +0100
appending xml documents
Hi

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Aitor San Juan
> Sent: Wednesday, October 01, 2003 8:41 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Generally appending XML document to another 
> one (using XSL)
> 
> 
> Hello all!
> 
> 	I am trying to write an XSL as general as possible to 
> append documents at the end of others. You can see the XML 
> input file and the XSL I'm working on. The "root" attribute 
> of the <append> element is the name of the root element to be 
> kept in the output, and under which all the child elements 
> are appended. Let me explain myself with the following examples.
> 

Try this:

  <xsl:template match="append">
    <xsl:element name="{@root}">
      <xsl:apply-templates/>
    </xsl:element>
  </xsl:template>
  <xsl:template match="file">
    <xsl:apply-templates select="document(.)"/>
  </xsl:template>
  <xsl:template match="book">
    <xsl:copy-of select="."/>
  </xsl:template>

Regards,
Americo Albuquerque


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.