xsl-list
[Top] [All Lists]

[xsl] Restrictions on XPath expressions in <xsl:key>

2007-12-19 14:43:06
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. 
________________________________

Tony Nassar

Cell: (703) 994-0954

Blog: http://slideguitarist.blogspot.com/Music:
http://www.soundclick.com/thecompletists
<http://www.soundclick.com/thecompletists> 



"God love me, and I'm a hell of a fighter.." - Floyd Mayweather


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>