[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: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 21 Apr 2005 10:41:41 +0100
parent function
> Im not sure what you mean by 'regular expression'. There is no 
> [a-z][A-Z][0-9] expression in my <xsl:if> statement

matches takes a regular expression as its second argument, you have
given it $matchWith, but you still haven't shown us what string that is.
Whatever it is, it is not a valid regular expression.

The string is somewhat strangly set to be select="parent::definition"
which means that the system is going to the parent element and then
taking the string value of that, ie all the character data of all
descendents of the parent. this is a very big string and it is not
surprising that it does not have the correct syntax for a regular
expression. You get an error message in character 600 and something.

Almost certainly you didn't intend that to be the regular expression but
you have not said what you are trying to do.

As it is your matches() function will never do anything useful, you have


    <xsl:variable name="matchTo" select="parent::node()"/>
    <xsl:variable name="matchWith" select="parent::definition"/>

So if the parent node is definition these two variables are identical,
and if the parent node is not definition matchWith is the empty
sequence.

What are you trying to test?

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.