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

better XSD / OWL alignment Re: RE: Abstraction in Science,Math

  • From: Stephen D Green <stephengreenubl@gmail.com>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Mon, 14 Mar 2011 13:56:13 +0000

better XSD / OWL alignment Re:  RE: Abstraction in Science
Pondering this some more I realised there are probable four potential
conformance profiles of XSD here since the parallel with OWL profiles
might be improved if crossProduct the like were made an extension to
XSD:

1. Lite profile - not necessarily parallel to OWL-Lite (perhaps more like
    MicroXSD in order to be useful)

2. The conformance profile most like the current XSD standards

3. An XSD profile which can be converted and/or mapped to OWL-DL
    so that it can actually be put through a reasoner and inferences
    be made (I would imagine a conformance target would be a combo
    of XSD parser and a reasoner, perhaps able to convert XSD to OWL
    then run it through reasoner to get inferences and maybe convert
    those back to XSD so it can tell you more than just valid/invalid)

4. An XSD profile which includes more extensions, say, than just those
    which a combination of XSD parser, heuristics code and reasoner
    can manage, parallel in some ways to OWL-Full so that it can still
    be used for data and semantic modelling even if it cannot be executed

This might make OWL and XSD (WXS) better aligned so that there can be
better roundtripping, say.

----
Stephen D Green



