[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: combining two variables to generate XPATH
"Robert Koberg" <rob@xxxxxxxxxx> wrote in message news:ADECJLDNBFNBOJBLKCMOKEFPDMAA.rob@xxxxxxxxxxxxx > Hi bix, > > I think everyone is getting caught up in your explicit question :) and not > understanding what you want, or perhaps I am missing something... > > Based on previous examples: > concat($node,'/',$type,'/item') -- assuming $type is the name of an element > select="'someBranch'" -- assuming 'someBranch' is the name of an element > > this is very simple to solve in XSLT 1.0, as I posted earlier: > > <xsl:template name="foo"> > <xsl:param name="node"/> > <xsl:param name="branch" select="'someBranch'"/> > <xsl:for-each select="$node/*[name()=$branch]/leaf"> > <xsl:value-of select="@id" /> > </xsl:for-each> > </xsl:template> > > best, > -Rob This is what I advised him to do in one of the newsgroups about a week ago. But obviously this person has some other requirements. How long will need 1000 people to guess? >From my empirical observations more than 50% of the messages and time taken goes in clarifying the formulation of a problem -- some never get explained well. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com 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
|