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

RE: match string

Subject: RE: match string
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 21 Oct 2004 13:26:11 +0100
xsl match text
> OK... but now the problem is, none of both seem to be valid 
> in a match pattern.

True (even in 2.0)
> 
> <xsl:template match="para(//text())[1]">    saxon says: "The only 
> functions allowed in a pattern are id() and key()"

There is no function named para(), even if general functions were allowed.

> <xsl:template match="para/descendant::text()[1]">    saxon 
> says: "Axis in pattern must be child or attribute"

Correct.
> 
> (The first one is strange: is text() really a function? And 
> even then, 
> why is "para//text()[1]" a valid pattern and 
> "para(//text())[1]" isn't?)

Because para() isn't a function.

In 2.0 you could do match="text()[. is
ancestor::para/descendant::text()[1]]".

In 1.0 you could to the same using generate-id() or count(.|x) for the
identity test.

Michael Kay
http://www.saxonica.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.