On 14 March 2011 09:14, Stephen D Green <stephengreenubl@gmail.com> wrote:
> There needs to be a way, then, to point elements (and maybe complex
> and simple types) at these crossProducts. Maybe just an attribute added
> to xsd:element called something like 'crossProduct' or maybe something
> more sophisticated like a combination of an element whose type is the
> crossProduct and a substitution group in another element, I haven't thought
> it through...  The simplest might be to see the crossProduct as orthogonal
> to any association between element and its type and just to add a
> 'crossProduct' attribute I think. Hopefully it would allow an 'is-a'
> relationship
> to be defined in a schema between a concrete element and an abstract
> crossProduct which might be very useful in
>
> 1) modelling using the XSD
> 2) defining semantics using the XSD
>
> Maybe we need an initial feasibility study plus a temporary XSD extension
> namespace for the crossProduct element and, maybe, attribute followed
> by perhaps a more premanent namespace if it all proves to be useable. I
> imagine there would be a lot of use for this even without adding anything
> to any future W3C XML Schema standard since the two uses above do not,
> I think, absolutely need anyhting more than a custom extension since tools
> which execute a schema in versions 1.0 and 1.1 perhaps are more for
> validation than modelling or semantics (perhaps the modelling aspects
> could make use of the extension though).
>
> ----
> Stephen D Green
>
>
>
> On 12 March 2011 11:08, Costello, Roger L. <costello@mitre.org> wrote:
>>> I'd add that a 'crossProduct' should be able to include ref's to not just
>>> simpleTypes but also to other crossProducts.
>>
>> Excellent!
>>
>> Yes!
>>
>> /Roger
>>
>>
>> -----Original Message-----
>> From: Stephen D Green [mailto:stephengreenubl@gmail.com]
>> Sent: Saturday, March 12, 2011 6:06 AM
>> To: Costello, Roger L.
>> Cc: xml-dev@lists.xml.org
>> Subject: Re:  RE: Abstraction in Science, Mathematics, Software, and Markup
>>
>> +1
>>
>> I'd add that a 'crossProduct' should be able to include ref's to not just
>> simpleTypes but also to other crossProducts.
>>
>> ----
>> Stephen D Green
>>
>>
>>
>> On 12 March 2011 10:34, Costello, Roger L. <costello@mitre.org> wrote:
>>> Hi Stephen,
>>>
>>>> Are you suggesting or even hinting that it should be possible
>>>> to define a type whose contents are types rather than elements?
>>>
>>> Funny you should ask! Yes!
>>>
>>> A couple weeks ago I pitched that very idea on the xmlschema-dev list:
>>>
>>> --------------------------------------------
>>>           Data Abstraction
>>> Creating a User-Defined Data Type that is a
>>>  Collection of User-Defined simpleTypes
>>> --------------------------------------------
>>>
>>> Decoupling the definition of a simpleType from an element or attribute declaration is very useful. For example, here I define a family name simpleType:
>>>
>>>    <xs:simpleType name="Family-name">
>>>        <xs:restriction base="xs:string">
>>>            <xs:minLength value="1" />
>>>            <xs:maxLength value="100" />
>>>            <xs:pattern value="[a-zA-Z' \.-]+" />
>>>        </xs:restriction>
>>>    </xs:simpleType>
>>>
>>> Now that it is defined, I can declare any number of elements or attributes to be of that type; for example:
>>>
>>>    <xs:element name="Family-name" type="Family-name" />
>>>
>>>    <xs:element name="Surname" type="Family-name" />
>>>
>>>    <xs:element name="Last-name" type="Family-name" />
>>>
>>> That's nice!
>>>
>>> The definition of the user-defined simpleType and the declaration of the elements are completely decoupled. The Family-name simpleType is a reusable data type.
>>>
>>> Suppose I define 2 more simpleTypes. A simpleType for Middle initial:
>>>
>>>    <xs:simpleType name="Middle-initial">
>>>        <xs:restriction base="xs:string">
>>>            <xs:length value="1" />
>>>            <xs:pattern value="[A-Z]+" />
>>>        </xs:restriction>
>>>    </xs:simpleType>
>>>
>>> And a simpleType for Given name:
>>>
>>>    <xs:simpleType name="Given-name">
>>>        <xs:restriction base="xs:string">
>>>            <xs:minLength value="1" />
>>>            <xs:maxLength value="100" />
>>>            <xs:pattern value="[a-zA-Z' \.-]+" />
>>>        </xs:restriction>
>>>    </xs:simpleType>
>>>
>>> Now there are 3 simpleTypes. Collectively, they make up a user-defined "Name" data type.
>>>
>>> Of course, this Name data type is not a simpleType. It is made up of three simpleTypes.
>>>
>>> XML Schema does not have a way to express this so I propose a new capability, <xs:crossProduct>. Here is how to define the Name data type:
>>>
>>>    <xs:crossProduct name="Name">
>>>        <xs:componentType ref="Given-name" />
>>>        <xs:componentType ref="Middle-initial" />
>>>        <xs:componentType ref="Family-name" />
>>>    </xs:crossProduct>
>>>
>>> That defines a data type that is a cross product of 3 simpleTypes.
>>>
>>> Now that it is defined, I can declare any number of elements to be of that data type; for example:
>>>
>>>    <xs:element name="Name" type="Name">
>>>        <xs:element name="First" type="Name.Given-name" />
>>>        <xs:element name="MI" type="Name.Middle-initial" />
>>>        <xs:element name="Last" type="Name.Family-name" />
>>>    </xs:element>
>>>
>>> Here's a different assignment of element names to the data type and its components:
>>>
>>>    <xs:element name="Customer" type="Name">
>>>        <xs:element name="Given" type="Name.Given-name" />
>>>        <xs:element name="MI" type="Name.Middle-initial" />
>>>        <xs:element name="Surname" type="Name.Family-name" />
>>>    </xs:element>
>>>
>>> Here's how the latter would appear in an XML instance document:
>>>
>>>    <Customer>
>>>        <Given>Roger</Given>
>>>        <MI>L</MI>
>>>        <Surname>Costello</Surname>
>>>    </Customer>
>>>
>>> The important thing to notice is that the data type definition is completely decoupled (abstracted) from the assignment of element names to the component fields of the data type.
>>>
>>> To recap: just like xs:simpleType enables the creation of reusable (simple) data types, xs:crossProduct enables the creation of reusable (cross product) data types.
>>>
>>> Comments?
>>>
>>> /Roger
>>>
>>> _______________________________________________________________________
>>>
>>> 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
>>>
>>>
>>
>> _______________________________________________________________________
>>
>> 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]


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.