[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Hi
David Carlisle wrote:
<xsl:template match="node">
<xsl:variable name="matchTo" select="parent::node()"/>
<xsl:variable name="matchWith" select="parent::definition"/>
<xsl:if test="matches($matchTo, $matchWith, 'i')">
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:attribute name="type"><xsl:value-of select="@rm_class"/></xsl:attribute>
<xsl:value-of select="text"/>
</xsl:if>
</xsl:template>
Im not sure what you mean by 'regular expression'. There is no [a-z][A-Z][0-9] expression in my <xsl:if> statement. The values of 'matchTo' and 'matchWith' both contain the same result viz. 'First'. In this case although they have the same case, I want my program to be capabale of matching similar words irrespective of their case.
Is this what you wanted?
Thanks to everyone helping me out with this.
Rahil
Re: [xsl] the match() function
Subject: Re: [xsl] the match() function From: RahilQ <qamar_rahil@xxxxxxxxxxx> Date: Thu, 21 Apr 2005 09:22:13 +0100 |
Hi
David Carlisle wrote:
This is the entire <xsl:template> block that Ive writtensurely the error message is clear enough there is a syntax error in your regular expression.
We can't help you as you _still_ haven't shown us what regular
expression you are using.
<xsl:template match="node">
<xsl:variable name="matchTo" select="parent::node()"/>
<xsl:variable name="matchWith" select="parent::definition"/>
<xsl:if test="matches($matchTo, $matchWith, 'i')">
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:attribute name="type"><xsl:value-of select="@rm_class"/></xsl:attribute>
<xsl:value-of select="text"/>
</xsl:if>
</xsl:template>
Im not sure what you mean by 'regular expression'. There is no [a-z][A-Z][0-9] expression in my <xsl:if> statement. The values of 'matchTo' and 'matchWith' both contain the same result viz. 'First'. In this case although they have the same case, I want my program to be capabale of matching similar words irrespective of their case.
Is this what you wanted?
Thanks to everyone helping me out with this.
Rahil
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] the match() function, David Carlisle | Thread | RE: [xsl] the match() function, Michael Kay |
RE: [xsl] xsl:sort, Phillip Nicolson | Date | RE: [xsl] the match() function, Michael Kay |
Month |