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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Datatypes - it's in the contract

[ Lists Home | Date Index | Thread Index ]

The closest you can come is by using the same trick XML Namespaces uses to 
specify the namespace of an attribute: By adding another attribute.

External Unparsed Entities can be viewed as a named association between a 
URI and a Notation. Since we all know that a URI can represent nearly 
anything, you simply devise a representation of the "sibling attribute named 
xxx" concept.

<!ENTITY bar-is-a-string SYSTEM "URI:LOCAL-ATTRIBUTE:bar" NDATA STRING>
<!ENTITY bar-is-a-int    SYSTEM "URI:LOCAL-ATTRIBUTE:bar" NDATA INT>
<!ENTITY bar-is-a-float  SYSTEM "URI:LOCAL-ATTRIBUTE:bar" NDATA FLOAT>
<!ATTLIST foo
          bar  CDATA #IMPLIED
          local_types ENTITIES #IMPLIED
          >

This, admittedly, is a declaration-heavy mechanism, and somewhat of a hack.

-Wayne Steele


>From: Arjun Ray <aray@nyct.net>
>To: xml-dev@lists.xml.org
>Subject: Re: [xml-dev] Datatypes - it's in the contract
>Date: Sun, 29 Sep 2002 06:02:25 +0000
>
>John Cowan <jcowan@reutershealth.com> wrote:
>| Jeni Tennison scripsit:
>
>|> I gather that you couldn't use notations to specify the type of
>|> attributes?
>|
>| Not any way I know of.
>
>Not in XML.  But it's possible in SGML, using the DATA declared value.
>
>   <!ATTLIST foo
>             bar  DATA baz  #IMPLIED
>             >
>
>where the DATA keyword is followed by the name of a declared notation.
>



_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com





 

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

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