Re: [xml-dev] What's wrong with namespaces? Some observations and suggestions

From
Michael Kay <>
To
Date
2010-12-05T23:41:28Z
ID
<>
Thread
Re: [xml-dev] What's wrong with namespaces? Some observations and suggestions
> An interesting question is how we would write compact XPath
> expressions for XML2:
>
>       /*/head/body
>
> should select the :org.w3c.html.body element.
>
> Should we have to write:
>
>      /*/head/body/:org.w3c.svg.svg
>
> or
>
> could it be:
>
>      /*/head/body/:~svg.svg
>

My suggestion would be:

select=":org.w3c.html.table"

selects an element with this precise name

select="table"

selects a table element in any namespace - that is, an element that has 
"table" as the final part of its name.

Generally I think it's better if XPath is designed to over-retrieve 
rather than under-retrieve - it's easier for the user to see what they 
did wrong if they get too much data back than if they get nothing back.

Michael Kay
Saxonica