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

Re: Datatypes - it's in the contract

  • To: xml-dev@l...
  • Subject: Re: Datatypes - it's in the contract
  • From: "Wayne Steele" <xmlmaster@h...>
  • Date: Mon, 30 Sep 2002 13:35:26 -0700
  • Bcc:

Re:  Datatypes - it's in the contract
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@n...>
>To: xml-dev@l...
>Subject: Re:  Datatypes - it's in the contract
>Date: Sun, 29 Sep 2002 06:02:25 +0000
>
>John Cowan <jcowan@r...> 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


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.