Re: [xsl] xmlns in the root element prevents transformation

Subject: Re: [xsl] xmlns in the root element prevents transformation
From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Jul 2020 16:53:17 -0000
Liam says:

    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.

The key here is "_an_ XML Schema document", that is *exactly one*.

There is nothing in XSD that requires there be at most one XSD schema or
schema module for a given namespace, only that an XSD module that governs
names in a namespace declare the namespace it governs (which also means it can
only govern names in that one namespace).

In the context of a CMS where you may have many different versions of the same
schema managed for use with documents that are governed by those different
versions (in time or for different concurrent purposes) how do you
automatically choose the correct one using only a namespace lookup? Of course
you cannot and *a moment's thought* should reveal that any such approach is
doomed to either fail or be too limited or be so complicated by secondary
configuration to enable the lookup as to be unworkable.

Hmph.

Cheers,

E.

--
Eliot Kimber
http://contrext.com


o;?On 7/24/20, 11:30 AM, "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

    On Fri, 2020-07-24 at 15:17 +0000, BR Chrisman brchrisman@xxxxxxxxx
    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

Current Thread