[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] What's wrong with namespaces? Some observations andsuggestions
- From: Michael Kay <mike@saxonica.com>
- To: xml-dev@lists.xml.org
- Date: Sun, 05 Dec 2010 23:41:28 +0000
> 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
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]