[Home] [By Thread] [By Date] [Recent Entries]

  • From: Kurt Cagle <kurt.cagle@g...>
  • To: Michael Kay <mike@s...>
  • Date: Wed, 8 Jul 2009 14:30:34 -0700

Michael,

I'm not disagreeing with your assessment on namespaces, and I'd truly love to see a better solution emerge here for them. Ignoring that some kind of distributed extensibility mechanism is required is not an option, however, and given the steamroller process going on right now on the part of WHATWG, I have to admit to being more than a little concerned how this may turn out.

I keep seeing the idea being pushed of defining some sort of umbrella namespace that can be utilized to "wrap" other namespaces, so that you can essentially work with a default namespace for multiple tags. This way you can deploy namespaces when they are truly necessary while at the same time removing a lot of the redundency inherent in ns prefixes. Perhaps something along the lines of

<html>
   <nsinclude xmlns:my="http://www.myvocabulary.com/xmlns/mynamespace" map="http://www.w3.org/1999/xhtml"/>
   <nsinclude xmlns:foo="http://www.myvocabulary.com/xmlns/foonamespace" map="http://www.w3.org/1999/xhtml"/>
    <head>
    </head>
    <body>
            <cooltag>Ambiguous namespace, resolved by matching.</cooltag>
            <my:cooltag>Unambiguous namespace, resolved inline</my:cooltag>
    </body>
</html>

If <cooltag> is in the my: namepaces but not in the foo: namespace, then the first and second tags have the same rendering. If <cooltag> is in foo, then the foo implementation becomes the default rendering for the first line, unless an optional priority attribute is specified with a higher priority value than the default in a previous nsinclude.

Probably just wishful thinking on my part, however.

Kurt Cagle
Managing Editor
http://xmlToday.org


On Wed, Jul 8, 2009 at 1:54 PM, Michael Kay <mike@s...> wrote:
 > There's supposed to be an extensibility workshop in September at one of the F2Fs where namespaces in general will be hashed out - I plan to be monitoring that one carefully, as I suspect that there will be a move to "fix" namespaces in a way that will have long term negative repercussions for the XML community. 
 
Let's approach this positively. XML namespaces are a pretty awful piece of design. Perhaps this is an opportunity to revisit the requirement and do something a bit more elegant.
 

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay

 

 
 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member