W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > May 1997

Re: SD3 - Data Types

From: Matthew Fuchs <matt@wdi.disney.com>
Date: Fri, 16 May 97 10:24:35 PDT
Message-Id: <199705161724.KAA18205@scrumpox.rd.wdi.disney.com>
To: jeanpa@microsoft.com (Jean Paoli)
Cc: w3c-sgml-wg@w3.org
Unless the same element may have different datatypes in the same
document, you would probably be better off defining entities declaring
the appropriate attributes and then just include those in attribute
lists for the corresponding elements.  The XML-TYPE attributes could
be declared as fixed and not need to clutter up your document, and
your structured attribute example would be unnecessary (if xml-size is
declared fixed for MANF-CODE as 12 it could be removed from the
instance).

Since this information needs to be sent one way or another, there is
little overhead associated with sending it as a DTD fragment.

Without questioning the importance of this issue, it strikes me as
much more an application issue than an XML one.

Matthew Fuchs
matt@wdi.disney.com

> 
> SD3 - Data Types
> -------------------------------
...
> <!ELEMENT VARCHAR (#PCDATA)>
> 	<!ATTLIST CHAR XML-MAXSIZE CDATA> 
> 
> <!ELEMENT CHAR (#PCDATA)>
> 	<!ATTLIST CHAR 
> 				XML-MAXSIZE CDATA 
> 				XML-SIZE CDATA #IMPLIED >
....
> 
> Here is an example of data types in action:
> 
> <LINEITEM XML-ID="L1">
> 	<NAME>I, the Jury</NAME>
> 	<AUTHOR>Spillane, Mickey</AUTHOR>
> 	<PRICE xml-type="DECIMAL">2.95</PRICE>
> 	<PUBLICATION-DATE xml-type="DATE">19470101</PUBLICATION-DATE>
> 	<MANF-CODE><*xml-type xml-size=12>CHAR</>451-AE1396 </MANF-CODE>
> 	</LINEITEM >
> 
Received on Friday, 16 May 1997 13:23:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:26 UTC