[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [xml] . vs self::node()



On 13/01/2009, Joachim Zobel <jz-2006 heute-morgen de> wrote:
>
>  self::node()[ table:formula]//text:p
>
>  is accepted, while
>
>   [ table:formula]//text:p
>
>  gives me an "Invalid expression". Is this a bug or am I missing
>  something?

It is an invalid expression, a predicate may not follow an abbreviated
step. See:
<http://www.w3.org/TR/xpath#NT-Step>
<http://www.dpawson.co.uk/xsl/sect2/nono.html#d1974e618>

Nothing wrong with spelling your expression as:

self::*[ table:formula]//text:p

Elements are the only nodes that have attributes anyway.

Martin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]