Re: [xml] language-lawyer question: namespace precedence rules for attributes?



On Tue, Mar 18, 2003 at 01:19:37AM -0500, Craeg K Strong wrote:
I get the following result:

<result xmlns:ns1="http://some-ns/"; ns1:foo="baz" ns1:bar="baz" 
ns1:yow="baz" ns1:mum="baz" ns1:zip="baz" ns1:zap="baz"/>

In other words
1- the *first* prefix for a duplicated namespace wins

  This is just to avoid namespace duplication. If you really want
a prefix, make sure that prefix is in scope before generating the
attribute.

2- the *last* value for a duplicated attribute wins

  pure lazyness. In the absence of guideline, cheapest code wins.

This seems fairly reasonable, but I can't find any basis in the W3C spec 
for heuristic #1.    
Can anyone offer me any pointers as to the letter of the W3C law on this 
point?

  No if there is I'm interested.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]