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

schema output for critique

  • From: Andy Dent <dent@o...>
  • To: xml-dev@i...
  • Date: Sun, 6 Jun 1999 06:01:19 +0800

la dent sch ma
The context of this is that we needed to finish a local contract in a 
hurry that involved reading and writing entire report definitions as 
well as data. The data had to come back in with a schema very close 
to the original (ie: data types such as date & int preserved) because 
the report-writer preview window also allows in-place editing of 
content.

I therefore took a few minor shortcuts from the XML Schema working 
draft. My major concerns are:
1) nested scope of names eg: how to handle Value used within Order as 
an integer and within Employee as a string. (uggh, horrible example I 
know)

2) masking for date types - the lexical suggestions don't seem to go 
far enough in allowing arbitrary letter separators.

Am I being silly in writing outpu datatypes for those we use which 
match the MS XML Data standard?

The following annotated sample gives an idea of what our output looks 
like, more examples at 
<ftp://ftp.highway1.com.au/pub/adsoftware/xml/reportOutput/> and I'm 
really interested in having them criticised.

<?xml version='1.0' standalone='yes'?>
<report ID='1'>

<!-- embedded schema
      The following is based largely on the XML Schema working group draft
      http://www.w3.org/TR/xmlschema-1/ with our own datatypes
      (eg: ui2) defined below being compatible with Microsoft's data
      types in XML-Data, except format of date, time etc. defined in
      http://msdn.microsoft.com/xml/schema/reference/datatypes.asp

      Our dbFields are <elementType>s nested within the <elementType> of
      the table, rather than the MS approach of declaring an <elementType>
      then using an IDRef in the <element> type attribute. This was partly
      to speedup development of our first release of schema parsing and
      partly because our database, like most others, allows field names
      to be reused within the local scope of a table and

       We use length attributes in the <datatype> to indicate string
       and base64 fixed length fields following the facets discussed in
       http://www.w3.org/TR/xmlschema-2/
-->
   <schema
       xmlns:dt='http://www.w3.org/xmlschemas/datatypes'>
       <datatype name='ui2'>
          <basetype name='dt:integer'/>
          <minInclusive>0</minInclusive>
          <maxInclusive>65,535</maxInclusive>
       </datatype>
       <datatype name='i2'>
          <basetype name='dt:integer'/>
          <minInclusive>-32,768</minInclusive>
          <maxInclusive>32,767</maxInclusive>
       </datatype>
       <datatype name='ui4'>
          <basetype name='dt:integer'/>
          <minInclusive>0</minInclusive>
          <maxInclusive>4,294,967,295</maxInclusive>
       </datatype>
       <datatype name='i4'>
          <basetype name='dt:integer'/>
          <minInclusive>-2,147,483,648</minInclusive>
          <maxInclusive>2,147,483,647</maxInclusive>
       </datatype>
       <datatype name='double'>
          <basetype name='dt:real'/>
          <minInclusive>1.7E-308</minInclusive>
          <maxInclusive>1.7E308</maxInclusive>
       </datatype>
       <datatype name='date'>
          <basetype name='dt:integer'/>
          <minInclusive>0</minInclusive>
          <maxInclusive>4,294,967,295</maxInclusive>
       </datatype>
       <datatype name='dateTime'>
          <basetype name='dt:integer'/>
          <minInclusive>0</minInclusive>
          <maxInclusive>4,294,967,295</maxInclusive>
       </datatype>
       <datatype name='time'>
          <basetype name='dt:integer'/><minInclusive>0</minInclusive>
          <maxInclusive>65,535</maxInclusive>
       </datatype>


       <elementType name='dbStudents'>
          <elementType name='Last_Name'>
             <datatypeRef name='string' length='25'/>
          </elementType>
          <elementType name='First_Name'>
             <datatypeRef name='string' length='15'/>
          </elementType>
       </elementType>
    </schema>

Andy Dent BSc MACS AACM, Software Designer, A.D. Software, Western Australia
OOFILE - Database, Reports, Graphs, GUI for c++ on Mac, Unix & Windows
PP2MFC - PowerPlant->MFC portability
http://www.oofile.com.au/

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/ and on CD-ROM/ISBN 981-02-3594-1
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.