On Fri, 2020-07-24 at 15:17 +0000, BR Chrisman brchrisman(_at_)gmail(_dot_)com
wrote:
Could xpath-default-namespace be an xpath-namespace-search-path? A
list of namespaces which would resolve in order? If I had a 'foo'
that was in ns1, ns2 and ns3, I mainly want to be able to tell the
processor the order of precedence in those namespaces.
The concept of a name being "in" a namespace is valid in most
programming languages but is't really licensed by the namespace (Names
in XML) spec.
A name in XML either has an associated URI (namespacename) or doesn't.
We can't really have a search path because there's no reverse mapping,
from a namespace name ot a list of names.
A schema will do it in some cases - and i've met XML systems that
require it to be possible to dereference a namespace name as a URL and
to retrieve an XML Schema document representtion (XSD) from it for
this purpose, but nothing in XML, Namespaces, XSD requires or even
endorses that behaviour.
We had only a couple of weeks to finish the namespace design; many of
the people doing it were not familiar with the architecture of the Web,
nor of Java's elegant approach. And the solution "had to" support RDF.
There was also a desire expressed to be able to copy and paste
fragments of plain text XML from one document to another and have
automatic record of the originating documents' associated
namespaces(e.g. pasting an HTML fragment into a DocBook chapter) - and
a conflicting use case, being able to paste an "a" element from XHTML
(say) into a document in a vocabulary that happened to define a
compatible "a" element.
We ended up with a design in which namespaces, as Mike Kay points out,
are very different from qualified names in most programming languages,
and which are also not related to identifying authorities of controlled
vocabularies in library science, which is what RDF mostly needed.
This doesn't mean XML namespaces aren't of any use, but it does mean
they are rarely what newcomers to them expect them to be.
--
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--