OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Repeating attribute specifications

[ Lists Home | Date Index | Thread Index ]
  • From: Bill Donoghoe <bdonoghoe@spin.net.au>
  • To: xml-dev@ic.ac.uk
  • Date: Thu, 12 Jun 1997 09:12:31 +1000 (EST)

Hello,
        I believe the answer to the question appears in Section 3.3 of the
XML syntax spec

When more than one AttlistDecl is provided for a given element type, 
the contents of all those provided are merged. When more than
one definition is provided for the same attribute of a given 
element type, the first declaration is binding and later declarations are
ignored.
For interoperability, writers of DTDs may choose to provide at most 
one attribute-list declaration for a given element type, and at most
one attribute definition for a given attribute name. An XML processor 
may, at user option, issue a warning when more than one
attribute-list declaration is provided for a given element type, or 
more than one attribute definition for a given attribute, but this is not an
error. 

        Therefore, in the DTD you can have multiple attribute list declarations 
for an element (even multiple declarations of the same attribute).  However, in
XML documents an attribute can only occur once inside a start tag.


Example:

In the DTD the following is valid but the second declaration of the attribute
role will be ignored.

<!element person  (name, details) >
<!attlist person  role     CDATA #IMPLIED 
                  location CDATA #REQUIRED >
<!attlist person  phone    CDATA #REQUIRED
                  role     (author, designer, manager, builder) "author" >

The SGML (before the changes from the HyTime T.C. flow through) equivalent is:

<!attlist person role     CDATA #IMPLIED 
                 location CDATA #REQUIRED
                 phone    CDATA #REQUIRED >  
 
At 09:03 11/06/97 -0700, you wrote:
>See Section 3.1 Start and End Tags
>
>	Validity Constraint - Unique Att Spec:
>
>	No attribute may appear more than once in the same start-tag.
>
>> -----Original Message-----
>> From:	Richard Light [SMTP:richard@light.demon.co.uk]
>> Sent:	Wednesday, June 11, 1997 4:55 AM
>> To:	xml-dev@ic.ac.uk
>> Subject:	Repeating attribute specifications
>> 
>> Hi,
>> 
>> Is there anything in the XML spec which corresponds to the SGML
>> stricture that "there can only be one attribute specification for each
>> attribute definition", i.e. that you can't have repeated attribute
>> specifications within a single start-tag?  
>> 
>> If not, XML will allow e.g.
>> 
>> <person ROLE="author" ROLE="designer">
>> 
>> while SGML won't.  Which would be a 'for compatibility' issue.
>> 
>> Richard Light
>> SGML and Museum Information Consultancy
>> richard@light.demon.co.uk
>> 3 Midfields Walk 
>> Burgess Hill
>> West Sussex RH15 8JA
>> U.K.
>> tel. (44) 1444 232067
>> 
>> xml-dev: A list for W3C XML Developers
>> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
>> To unsubscribe, send to majordomo@ic.ac.uk the following message;
>> unsubscribe xml-dev
>> List coordinator, Henry Rzepa (rzepa@ic.ac.uk)
>
>xml-dev: A list for W3C XML Developers
>Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
>To unsubscribe, send to majordomo@ic.ac.uk the following message;
>unsubscribe xml-dev
>List coordinator, Henry Rzepa (rzepa@ic.ac.uk)
>
>
>
Bill Donoghoe                      email: bdonoghoe@acslink.net.au
Systems Analyst & SGML Consultant   
"Do you want some information or all of the data?" 


xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS