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

 


Help: OASIS Mailing Lists Help | MarkMail Help

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

RE: [xml-dev] Re: determining ID-ness in XML



From: Elliotte Rusty Harold"

>The uniqueness comes out of the need to link to something, but more than
anything else what we need is the way to link to it. It would not 
>be a disaster if instead of xml:id we had a potentially non-unique xml:name
that could still be linked to. As is the case with XPath based 
>XPointers, such a link might point to multiple discontiguous nodes. So
there are good reasons to want xml:name/xml:id to have a unique value
>within a document.

Yes.  Namelocs, etc.  Not a new problem.  What I am looking for is an 
explicit requirements statement so we have something better than, "oopsie:
see rec".

****************************************************************************
*****************************************

Problem: XML processors have no reliable means to declare link targets for
processing in applications that 
do not use standard means to declare and validate XML primitive ID types.

1. The SOAP specification has deprecated one XML 1.0 means (DTDs) provided
to reliably process XML ID types.  
Schemas are available but not preferred by some. 

2  XML application languages such as XHTML and RDF have specified
alternative means to declare unique IDs. 

3  The standard means, DTD and XML Schema, are not efficient when
serializing. 

4. The alternative standard means, processing instructions, has been
rejected for lack of popularity  

NOTE:  1, 2 and 4 reveal flaws in the W3C specification process.  Item 3 is
the engineering 
problem that drives the requirement for the problem statement.

Requirement:  a system vocabulary that enables cross-document linking to be
declared and validated such 
that the linking function works reliably without the need to use formal
declarations for values 
which must be known prior to accessing the link target.

Required by:  

XML XPointers. [Others?]

Proposed Approaches:  Given these, which is most effective at resolving
XPointers 
in a serialization?

1. Tim Bray:

Move type name into instance.   Reserve a colonized name (xml:id) in the XML
system namespace to 
name an ID type. 
 
Advantage: direct and makes minimal change to XML specification.  
Disadvantage: conflicts with application language ID declarations now
fielded.

2. James Clark: 

Move type declarations into instance.  Reserve a colonized name (xml:idatt)
to declare a named attribute 
value as being of ID type. 

Advantage:  doesn't break existing application language conventions.  
Disadvantage:  mixes declarative and instance language.  

Q:  Why is this better than DTD or Schema?  Implementation in
object-oriented software 
is straightforward via inheritance.  Not a traditional approach to
requirements, 
but aspects that legislate system requirements usually consider
implementation 
over generality.  Like namespaces with URIs, it's a working solution.

3. Joe English:  

Process a link with a document processing function instead of relying on
local 
declarations using system types.

    document("http://somewhere/something")
	/ descendants-or-self::*[attval::*[local-name() = 'id'] = 'foo'][1]

Advantage:  reliable even if the document is edited.  
Disadvantage:  pushes declaration into external language. 

I personally prefer 2.  If you have to keep building up the system 
vocabulary to cover the XML oopsies (IDs minus declarative machinery 
is an olde iso 10744 topic), make it flexible.

len