xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Toren <Rich...@Netprox.com>
Subject RE: how to quickly find an element (by attribute) in a DOM? any h ints appeciated
Date Tue, 23 Jan 2001 09:28:51 GMT
Tom,
   This is from http://www.w3.org/TR/REC-xml#sec-attribute-types
<http://www.w3.org/TR/REC-xml#sec-attribute-types>  .  The xslt
specification also calls for using an unique id.  
 
------------------------

idValidity constraint: ID

Values of type ID must match the  <http://www.w3.org/TR/REC-xml#NT-Name>
Name production. A name must not appear more than once in an XML document as
a value of this type; i.e., ID values must uniquely identify the elements
which bear them.

one_id_per_elValidity constraint: One ID per Element Type

No element type may have more than one ID attribute specified.

id_defaultValidity constraint: ID Attribute Default

An ID attribute must have a declared default of #IMPLIED or #REQUIRED.

------------------------

-----Original Message-----
From: Thomas B. Passin [mailto:tpassin@mitretek.org]
Sent: Monday, January 22, 2001 8:28 PM
To: general@xml.apache.org
Subject: Re: how to quickly find an element (by attribute) in a DOM? any
hints appeciated



Actually, it's not an error to declare an element twice. The first
declaration wins and the later one(s) are ignored.  However, in this case it
may not give the intended result.
 
Tom Passin
 
Richard  <mailto:Richard@Netprox.com> Toren wrote -

To: 'general@xml.apache.org' <mailto:'general@xml.apache.org'>  
Sent: Sunday, January 21, 2001 5:32 AM
Subject: RE: how to quickly find an element (by attribute) in a DOM? any
hints appeciated


Hello,
   I looked at your DTD with the help of xmlspy and it was brought to my
attention that  you have the <!ELEMENT event ..... > defined twice.  This is
probably unintentional, but definitely is an error.  Secondly, I think that
a valid ID must start with an alpha and that no two nodes share the same id.
Now to your question:
 
 


Mime
View raw message