[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Clark notation in XPath

Subject: Re: Clark notation in XPath
From: Jirka Kosek <jirka@xxxxxxxx>
Date: Sun, 02 Oct 2005 20:13:37 +0200
clark notation namespace
Joe Fawcett wrote:

> One idea was to allow Clark notation when doing searches on documents as
> developers seem to struggle with the idea that that don't need to know
> the actual prefix used in a document.
>
> Let's say I have in memory a document that has all elements in the
> http://myDomain.co.uk/namespaces/ns1 namespace.
> I can select an element using the xpath:
>
> MyDom.select("{http://myDomain.co.uk/namespaces/ns1}myElement")

I bet that anyone who need to do more then one query would not like this
syntax. AFAIK MS API allows to bind namespaces to prefixes and use them
in XPath queries. So what is needed here is better education of
developers. And you can always stick to good old XPath way:

*[local-name() = 'myElement' and namespace-uri() =
'http://myDomain.co.uk/namespaces/ns1']

However it wouldn't be bad if some future version of XML (and XPath)
allowed to use Clarks notation everywhere where QName is allowed. But
this will hardly happen I think.

					Jirka

--
------------------------------------------------------------------
   Jirka Kosek     e-mail: jirka@xxxxxxxx     http://www.kosek.cz
------------------------------------------------------------------
   Profesionalnm 9kolenm a poradenstvm v oblasti technologim XML.
      Podmvejte se na na9 novl spu9tln} web http://DocBook.cz
        Podrobn} pxehled 9kolenm http://xmlguru.cz/skoleni/
------------------------------------------------------------------
   Nejbli>9m termmny 9kolenm: DocBook 5.-7.12. * XSL-FO 19.-20.12.
      XSLT 17.-20.10. * XML schimata (vhetnl RELAX NG) 7.-9.11.
------------------------------------------------------------------

[demime 1.01d removed an attachment of type application/x-pkcs7-signature which had a name of smime.p7s]

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.