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

  • From: Bjoern Hoehrmann <derhoermi@g...>
  • To: "Michael Kay" <mike@s...>
  • Date: Mon, 08 Jan 2007 14:32:59 +0100

* Michael Kay wrote:
>Another candidate that meets this requirement is to use XQuery syntax
>
>declare namespace p1="http://p1.uri";
>declare namespace p2="http://p2.uri";
>declare namespace p="http://p.uri";
>declare default element namespace"xxx";
>/p1:a[1]/p2:b[1]/p:c[1]
>
>but that seems rather verbose in the contexts where XPath is commonly used.

Well, if you go there, you could just use

  /*[local-name() = 'a' and namespace-uri() = 'http://p1.uri'][1]/
   *[local-name() = 'b' and namespace-uri() = 'http://p2.uri'][1]/
   *[local-name() = 'c' and namespace-uri() = 'http://p.uri'][1]
-- 
Björn Höhrmann · mailto:bjoern@h... · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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