Subject: RE: [xsl] Concatenating multiple variables in a XPath statement From: "Mohsen Saboorian" <mohsens@xxxxxxxxx> Date: Sat, 24 Jun 2006 09:42:59 +0330 |
Thank you Florent, But it seems that your solution works with XSLT 2, but I'm using XSLT 1 which do not support "as" and "sequence".
Michael Kay wrote:interface rivolutionnaire.
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
http://fr.mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] RE : [xsl] RE : RE: [xsl] Con, Florent Georges | Thread | Re: [xsl] Concatenating multiple va, Mohsen Saboorian |
Re: [xsl] Counting and Rearranging , Mukul Gandhi | Date | RE: [xsl] Forcing a call to a Java , Michael Kay |
Month |