This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Losing xsl:param values within a called template for-each loop


CROFT, MICHAEL wrote:
[snip]
Note that you problem is underspecified, or seriously
misspecified. THerefore, i just included enough to make
it work, without consideration on how it could be
adapted to the problem you really have. Use this on
the data you posted to the list only.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
   xmlns:fo="http://www.w3.org/1999/XSL/Format";>

   <xsl:key name="AlternateId" match="AlternateId"
     use="parent::KeyGroup/@id"/>

   <xsl:template match="node()|@*">
     <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
     </xsl:copy>
   </xsl:template>

   <xsl:template match="CrfActionGroup"/>

   <xsl:template match="partyId">
     <xsl:copy>
       <xsl:value-of select="key('AlternateId',../KeyGroup/@refid)[last()]/@value"/>
     </xsl:copy>
   </xsl:template>
</xsl:stylesheet>

J.Pietschmann


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]