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

Re: Some questions about xml:id


xml id
> This is already true for DTD-declared IDs: they have type ID even if
> they are not valid.

Okay, this makes sense...

> Also, in plain XML, for a given element name, all attributes with the same
> name have the same type.  Some APIs don't have a way to return different
> types for a given attribute depending on its value.

I am not sure I understand the implication?

> I expect they will continue to do what they do now with invalid
> DTD-declared IDs.

Right, sounds good.

>>  <?xml version="1.0"?>
>>  <!DOCTYPE root [
>>    <!ELEMENT root EMPTY>
>>    <!ATTLIST root
>>      id ID #IMPLIED>
>>  ]>
>>  <root id="ID1" xml:id="ID2"/>
> 
> Not an xml:id error.  It will of course give you a validity error if
> you validate it.

Just so I am clear, the validity error that should be raised is 
undeclared attribute right? Or should you get two validity errors-- 
undeclared attribute and One Id per Element Type? I think the former 
(only undeclared attribute) is correct and not the latter-- as the 
xml:id isn't declared and that is where the VC is applied.

This brings up one additional question which I didn't think of before, 
though I am pretty sure I know the answer:

Does VC: ID Attribute default have any relevance here? I think not-- 
again xml:id has no relevance unless the xml:id is declared in the DTD-- 
in which case a document where an xml:id was declared with a default 
value would produce a validity error, nothing more. Right?

> You're right.  My guess is that the only reason it's not mentioned is
> that the editor was only thinking about conformance to the basic
> infoset when he wrote section 7.

I will send this as a comment to the public comments list so that the WG 
can address it (either as you have, or by adding the additional infoset 
item).

Thanks,
Jeff Rafter

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.