OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   xml prefix

[ Lists Home | Date Index | Thread Index ]

I'm implementing a simple/stupid bit of code for tracking xml:base,
xml:lang, and xml:space, and attempting to keep it generic enough to
support other similarly scoped attribute values should they appear.

I already have code for dealing with scoped name-value pairs, having
dealt with namespace declarations previously.  My only remaining
question is whether it is wiser to treat these names:

xml:base
xml:space
xml:lang

as "just names", or as QNames, using some lexical representation like:

{http://www.w3.org/XML/1998/namespace#base}
{http://www.w3.org/XML/1998/namespace#space}
{http://www.w3.org/XML/1998/namespace#lang}

There are two reasons for my concern.  The first (and simpler) is that
it is possible that someone else will want to create scoped attribute
values in a namespace other than the W3C's reserved namespace.  The
pattern is out in public.

My second concern is with this case:

<myDoc xmlns:foo="http://www.w3.org/XML/1998/namespace";
       foo:base="http://example.com";
       foo:space="preserve"
       foo:lang="en"  />

Does anyone know if that can be treated as equivalent to:

<myDoc 
       xml:base="http://example.com";
       xml:space="preserve"
       xml:lang="en"  />

The 'foo' version is definitely not specified, but I see no prohibitions
on this form in:
http://www.w3.org/TR/REC-xml-names/
http://www.w3.org/TR/2001/REC-xmlbase-20010627/
http://www.w3.org/TR/2000/REC-xml-20001006

On the other hand, the namespace errata state:
"The xml namespace could work like any other, were it not that the
xml:space and xml:lang attributes are required to use that prefix, but
it was considered too confusing to allow anything more than declaring it
normally." - http://www.w3.org/XML/xml-names-19990114-errata , NE05
 
This feels like a stronger statement to me than anything in XML 1.0
itself, and I'm not sure it applies to XML Base in any case.

I remember prior discussion on this subject, but can't find it in
searches.  My current plan is to implement the URI+localname expansion
internally, but sorting out the process that will feed that requires
figuring out how precisely these relationships are supposed to work.



-- 
Simon St.Laurent
Ring around the content, a pocket full of brackets
Errors, errors, all fall down!
http://simonstl.com -- http://monasticxml.org




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS