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

Re: Internal subset equivalent in new schema proposals?

  • From: <david@m...>
  • To: <xml-dev@i...>
  • Date: Thu, 26 Nov 1998 10:53:38 -0500 (EST)

tess megginson
Michael Kay writes:

 > Rather my complaint was about things that I'd like to do in the
 > data interchange world but can't. As Ron says, I can't do data
 > typing in XML 1.0, and Paul's explanation doesn't alter the fact.

XML is a metalanguage for defining markup languages: in the markup
languages that you define with it, you can do any sort of data typing
you want:

<class id="person">
  <name>Person</name>
  <inherits-from>Object</inherits-from>
  <member type="primitive">
   <name>name</name>
   <type>string</type>
   <max>24</max>
  </member>
  <member type="primitive">
   <name>age</name>
   <type>int</type>
  </member>
</class>

<object class-id="person">
  <member name="name">David Megginson</member>
  <member name="age">34</member>
</object>

<object class-id="person">
  <member name="name">Tess Megginson</member>
  <member name="age">3</member>
</object>

Your complaint is not that XML does not support data typing, but that
generic XML parsing tools do not enforce the kind of data typing that
you need out of the box.  One of the reasons for this is that
everyone's requirements are different; I might want

  <name type="city">Kingston</name>

where the type is enforced to be the name of a city that is currently
in my database.  Someone else might want

  <subject type="LC">BS</subject>

where the contents must be a Library of Congress subject.

That said, many people believe that there might be a small set of
data-typing primitives that have enough usefulness that they should be
standardised across all XML implementations rather than being defined
separately for each XML-based markup language.  As Paul (I think) has
pointed out, the document people can use these just as easily as the
data people can.

By the way, the XML 1.0 spec does include at least one data-typing
attribute, 'xml:lang'.


All the best,


David

-- 
David Megginson                 david@m...
           http://www.megginson.com/

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


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.