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

Re: ID's in a document ?

  • From: Robin LaFontaine <robin@m...>
  • To: "'xml-dev@l...'" <xml-dev@l...>
  • Date: Mon, 25 Sep 2000 10:05:07 +0100

dtd unique
As Curt says, XML Schema is the only way to do this, it cannot be 
specified within a DTD. See also discussions "Inserting optional 
elements" last week on this list for some further discussion of this 
issue. NewsML DTD has introduced a "Euid" (element unique id) for 
this purpose: it is just a CDATA or NMTOKEN attribute that is unique 
within the context of the parent element. For repeated items it is 
good practice to have such a 'handle' on the data, as you are 
suggesting, and IMHO it is best to make it required.

Robin


>Hello,
>
>I am new to XML and this list. I found that id's in a xml document
>are have to be unique in the document. But I need an id for a specific
>area (subtree). The XML specification does not describe such a
>posibility.
>
>Is there any solution about this ?
>
>I begun with my workaround, but it is not good to implement that, if
>it is already implemented anywhere.
>
>My Idea for an implementation is this:
>
>On the root of a subtree define an attribute like LOCID pointing to a
>tagname, that must contain such a local id identifer.
>
>In that tag define an IDPTR pointing to an attributename, that should
>be the local id.
>
>Thia can be defined in a dtd file and the parser can handle this
>regardless what type of document is being parsed.
>
>So his may be handled by the sax parser.
>
>Is that possible ?
>
>I hope, my first question is not a bad one :-)
>
>Thanks
>
>Lothar
>
>--------------------------------------------------------
>Lothar Behrens    | Company: lothar.behrens@g...
>Borsteler Bogen 4 |     C++ is the future, LINUX too :-)
>22453 Hamburg     |     have a look at www.wxWindows.org

-- -----------------------------------------------------------------
Robin La Fontaine, Monsell EDM Ltd
(Engineering data exchange and management using XML, R&D Project Management)
Tel: +44 1684 592 144 Fax: +44 1684 594 504
Email: robin@m...       http://www.monsell.co.uk

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.