[Home] [By Thread] [By Date] [Recent Entries]

  • To: xml-dev@l...
  • Subject: [XPath] is it legal ?
  • From: Philippe Poulard <Philippe.Poulard@s...>
  • Date: Fri, 07 Apr 2006 13:59:30 +0200
  • User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050511

hi,

as everything is a node, one can match a node like this :
     node()
which works well in the axis that are walking through the tree
what about other axis ?
     @node()
     namespace::node()
which would give the same as (respectively) :
     @*
     namespace::*
and above all what about :
     @comment()
     @text()
     @p-i(target)
     namespace::comment()
     namespace::text()
     namespace::p-i(target)
which are all empty if they are legal

but are they legal ?
(does an XPath parser must complain ?)

here are the last ones :
     /@*
     /namespace::*

All are accepted with Jaxen
I didn't read anything in the spec that makes them illegal



Will you be hurted if someone (like me) was writting something like this :
     $foo/@bar/@oof

(this is a very smart and convenient mean to cross objects that behave 
like nodes, which is a feature intensively used in Active Tags : an 
object can expose some of its properties as attributes which values can 
be also an object that can expose some of its properties as attributes)

-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
|      Philippe Poulard       |
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member