Re: [xsl] Combining xml file manipulation into one xsl

Subject: Re: [xsl] Combining xml file manipulation into one xsl
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 2 Oct 2003 00:33:16 +0100

given your (2nd pass) input I think

            <xsl:value-of select="./Name"/>
          <Type><xsl:value-of select="./Type"/></Type>
          <BriefDescription><xsl:value-of select="./BriefDescription"/></BriefDescription>
          <SourceFileName><xsl:value-of select="./SourceFileName"/></SourceFileName>
          <IgnoreFlag><xsl:value-of select="./IgnoreFlag"/></IgnoreFlag>

can be replaced by
<xsl:copy-of select="."/>

which means that basically you should be able to merge this in to your
first stylesheet. (In general in pure xslt 1 to merge the results of two
stylesheets you need to do what you are doing, produce an intermediate
documemt, but as one of your transforms is just a copy I think you want
something like

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="";>
<xsl:output method="xml" omit-xml-declaration="yes"/>

<xsl:key name="x" match="File" use="Name"/>

  <xsl:template match="/">
       <xsl:sort select="@name|Name"/>

  <xsl:template match="doxygenindex/compound">
    <Name><xsl:value-of select="name"/></Name>
    <Type><xsl:value-of select="@kind"/></Type>
    <SourceFileName><xsl:value-of select="@refid"/></SourceFileName>

<xsl:template match="File">
  <xsl:copy-of select="."/>



 XSL-List info and archive:

Current Thread