From Richard@Netprox.com Tue Jan 23 09:28:14 2001 Return-Path: Mailing-List: contact general-help@xml.apache.org; run by ezmlm Delivered-To: mailing list general@xml.apache.org Received: (qmail 24418 invoked from network); 23 Jan 2001 09:28:14 -0000 Received: from unknown (HELO athena.NETPROX.COM) (212.150.164.50) by h31.sny.collab.net with SMTP; 23 Jan 2001 09:28:14 -0000 Received: by athena.NETPROX.COM with Internet Mail Service (5.5.2650.21) id ; Tue, 23 Jan 2001 11:28:52 +0200 Message-ID: <63D58FB2143B3F48AA7FCFD7DBB61C646A1F@athena.NETPROX.COM> From: Richard Toren To: "'general@xml.apache.org'" Subject: RE: how to quickly find an element (by attribute) in a DOM? any h ints appeciated Date: Tue, 23 Jan 2001 11:28:51 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C0851E.E5C40D10" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N ------_=_NextPart_001_01C0851E.E5C40D10 Content-Type: text/plain; charset="iso-8859-1" Tom, This is from 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 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 Toren wrote - To: '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 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: ------_=_NextPart_001_01C0851E.E5C40D10 Content-Type: text/html; charset="iso-8859-1"
Tom,
   This is from http://www.w3.org/TR/REC-xml#sec-attribute-types .  The xslt specification also calls for using an unique id. 
 
------------------------

Validity constraint: ID

Values of type ID must match the 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.

Validity constraint: One ID per Element Type

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

Validity 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
 
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:
 
 
------_=_NextPart_001_01C0851E.E5C40D10--