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

Re: the match() function

Subject: Re: the match() function
From: RahilQ <qamar_rahil@xxxxxxxxxxx>
Date: Thu, 21 Apr 2005 09:22:13 +0100
xsl match function
Hi

David Carlisle wrote:

surely 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.


This is the entire <xsl:template> block that Ive written

<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

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.