Subject: Re: [xsl] Restrictions on XPath expressions in <xsl:key> From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 19 Dec 2007 16:59:47 -0500 |
Does someone know a reason why this won't compile:
<xsl:key name="templates" match="/onm:NetworkModel/onm:Graph/(onm:Nodes|onm:Links)/(onm:Link|onm:N ode)/onm:Templates/onm:Template" use="@Name" />
...but this will:
<xsl:template match="onm:Graph"> <xsl:copy> <xsl:if test="(onm:Nodes/onm:Node|onm:Links/onm:Link)/onm:Attributes/onm:Attribu te">
In other words, why can't an XPath expression in an <xsl:key> element include parentheses and union operators?
By the way, what is the order of precedence between '/' and '|'? I'd understand '\' to have higher precedence, in which case the latter expression above is actually wrong, though it's been working for me.
I'm using .NET 2.0, so let me know if this is a platform question, in which case I'll post elsewhere.
-- Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Restrictions on XPath exp, David Carlisle | Thread | RE: [xsl] Restrictions on XPath exp, Michael Kay |
Re: [xsl] Restrictions on XPath exp, David Carlisle | Date | RE: [xsl] Restrictions on XPath exp, Michael Kay |
Month |