xsl-list
[Top] [All Lists]

RE: Generally appending XML document to another one (using XSL)

2003-10-01 16:20:50
Hi

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Aitor San Juan
Sent: Wednesday, October 01, 2003 8:41 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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="{(_at_)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



<Prev in Thread] Current Thread [Next in Thread>