[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: match string
> 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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|