illegal namespace usage

Lisa Rein lisarein at finetuning.com
Tue Aug 10 01:51:54 BST 1999


Simon St.Laurent wrote:

> I've concluded that namespaces itself is a great idea.  I've also concluded
> that integrating it with XML 1.0 in any reliable way is pretty much
> impossible.  

Please explain this statement. Namespaces are already in use all over
the place-- the implementation-specific behavior of among different
processors might vary,  but the integration of namespaces w/XML ver 1.0
doesn't appear to be "impossible", and certainly isn't the culprit for
the inconsistencies between the different "namespace aware"
applications.   
-- XSL and XSLT namespaces are currently being used all the time
-- HTML namespaces are being "used reliably" in IE5 
-- Even RSS's erroneous RDF namespace declaration does nothing reliably 
every time :-)


Simon St.Laurent wrote:
> Section 5.3, Uniqueness of Attributes, makes it
>  > illegal to have two attributes for an element that have identical
>  > qualified names, never mind the prefixes.
>  > 
>  > How should XML processors handle these errors? 

they should "break", and give error messages like any other error.  It
sounds like the document in question would be violating both XML v 1.0
Rec and the Namespace Rec...

what other behavior did you have in mind?  it's probably an oversight or
a typo in the document more than (what could amount to) an intentional
design flaw someone had intentionally integrated into their syntax --
you're not doing anyone a favor looking the other way.

There's probably a better, less-ambiguous, more descriptive name for
that attribute's second occurrence (within the same element)
or, maybe that piece of as-yet-unaccounted-for information is a hint you
should place that value as an attribute of another nested element.

either way, whatever you're trying to do, ambiguity isn't going to help
you.  That "no duplicate attribute names within the same element rule"
just seems like a good "rule of thumb".    i think that's all the specs
are trying to say there.  (although i'm feeling very foolish now for
attempting to speak for the editors of either recommendation :-)  

 Is the uniqueness
>  > of attributes issue equivalent to the XML 1.0 ban on attributes
>  > with the same name (section 3.1), or is it totally outside of that
>  > realm?  

yes i bet it's the same ban on the same bad idea for similar reasons.

Maybe the editors were just trying to save us all from our own bad
design :-)

the suspense is killing me,


lisa

(feeling really foolish at this point)

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list