[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

xml prefix


xml prefix
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
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.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.