[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Node-sets using <xsl:with-param>
G. Ken Holman wrote:
At 2004-01-22 00:26 -0500, Mir Farooq Ali wrote: This is my stylesheet <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:strip-space elements="*" /> <xsl:output method="xml" indent="yes" /> <xsl:variable name="maindoc" select="/" /> <xsl:template match="TM"> <UI> <STR> <xsl:apply-templates select="T" mode="structure1" /> </STR> </UI> </xsl:template> <xsl:template match="T" mode="structure1"> <xsl:variable name="id" select="@Identifier" /> <xsl:variable name="ttm" select="./Type" /> <xsl:variable name="tc" select="@Category" /> <xsl:variable name="uc" select="./Prefs/UC" /> <xsl:variable name="ups" select="./Prefs/UPS" /> <xsl:for-each select="document('lookup.xml')"> <xsl:variable name="current" select="." /> <xsl:apply-templates mode="modify" select="/TM/ TC[@name=$tc]/ TTM[@type=$ttm]/ UCM[@prefnum=$uc]/ UPS/part[@prefnum=$ups]/*"> <xsl:with-param name="id1" select="$id"/> <xsl:with-param name="curnode" select="."/> </xsl:apply-templates> </xsl:for-each> </xsl:template> <xsl:template mode="modify" match="*"> <xsl:param name="id1"></xsl:param> <xsl:param name="curnode"></xsl:param> <xsl:variable name="idd" select="translate($id1,' ','_')"></xsl:variable> <xsl:variable name="newid" select="concat($idd, position())"></xsl:variable> <part class="{name()}" id="{$newid}"> <xsl:apply-templates mode="modify"> <xsl:with-param name="id1" select="$newid"></xsl:with-param> </xsl:apply-templates> <!--xsl:apply-templates mode="structure1" select="$curnode" /--> <!-----******* Error on this line here --> </part> </xsl:template> <xsl:template match="Prefs|Type" mode="structure1" /> </xsl:stylesheet> The error line is indicated above. Ken, could you please elaborate on what the built-in template rule is for the situation above? I read the XSLT 1.0 spec, but couldn't fully understand what it says. Thanks, -Farooq. -- Mir Farooq Ali Computer Science, Virginia Tech, Email: miali@xxxxxxxxx Web: http://purl.org/net/farooq -------------------------------------------- (c) 2004 Mir Farooq Ali All rights reserved -------------------------------------------- XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|