Scott Can the construct "disjointWith" be used to separate male and female at the schema level be an alternate modeling choice? Thanks Narsim Ganti
[EMAIL PROTECTED] -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Henninger Sent: Monday, November 03, 2008 7:06 PM To: TopBraid Composer Users Subject: [tbc-users] Re: XML Schema Import - How it handles the <xs:choice> compositor I have some questions on whether you want your choice to be among schema definitions or instances. If you define this as a choice amongst instances, then the instances would be in an instances file an you define a schema such as the following: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="Person"> <xs:complexType> <xs:choice> <xs:element name="hasGender" type="GenderType" /> </xs:choice> </xs:complexType> </xs:element> <xs:complexType name="GenderType" /> </xs:schema> This will be interpreted by Composer by creating a class Person which is restricted to members that have an instance of hasGender whose value is from the class Gender. You would then create 'Male' and 'Female' as instances of Gender. Note when this is converted to OWL that the Person subClassOf restriction states that there can only be 1 instance (cardinality) and that the instance must be from the class Gender (someValuesFrom). This gives a clean separation between the schema definition and the data that defines the choices. -- Scott On Nov 3, 2:42 pm, SemanticsQuest <[EMAIL PROTECTED]> wrote: > Hello, all. > > I am running TBC ver-2.6.2 on top of Eclipse ver-3.4. > > Consider the following XML Schema. > > <?xml version="1.0" encoding="UTF-8"?> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > elementFormDefault="qualified" attributeFormDefault="unqualified"> > <xs:element name="Person"> > <xs:complexType> > <xs:choice> > <xs:element name="Male" type="MaleType" /> > <xs:element name="Female" type="FemaleType" /> > </xs:choice> > </xs:complexType> > </xs:element> > > <xs:complexType name="MaleType" /> > <xs:complexType name="FemaleType" /> > </xs:schema> > > The TBC XML Schema import engine produces the following OWL ontology: > > <?xml version="1.0"?> > <rdf:RDF > xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" > xmlns:xsd="http://www.w3.org/2001/XMLSchema#" > xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" > xmlns:owl="http://www.w3.org/2002/07/owl#" > xmlns="http://www.owl-ontologies.com#" > xml:base="http://www.owl-ontologies.com"> > <owl:Ontology rdf:about=""> > <owl:versionInfo rdf:datatype="http://www.w3.org/2001/ > XMLSchema#string" > >Created with TopBraid Composer from the XML Schemahttp://www.owl-ontologies.com</owl:versionInfo> > </owl:Ontology> > <owl:Class rdf:ID="Female"/> > <owl:Class rdf:ID="Male"/> > <owl:Class rdf:about="http://www.w3.org/2001/XMLSchema#Any"/> > <owl:Class rdf:ID="Person"> > <rdfs:subClassOf> > <owl:Restriction> > <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/ > XMLSchema#int" > >1</owl:maxCardinality> > <owl:onProperty> > <owl:ObjectProperty rdf:ID="hasFemale"/> > </owl:onProperty> > </owl:Restriction> > </rdfs:subClassOf> > <rdfs:subClassOf> > <owl:Restriction> > <owl:allValuesFrom rdf:resource="#Female"/> > <owl:onProperty rdf:resource="#hasFemale"/> > </owl:Restriction> > </rdfs:subClassOf> > <rdfs:subClassOf> > <owl:Restriction> > <owl:maxCardinality rdf:datatype="http://www.w3.org/2001/ > XMLSchema#int" > >1</owl:maxCardinality> > <owl:onProperty> > <owl:ObjectProperty rdf:ID="hasMale"/> > </owl:onProperty> > </owl:Restriction> > </rdfs:subClassOf> > <rdfs:subClassOf> > <owl:Restriction> > <owl:allValuesFrom rdf:resource="#Male"/> > <owl:onProperty rdf:resource="#hasMale"/> > </owl:Restriction> > </rdfs:subClassOf> > </owl:Class> > </rdf:RDF> > > The XML Schema's "Person" definition specifies a choice between a > "Male" and "Female". For an XML instance document to validate against > this schema, a "Person" element must contain either a "Male" element > or a "Female" element, but not both. > > It appears the TBC-generated ontology's "Person" class does not > capture this. According tohttp://www.w3.org/TR/owl-guide/, "class > definitions have multiple subparts that are implicitly conjoined, and > the following example is provided. > > <owl:Class rdf:ID="Wine"> > <rdfs:subClassOf rdf:resource="&food;PotableLiquid"/> > <rdfs:subClassOf> > <owl:Restriction> > <owl:onProperty rdf:resource="#madeFromGrape"/> > <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">1</ > owl:minCardinality> > </owl:Restriction> > </rdfs:subClassOf> > ... > </owl:Class> > > I interpret "implicitly conjoined" as a union set operation. It my > interprepation is accurate, then the preceding "Person" class allows a > Person individual to contain both Male and Female individuals on its > "hasMale" and "hasFemale" properties, respectively, which clearly > violates the intent of the "Person" XML Schema definition. > > Is my assessment correct? If so, how can one best semantically > represent an XML Schema choice compositor within an OWL-DL ontology? > > Thank you. > > Regards, > > Anthony DISCLAIMER: E-mail Confidentiality/Proprietary Notice: The information contained in this transmission may be proprietary and subject to protection under the law. The message is intended for the sole use of the individual or entity to whom it is addressed. If you are not the intended recipient, you are notified that any use, distribution or copying of the message is strictly prohibited. If you received this transmission in error, please contact the sender immediately by replying to this e-mail and delete the material from any computer. Thank you. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/topbraid-composer-users?hl=en -~----------~----~----~----~------~----~------~--~---
