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

Re: IDs without DTD/Schema , Is there a way ?

  • From: Ronald Bourret <rpbourret@r...>
  • To: BigBoss <dianda@s...>
  • Date: Thu, 25 Oct 2001 01:34:48 -0700

dtd ids
There are only two ways to determine if an attribute is an ID attribute:

1) From a DTD or XML Schema
2) The attribute name is hard-coded in your application

You cannot just look at an attribute and decide if it is an ID
attribute. For example, there is no way to tell if the following
attribute is an ID attribute:

   <foo name="bar" />

All you know from the XML document is that the name of the attribute is
"name" and the value of the attribute is "bar".

-- Ron

BigBoss wrote:
> 
> Greetings, we have a little problem with ID, we need to identify the IDs
> in an XML Document but not always we got a DTD or a Schema to work with,
> I include the original question of a friend of mine (little more
> technical and platform dependent)
>                                         Thanks
>                                           fd
> --
> // Fabio Dianda             dianda@s...
> // Free Speech             w3c patent policy [expletive deleted]
> // Free advertising                   www.ntop.org
> 
> ---------- Forwarded message ----------
> Date: Wed, 24 Oct 2001 18:19:03 +0200
> From: Mauro Arcolini <arcolini@s...>
> To: BigBoss <dianda@s...>
> Subject: Xerces-J
> 
> Hi,
> I have a problem with xml Document retrieve function using Xerces-J
> dom package. After parsing without validating, i must to retrieve an
> element with a specific attribute(of type ID) value. It don't seems a
> good idea to traverse all attributes list of each element in document
> object to retrieve the element. Is exists an other way in DOM? Maybe in
> Sax model?
> 
> --
> Mauro Arcolini
> Universita' degli studi di Pisa Italy
> 
> --> member of GAPXSE, a students group from:
>     Nicchia sicurezza reti di computer 2000/2001
>     Dipartimento di Informatica
> --> current project: Java Api for XMLDSIG
> --> mail: arcolini@s...
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this elist use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>

-- 
Ronald Bourret
Programming, Writing, and Training
XML, Databases, and Schemas
http://www.rpbourret.com

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.