Subject: RE: [xsl] parameters - element vs attributes From: stephen.peterson@xxxxxxxxxxxxx Date: Thu, 3 Jun 2004 16:24:10 -0400 |
Anderew, David, Michael, Thanks all! Even more help than I could have hoped for! Steve mnr steve -----Original Message----- From: Andrew Welch [mailto:ajwelch@xxxxxxxxxxxxxxx] Sent: Thursday, June 03, 2004 11:04 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] parameters - element vs attributes > <xsl:template name="siteLinks"> > <xsl:param name="theLinkGroup"></xsl:param> > <h2><xsl:value-of select="$theLinkGroup" /></h2> > <!----- does > work > <ul class="xsmall"> > <xsl:for-each select="//$theLinkGroup/link"> > <!----- > won't work > <li><a> > <xsl:attribute name="href"><xsl:value-of > select="url"/></xsl:attribute> > <xsl:value-of select="@title"/> > </a></li> > </xsl:for-each> > </ul> > </xsl:template> Nearly there, you want: <xsl:for-each select="//link[parent::*[local-name() = $theLinkGroup]]"> Which roughly translates to 'select all <link> elements which have a parent element called whatever the $theLinkGroup is, in any namespace'. cheers andrew --+------------------------------------------------------------------ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx> --+--
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] parameters - element vs a, Andrew Welch | Thread | Re: [xsl] Grouping, Counting, and S, Thomas F. O'Connell |
Re: [xsl] Large transforms (was Re:, Wendell Piez | Date | Re: [xsl] Parsing a string, Mayo |
Month |