RE: automatic namespaces use case

Hi Liam,

In fact, you could go one step further for a "MicroXML".  You could say that any resource that was requested from anywhere with a media type of application/uxml+xml would *implicitly* have a reference to the http://www.w3.org/XML/1998/namespace resource on the root (foo below) element, that would *virtually* look like this:

<foo rel="ns" href="http://www.w3.org/XML/1998/namespace" type="application/namespace+xml">
...
</foo>

and the resource at http://www.w3.org/XML/1998/namespace, when requested with that media type would respond with an automatic namespace response with the appropriate contents:

<ns>
  <attribute>
    <name>href</name>
    <uri>http://www.w3.org/XML/1998/namespace</uri>
  </attribute>
  <attribute>
    <name>src</name>
    <uri>http://www.w3.org/XML/1998/namespace</uri>
  </attribute>
  .... and all the rest of whatever is in the namespace at the time
</ns>

Of course, because this reference is virtual, it would be unlikely to overload the W3C servers, and it could be cached easily anyway.

You could also do the same thing for any other media type that made sense for the xml namespace, for example, if xml schemas had their own media type you could request an xml schema fragment via (the currently unregistered) application/xmlschema+xml media type.

Don't know how this fits with the plans for microxml.

What do you think!
Peter

________________________________________
From: Rushforth, Peter [Peter.Rushforth@NRCan-RNCan.gc.ca]
Sent: August 2, 2012 6:30 AM
To: liam@w3.org
Cc: public-xmlhypermedia@w3.org
Subject: RE: automatic namespaces use case

Hi Liam,

Actually, if you did this:

<foo rel="ns" href="http://example.com/mynsresource" type="application/namespaces+xml">
  <bar/>
</foo>

and the /mynsresource was like this:

<ns>
  <attribute>
    <name>href</name>
    <uri>http://www.w3.org/XML/1998/namespace</uri>
  </attribute>
  <attribute>
    <name>src</name>
    <uri>http://www.w3.org/XML/1998/namespace</uri>
  </attribute>
</ns>

etc

then you would never have to use the prefixed form in the instance document, maybe, because you'd
recursively mapped the prefixed form to the  unprefixed form, although you could still use them if you really wanted because it is defined by fiat in the xml spec.

What do you think?

Peter

________________________________________
From: Rushforth, Peter [Peter.Rushforth@NRCan-RNCan.gc.ca]
Sent: August 1, 2012 6:10 PM
To: public-xmlhypermedia@w3.org; liam@w3.org
Subject: automatic namespaces use case

Hi,

I've updated the wiki with a use case for automatic namespaces.

Please have a look and respond to this thread.  I'll updated it as required.

http://www.w3.org/community/xmlhypermedia/wiki/Distributed_extensibility_/_automatic_namespaces

Thanks,
Peter


Received on Thursday, 2 August 2012 11:38:25 UTC