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

Re: RE: Abstraction in Science, Mathematics, Software, and Mar

  • From: "Pete Cordell" <petexmldev@codalogic.com>
  • To: <stephengreenubl@gmail.com>,"Costello, Roger L." <costello@m...>
  • Date: Mon, 14 Mar 2011 10:00:31 -0000

Re:  RE: Abstraction in Science
I've been thinking a little bit about this type of thing lately.

My thoughts are that if you look at, say, a date type such as 2003-12-19,
you have actual values (such as the year 2003) and then some literal values
(such as -).

To mirror the xs:complexType and xs:simpleType in XSD I've been thinking a
good name for a construct that could express this would be xs:compoundType.

Within xs:compoundType I believe you could express the structure of
something like a date using the existing XSD model constructs such as
xs:sequence, xs:choice and xs:all.

For example, the date might be represented as:

<xs:compoundType name="date">
        <xs:value name='year' type='xs:int' format='04d'/>
        <xs:literal value='-'/>
        <xs:value name='month' format='02d'>
                <xs:restriction base='xs:int'>
                    <xs:minInclusive value='1'/>
                    <xs:maxInclusive value='12'/>
        <xs:literal value='-'/>
        <xs:value name='day' format='02d'>
                <xs:restriction base='xs:int'>
                    <xs:minInclusive value='1'/>
                    <xs:maxInclusive value='31'/>

The main additions are the xs:value and xs:literal elements and the format
attribute, which I've taken to be a simplified version of the Java and C
format specifiers.

Another example might be the duration type that would be along the lines of:

<xs:compoundType name='duration'>
        <xs:literal value='P'/>
        <xs:sequence minOccurs='0'>
            <xs:value='years' type='xs:unsignedInt'/>
            <xs:literal value='Y'/>
        <xs:sequence minOccurs='0'>
            <xs:value='months' type='xs:unsignedInt'/>
            <xs:literal value='M'/>
        <xs:sequence minOccurs='0'>
            <xs:value='days' type='xs:unsignedInt'/>
            <xs:literal value='D'/>
        <xs:sequence minOccurs='0'>
            <xs:literal value='T'/>
            <xs:sequence minOccurs='0'>
                <xs:value='hours' type='xs:unsignedInt'/>
                   <xs:literal value='H'/>
            <xs:sequence minOccurs='0'>
                <xs:value='minutes' type='xs:unsignedInt'/>
                <xs:literal value='M'/>
            <xs:sequence minOccurs='0'>
                <xs:value='seconds' type='unsignedFloat'/>
                <xs:literal value='M'/>

This is not an exact definition of duration, but hopefully it gives the
idea!  Also note that, unlike in regular XSD parsing, there are the
equivalent of UPA violations here (i.e. if you parse an integer, which value
does the integer belong to?).  Hence a back-tracking parser would be

Where I see this sort of thing being useful is expressing things like GPS
coordinates or IP addresses in a single value.  I imagine that there are
other domains that have standard notations for what they do, but you
wouldn't want to create a single unified type system that incorporated all
the domain specific notations.


Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using C++ XML
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info

----- Original Message ----- 
From: "Stephen D Green" <stephengreenubl@gmail.com>
To: "Costello, Roger L." <costello@mitre.org>
Cc: <xml-dev@lists.xml.org>
Sent: Sunday, March 13, 2011 10:40 AM
Subject: Re:  RE: Abstraction in Science, Mathematics, Software,
and Markup

> I realise, though, I might have to justify agreeing with
> extensions to WXS / XSD when I was only this month
> profering a slimmed-down 'MicroXSD'. Maybe there is
> a need for conformance profiles as seen in OWL - a 'lite'
> profile, a powerful-but-doable profile and a 'full' profile.
> The suggested extra abstraction feature of types without
> the agregation of concrete elements but with a more
> abstract agregation of other types (albeit some called
> 'crossProducts' - perhaps for backwards compatibility)
> might belong in either a powerful-but-doable profile or
> a 'full' profile depending on the difficulty of incorporating
> the feature into existing tools. [Perhaps something like
> 'MicroXSD' could then provide the 'lite' profile.]
> Best regards
> Stephen D Green
> _______________________________________________________________________
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.
First Name
Last Name
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.