[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
RE: Do namespaces address all use cases well
- From: "Jim Tivy" <jimt@bluestream.com>
- To: "'nico'" <ndebeiss@gmail.com>,<xml-dev@l...>
- Date: Thu, 9 Jul 2009 14:05:40 -0700
Nicely said Nico
I agree attributes should be in the
default namespace if unqualified.
I think you clearly described a sort of
name lookup - perhaps based on path - to resolve which namespace a name belongs
to. I am nervous about proposing a model that requires more processing to know what namespace something is in.
As well, without tools I would not know which namespace an element was actually
in. Explicit prefixes give you the abilility to know immediately.
Jim
From: nico
[mailto:ndebeiss@gmail.com]
Sent: Thursday, July 09, 2009 2:31
AM
To: Jim Tivy;
xml-dev@lists.xml.org
Subject: Re: Do
namespaces address all use cases well
Hello
I may give at least an example of something that we (developers) have lots of
problems to get, it is the defaut attribute namespace.
The XML specification is :
"A default namespace declaration applies to all unprefixed element names
within its scope. Default namespace declarations do not apply directly to
attribute names; the interpretation of unprefixed attributes is determined by
the element on which they appear.
If there is a default namespace declaration in scope,
the http://www.w3.org/TR/xml-names/#dt-expname corresponding to an unprefixed element name has the URI of the http://www.w3.org/TR/xml-names/#dt-defaultNS as its http://www.w3.org/TR/xml-names/#dt-NSName. If there is no default namespace
declaration in scope, the namespace name has no value. The namespace name for
an unprefixed attribute name always has no value. In all cases, the http://www.w3.org/TR/xml-names/#dt-localname is http://www.w3.org/TR/xml-names/#NT-LocalPart (which is of course the same as the unprefixed name itself). "
The 1st paragraph does not say a lot as you can see...
The 2nd paragraph says that unprefixed attribute has
no namespace (you get null with APIs). That is a trick that is useless for me.
I think that attributes namespaces should be processed
same way that a child element.
In my opinion, namespaces should be done as packages in a language like python,
or java, meaning that it is a shortcut for a longer element name.
Instead of writing :
<"http://namespace":tag>48</"http://namespace":tag>
you import a namepace and you associate it with a prefix with xmlns:pre="http://namespace"
and you can shortcut the above by :
<pre:tag>48</pre:tag>
or you import a default namespace and then the unprefixed markups come from that
namespace.
Null namespace should not be allowed, or interpreted as being part of xml:
namespace
Regards
Nico
http://debeissat.nicolas.free.fr/
2009/7/8 Jim Tivy <jimt@bluestream.com>
Absolutely, see my second
sentence:
"For a number of use
cases I have seen namespaces work. They are integrated in most Xml processors. So they are there already for
free."
As well, we can only
focus on so many things and learn so many things and the lead time on tools
supporting new technolgies is 5 years or more for any kind of saturation.
But at some level, I
applaud the question - can we do better?
From: COUTHURES
Alain [mailto:alain.couthures@agencexml.com]
Sent: Wednesday, July 08, 2009
2:17 PM
To: Jim Tivy; 'Michael Kay'; 'Kurt
Cagle'; 'XML Developers List'
Subject: Re: Do
namespaces address all use cases well
Even though it's always good to think
about how to improve namespaces, how long would we have to wait for such a new
mechanism to be widely available ? Don't we need solutions for today ?
-Alain
Jim Tivy a écrit :
Interesting idea. This is
likely something that has to be addressed in an Xml track. I am not sure
that HTML-5 is even an Xml track?
For a number of use cases
I have seen namespaces work. They are integrated in most Xml processors. So they are there already for free.
But how well they address
all use cases I do not know. I would be interested to hear about use
cases where Xml namespaces fail and rough sketches of better technologies.
Jim
From: Michael
Kay [mailto:mike@saxonica.com]
Sent: Wednesday, July 08, 2009
1:55 PM
To: 'Kurt Cagle'; 'Jim Tivy'
Cc: 'XML Developers List'
Subject: RE: XHTML 2
Working Group won't be renewed?
> 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]
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|