Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Clark notation in XPath

From: Jirka Kosek <jirka@-------->
To:
Date: 10/2/2005 6:14:00 PM
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]


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent