[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE : RE: Concatenating multiple variables in a

Subject: RE : RE: Concatenating multiple variables in a XPath statement
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Thu, 22 Jun 2006 12:40:09 +0200 (CEST)
for loop multiple variables
Michael Kay wrote:

  Hi

> > Thank you Micheal.
> > There are xpath and element names in the variables. var1 
> > contains an xpath like /form/body/rows/row[$i] and var2 has 
> > an element name which is found dynamically in a loop.
> > I think this is the case that XPath does not support. Am I right?

> Correct.

  Mmh, in this special case, it is possible, isn't it?  If I understand
correctly "var2 has an element name which is found dynamically in a
loop" as meaning "var2 is a variable bound in an xsl:for-each, holding
an element name".

    <xsl:variable name="var1" select="..." as="element()*"/>
    <xsl:for-each select="...">
      <xsl:variable name="var2" select="..." as="xs:string"/>
      <xsl:sequence select="var1[local-name() eq var2]"/>
    </xsl:for-each>

  Or something like that, depending on the particularities of the
requirements.

  Did I miss something?

  Mmh, after having wrote that, I'm guessing if "var1 contains an xpath
like /form/body/rows/row[$i]" means "var1 contains a sequence selected
by the XPath expression ..." or "var1 contains a string, the XPath
expression ...".  In the former my example is right, but not in the
later, indeed.

  Regards,

--drkm





























	

	
		
___________________________________________________________________________ 
Yahoo! Mail riinvente le mail ! Dicouvrez le nouveau Yahoo! Mail et son interface rivolutionnaire.
http://fr.mail.yahoo.com

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.