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

Re: DTDs don't have ID or IDREF elements so why does XMLSchema

  • From: Peter Flynn <peter@silmaril.ie>
  • To: xml-dev@lists.xml.org
  • Date: Wed, 2 Mar 2022 10:55:11 +0000

Re:  DTDs don't have ID or IDREF elements so why does XMLSchema
On 01/03/2022 23:52, Michael Kay wrote:
Orthogonality, or to put it another way, avoiding arbitrary restrictions. If ID and IDREF are going to be among your set of data types, then why would you want to disallow people from using them on elements.
It's part of the way some people view XML. I struggle to find any use case for using ID or IDREF on elements. In fact, I would argue that adding an ID or IDREF attribute to an element type *is* "using it on elements".

(Personally, I would have made "IDness" and "IDREFness" properties that are orthogonal to type. I can't see any good reason for
disallowing IDs of type integer or date.
If we accept IDs must be unique within the document, I have encountered many reasons, such as "integers" that aren't (ie leading zeroes), and dates that turn out later to need multiple occurrences.

But the SGML and DTD legacy weighed strongly on the XSD designers.)
I am very glad they did.

Peter

On 1 Mar 2022, at 23:32, Roger L Costello <costello@mitre.org> wrote:

Hi Folks,

DTD only allows attributes to be of type ID and IDREF.

XML Schema allows both attributes and elements to be of type ID and IDREF. Why? Is there a compelling use case for declaring an element to be of type ID? Is there a compelling use case for declaring an element to be of type IDREF?

/Roger

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php


_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

--
Peter Flynn
Cork 🇮🇪 Ireland 🇪🇺


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.