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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   schema output for critique

[ Lists Home | Date Index | Thread Index ]
  • From: Andy Dent <dent@oofile.com.au>
  • To: xml-dev@ic.ac.uk
  • Date: Sun, 6 Jun 1999 06:01:19 +0800

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@ic.ac.uk
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@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

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

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