Jeff; The first step may be to make sure you're aware of how Semantic XML works (Help > Import and Export > Creating, Importing, Querying, Saving XML documents with Semantic XML).  The second is that I'm assuming the use of a SPARQLMotion script to do the transformations. 

So a direct answer to how "to get TBC to spit out an xsd file without using the xsd exporter" is to write a script that uses sml:ConvertRDFToXML and returns that text or saves it in a file.  That is also the answer to "is there a way to get TBC to spit out xml from an sxml based owl model?".

Note that XSD and XML are being created the same way.  The basic difference is using sxml.rdf vs. sxsd.rdf for creating the different tags.  You may also find the attached script useful, as it will create a complex type for each class definition in any model and includes the owl:oneOf to xsd:enumeration transformation I did earlier.  This is an example of what I mean that you can fine tune this to meet your needs.  The basic principle is the RDF structure in Semantic XML and providing the transforms that put your RDF into that format so you can run
sml:ConvertRDFToXML and get the xsd formatted the way you want it.

If you really want to get deep into this, have a look at the XML SchemaPlus Specification (http://xspl.us/xsp-spec.html).  This gets really deep into the complexities of RDF/OWL to XSD conversions.  Basically it defines extensions to XSD to make transformations between RDF/OWL and XSD easier.  This is a bit more than our current out-of-box XSD exporter currently addresses, and I'd suggest a follow-up with Ralph or Gokhan if you are interested in that.

-- Scott

On 4/15/11 8:31 AM, Schmitz, Jeffrey A wrote:

Hi Scott,

  I really like the idea of being able to “fine-tune how your model creates the XML/XSD without interference with how different people may want to interpret OWL-XSD mappings.”  But I’m missing something in how the basic mechanics would work to get TBC to spit out an xsd file without using the xsd exporter, and I want to be clear before heading down this road.  Here’s an example. 

 

In my sxml based model I have a Mnemonic element that is sub-classed from sxml:Element, along with a related mnemonic property:

:Mnemonic

      a       owl:Class ;

      rdfs:subClassOf <http://topbraid.org/sxml#Element> ;

      sxml:element "mnemonic"^^xsd:string .

 

:mnemonic

      a       owl:ObjectProperty ;

      rdfs:domain :ACMSReportFields ;

      rdfs:label "Mnemonic"^^xsd:string ;

      rdfs:range :Mnemonic ;

      rdfs:subPropertyOf <http://www.topbraid.org/2007/05/composite.owl#child> .

 

When I use the xsd exporter on this owl model I get the following schema definitions (not to mention all the definitions for the classes defined in  the sxml model itself and other imported models too, but that’s another issue). 

  <!--

    Created from class j.0:Mnemonic

     -->

  <xsd:element name="Mnemonic" type="MnemonicType"/>

  <xsd:complexType name="MnemonicType">

    <xsd:complexContent>

      <xsd:extension base="ElementType"/>

    </xsd:complexContent>

  </xsd:complexType>

 

  <xsd:element name="mnemonic">

    <xsd:complexType>

      <xsd:sequence>

        <xsd:element ref="Mnemonic"/>

      </xsd:sequence>

      <xsd:attribute name="IDREF" type="xsd:IDREF" use="optional"/>

    </xsd:complexType>

  </xsd:element>

 

This is great, but I’m not sure how to mimic this functionality by “extending your [sxml model] for some schema definitions, such as the SPARQL transformation I sent earlier.”  My most basic question is, how do I get TBC to spit out an xsd file without using the xsd exporter?  Or are you saying to use the xsd exporter to get an initial xsd, and then extend the xsd model (not my sxml based model) for some schema definitions…?

 

As an aside, is there a way to get TBC to spit out xml from an sxml based owl model?  I’m aware you can open an xml file directly and work with it using Semantic XML, but what if you aren’t starting out with an xml file, but with an owl model that you annotate with the required sxml annotations?

 

As always, Thanks!

jeff

 

From: [email protected] [mailto:[email protected]] On Behalf Of Scott Henninger
Sent: Thursday, April 14, 2011 5:01 PM
To: [email protected]
Subject: Re: [topbraid-users] Re: XML Schema Export and xsd:enumeration

 

By "Semantic XSD" I mean using Semantic XML with the extended tags and attributes defined in sxsd.rdf.  Note that sxsd.rdf imports sxml.rdf, so if you already have your RDF defined in Semantic XML, all you'd need to do is extend that for some schema definitions, such as the SPARQL transformation I sent earlier.

The XSD exporter was designed for minimal, least common denominator, mappings between OWL and XSD.  Extending that tool to include owl:oneOf-to-xsd:enumeration transformations seems reasonable and we will consider it.  That said it will be  a few weeks our before we could have an enhancement ready.

In the meantime, the sxsd.rdf mappings are the best route and has its advantages because can you fine-tune how your model creates the XML/XSD without interference with how different people may want to interpret OWL-XSD mappings.

-- Scott

On 4/14/11 3:41 PM, Schmitz, Jeffrey A wrote:

Hi Scott,
   When you say "converting the model into Semantic XSD (see sxsd.rdf)" I'm not quite sure I know what you mean.  Can you expand on that?  I see the example for enums, but would I have to write similar scripts to generate all the xsd constructs by "reverse engineering" the model, basically re-doing everything that I think the xml schema export functionality already does?  btw, my current model is based on sxml, e.g. all classes are subclasses of sxml:Element.
 
Thanks,
Jeff
 
 
-----Original Message-----
From: [email protected] [mailto:topbraid-
[email protected]] On Behalf Of Scott Henninger
Sent: Thursday, April 14, 2011 11:53 AM
To: TopBraid Suite Users
Subject: [topbraid-users] Re: XML Schema Export and xsd:enumeration
 
Jeff, the "XML Schemas from RDF/OWL" exporter does not support
enumerations in this way.  It may be an enhancement we can look into
at some point.
 
In the meantime, you can accomplish this by converting the model into
Semantic XSD (see sxsd.rdf) and use the Semantic XML converter to
convert into XSD.  For example, the following SPARQL transformation
will create a Semantic XSD structure that is converted to the XSD
shown in your question.
 
CONSTRUCT
{   ?schema composite:child ?cls .
    ?cls sxsd:name ?name .
    ?cls a sxsd:SimpleType .
    ?restr a sxsd:Restriction .
    ?restr sxsd:base "xsd:string" .
    ?cls composite:child ?restr .
    ?restr composite:child ?elem .
    ?elem a sxsd:Enumeration .
    ?elem sxsd:value ?enumName .
}
WHERE
{   ?cls (rdfs:subClassOf)+ owl:Thing .
    ?cls owl:oneOf ?oneOfList .
    ?oneOfList ((rdf:rest)*)/rdf:first ?elem .
    LET (?name := smf:qname(?cls)) .
    LET (?restr := smf:buildUniqueURI("restr_{?name}")) .
    LET (?enumName := afn:localname(?elem)) .
}
 
...with ?schema bound to the root of the XSD file.  While the
transformation may seem daunting at first glance, it's fairly simple
when broken down.  The WHERE clause gets each class defined with a
owl:oneOf.  For each match a <simpleType><restriction><enumeration>
tag hierarchy is created, along with the attributes for each.
 
With this, you can arrange your XSD tags any way you need.  Let us
know how that works for you.
 
-- Scott
 
On Apr 13, 1:01 pm, "Schmitz, Jeffrey A"
<[email protected]> wrote:
Hello,
   I'm using the XML Schema Export function on one of my models and
was wondering if there is a way to export xsd enumerations from my
model.  E.g. something like:
 
<xsd:simpleType name = "iso3currency">
 
    <xsd:restriction base = "xsd:string">
 
      <xsd:enumeration value = "AUD"/><!-- Australian Dollar -->
 
      <xsd:enumeration value = "BRL"/><!-- Brazilian Real -->
 
      <xsd:enumeration value = "CAD"/><!-- Canadian Dollar -->
 
      <xsd:enumeration value = "CNY"/><!-- Chinese Yen -->
 
      <xsd:enumeration value = "EUR"/><!-- Euro -->
 
      <xsd:enumeration value = "GBP"/><!-- British Pound -->
 
      <xsd:enumeration value = "INR"/><!-- Indian Rupee -->
 
      <xsd:enumeration value = "JPY"/><!-- Japanese Yen -->
 
      <xsd:enumeration value = "RUR"/><!-- Russian Rouble -->
 
      <xsd:enumeration value = "USD"/><!-- US Dollar -->
 
      <xsd:length value = "3"/>
 
    </xsd:restriction>
 
  </xsd:simpleType>
 
I tried using the owl:oneOf property in my model to define the
enumeration values for a class, e.g.
 
<rdf:Description
rdf:about="http://www.boeing.com/sem/acms/ACMS_Datalink_Report.owl#Suff
ix">
    <owl:oneOf
rdf:resource="http://www.boeing.com/sem/acms/ACMS_Datalink_Report.owl#L
DISP1"/>
    <owl:oneOf
rdf:resource="http://www.boeing.com/sem/acms/ACMS_Datalink_Report.owl#R
EECGE"/>
    <owl:oneOf
rdf:resource="http://www.boeing.com/sem/acms/ACMS_Datalink_Report.owl#T
AKEOFF"/>
</rdf:Description>
  <Suffix
rdf:about="http://www.boeing.com/sem/acms/ACMS_Datalink_Report.owl#LDIS
P1">
    <rdfs:label>LDISP1</rdfs:label>
  </Suffix>
 
but the exporter seems to ignore that.  Is there some other construct
I could use?  If not, could this functionality perhaps be added to the
exporter, perhaps using the enum resource's local name or its
rdfs:label property for the value used in the xml schema?  I'm no xml
schema export, but it seems to me that on the surface they are two
semantically equivalent concepts.
 
Thanks,
Jeff
 
--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid
Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
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-users?hl=en
 

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
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-users?hl=en

--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
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-users?hl=en


--
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
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-users?hl=en
# Saved by TopBraid on Fri Apr 15 12:41:25 CDT 2011
# baseURI: http://support.tq.com/xsd/demo
# imports: http://topbraid.org/sparqlmotionfunctions
# imports: http://topbraid.org/sparqlmotionlib

@prefix afn:     <http://jena.hpl.hp.com/ARQ/function#> .
@prefix demo:    <http://support.tq.com/xsd/demo#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sm:      <http://topbraid.org/sparqlmotion#> .
@prefix smf:     <http://topbraid.org/sparqlmotionfunctions#> .
@prefix sml:     <http://topbraid.org/sparqlmotionlib#> .
@prefix sp:      <http://spinrdf.org/sp#> .
@prefix spin:    <http://spinrdf.org/spin#> .
@prefix spl:     <http://spinrdf.org/spl#> .
@prefix sxml:    <http://topbraid.org/sxml#> .
@prefix sxsd:    <http://topbraid.org/sxsd#> .
@prefix unnamed0:  <http://afmodels.tq.com/unnamed0#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .

sp:baseURI
      rdf:type rdf:Property ;
      rdfs:label "base URI"^^xsd:string ;
      rdfs:subPropertyOf sp:arg .

<http://support.tq.com/xsd/demo>
      rdf:type owl:Ontology ;
      owl:imports <http://topbraid.org/sparqlmotionlib> , 
<http://topbraid.org/sparqlmotionfunctions> ;
      owl:versionInfo "Created with TopBraid Composer"^^xsd:string .

demo:ApplyConstruct_1
      rdf:type sml:ApplyConstruct ;
      rdfs:label "Apply construct 1"^^xsd:string ;
      sm:next demo:ConvertRDFToXML_1 ;
      sm:nodeX 340 ;
      sm:nodeY 303 ;
      sml:constructQuery
              [ rdf:type sp:Construct ;
                sp:templates ([ sp:object _:b1 ;
                            sp:predicate 
<http://www.topbraid.org/2007/05/composite.owl#child> ;
                            sp:subject
                                    [ sp:varName "schema"^^xsd:string
                                    ]
                          ] [ sp:object _:b2 ;
                            sp:predicate sxsd:name ;
                            sp:subject _:b1
                          ] [ sp:object sxsd:ComplexType ;
                            sp:predicate rdf:type ;
                            sp:subject _:b1
                          ] [ sp:object sxsd:Sequence ;
                            sp:predicate rdf:type ;
                            sp:subject _:b3
                          ] [ sp:object _:b3 ;
                            sp:predicate 
<http://www.topbraid.org/2007/05/composite.owl#child> ;
                            sp:subject _:b1
                          ] [ sp:object _:b4 ;
                            sp:predicate 
<http://www.topbraid.org/2007/05/composite.owl#child> ;
                            sp:subject _:b3
                          ] [ sp:object sxsd:Element ;
                            sp:predicate rdf:type ;
                            sp:subject _:b4
                          ] [ sp:object _:b5 ;
                            sp:predicate sxsd:ref ;
                            sp:subject _:b4
                          ] [ sp:object _:b6 ;
                            sp:predicate sxsd:type ;
                            sp:subject _:b4
                          ]) ;
                sp:where ([ rdf:type sp:TriplePath ;
                            sp:object owl:Thing ;
                            sp:path [ rdf:type sp:ModPath ;
                                      sp:modMax -2 ;
                                      sp:modMin 1 ;
                                      sp:subPath rdfs:subClassOf
                                    ] ;
                            sp:subject _:b1
                          ] [ rdf:type sp:Let ;
                            sp:expression
                                    [ rdf:type afn:namespace ;
                                      sp:arg1 _:b1
                                    ] ;
                            sp:variable _:b7
                          ] [ rdf:type sp:Filter ;
                            sp:expression
                                    [ rdf:type sp:and ;
                                      sp:arg1 [ rdf:type sp:ne ;
                                                sp:arg1 _:b7 ;
                                                sp:arg2 
"http://topbraid.org/sxsd#";
                                              ] ;
                                      sp:arg2 [ rdf:type sp:ne ;
                                                sp:arg1 _:b7 ;
                                                sp:arg2 
"http://topbraid.org/sxml#";
                                              ]
                                    ]
                          ] [ rdf:type sp:Optional ;
                            sp:elements ([ sp:object _:b1 ;
                                        sp:predicate rdfs:domain ;
                                        sp:subject _:b4
                                      ] [ sp:object _:b8 ;
                                        sp:predicate rdfs:range ;
                                        sp:subject _:b4
                                      ] [ rdf:type sp:Let ;
                                        sp:expression
                                                [ rdf:type smf:qname ;
                                                  sp:arg1 _:b4
                                                ] ;
                                        sp:variable _:b5
                                      ] [ rdf:type sp:Let ;
                                        sp:expression
                                                [ rdf:type smf:qname ;
                                                  sp:arg1 _:b8
                                                ] ;
                                        sp:variable _:b6
                                      ])
                          ] [ rdf:type sp:Let ;
                            sp:expression
                                    [ rdf:type smf:qname ;
                                      sp:arg1 _:b1
                                    ] ;
                            sp:variable _:b2
                          ] [ rdf:type sp:Let ;
                            sp:expression
                                    [ rdf:type smf:buildUniqueURI ;
                                      sp:arg1 "seq_{?name}"
                                    ] ;
                            sp:variable _:b3
                          ])
              ] ;
      sml:replace "false"^^xsd:boolean .

demo:ApplyConstruct_2
      rdf:type sml:ApplyConstruct ;
      rdfs:label "Apply construct 2"^^xsd:string ;
      sm:next demo:ConvertRDFToXML_1 ;
      sm:nodeX 514 ;
      sm:nodeY 296 ;
      sml:constructQuery
              [ rdf:type sp:Construct ;
                sp:templates ([ sp:object _:b9 ;
                            sp:predicate 
<http://www.topbraid.org/2007/05/composite.owl#child> ;
                            sp:subject
                                    [ sp:varName "schema"^^xsd:string
                                    ]
                          ] [ sp:object _:b10 ;
                            sp:predicate sxsd:name ;
                            sp:subject _:b9
                          ] [ sp:object sxsd:SimpleType ;
                            sp:predicate rdf:type ;
                            sp:subject _:b9
                          ] [ sp:object sxsd:Restriction ;
                            sp:predicate rdf:type ;
                            sp:subject _:b11
                          ] [ sp:object "xsd:string" ;
                            sp:predicate sxsd:base ;
                            sp:subject _:b11
                          ] [ sp:object _:b11 ;
                            sp:predicate 
<http://www.topbraid.org/2007/05/composite.owl#child> ;
                            sp:subject _:b9
                          ] [ sp:object _:b12 ;
                            sp:predicate 
<http://www.topbraid.org/2007/05/composite.owl#child> ;
                            sp:subject _:b11
                          ] [ sp:object sxsd:Enumeration ;
                            sp:predicate rdf:type ;
                            sp:subject _:b12
                          ] [ sp:object _:b13 ;
                            sp:predicate sxsd:value ;
                            sp:subject _:b12
                          ]) ;
                sp:where ([ rdf:type sp:TriplePath ;
                            sp:object owl:Thing ;
                            sp:path [ rdf:type sp:ModPath ;
                                      sp:modMax -2 ;
                                      sp:modMin 1 ;
                                      sp:subPath rdfs:subClassOf
                                    ] ;
                            sp:subject _:b9
                          ] [ sp:object _:b14 ;
                            sp:predicate owl:oneOf ;
                            sp:subject _:b9
                          ] [ rdf:type sp:TriplePath ;
                            sp:object _:b12 ;
                            sp:path [ rdf:type sp:SeqPath ;
                                      sp:path1
                                              [ rdf:type sp:ModPath ;
                                                sp:modMax -2 ;
                                                sp:modMin 0 ;
                                                sp:subPath rdf:rest
                                              ] ;
                                      sp:path2 rdf:first
                                    ] ;
                            sp:subject _:b14
                          ] [ rdf:type sp:Let ;
                            sp:expression
                                    [ rdf:type smf:qname ;
                                      sp:arg1 _:b9
                                    ] ;
                            sp:variable _:b10
                          ] [ rdf:type sp:Let ;
                            sp:expression
                                    [ rdf:type smf:buildUniqueURI ;
                                      sp:arg1 "restr_{?name}"
                                    ] ;
                            sp:variable _:b11
                          ] [ rdf:type sp:Let ;
                            sp:expression
                                    [ rdf:type afn:localname ;
                                      sp:arg1 _:b12
                                    ] ;
                            sp:variable _:b13
                          ])
              ] .

demo:BindSchemaVariables
      rdf:type sml:BindBySelect ;
      rdfs:label "Bind schema variables"^^xsd:string ;
      sm:next demo:ApplyConstruct_2 , demo:CreateSchemaDef , 
demo:ApplyConstruct_1 ;
      sm:nodeX 257 ;
      sm:nodeY 165 ;
      sml:selectQuery
              [ rdf:type sp:Select ;
                sp:where ([ rdf:type sp:Let ;
                            sp:expression
                                    [ rdf:type smf:buildUniqueURI ;
                                      sp:arg1 ":schema_aName"
                                    ] ;
                            sp:variable
                                    [ sp:varName "schema"^^xsd:string
                                    ]
                          ])
              ] .

demo:ConvertRDFToXML_1
      rdf:type sml:ConvertRDFToXML ;
      rdfs:label "Convert RDFTo XML 1"^^xsd:string ;
      sm:next demo:ExportToXMLFile_1 ;
      sm:nodeX 253 ;
      sm:nodeY 449 ;
      sm:outputVariable "xml" .

demo:CreateSchemaDef
      rdf:type sml:ApplyConstruct ;
      rdfs:label "Create schema def"^^xsd:string ;
      sm:next demo:ConvertRDFToXML_1 ;
      sm:nodeX 134 ;
      sm:nodeY 314 ;
      sml:constructQuery
              [ rdf:type sp:Construct ;
                sp:templates ([ sp:object sxsd:Schema ;
                            sp:predicate rdf:type ;
                            sp:subject _:b15
                          ] [ sp:object 0 ;
                            sp:predicate 
<http://www.topbraid.org/2007/05/composite.owl#index> ;
                            sp:subject _:b15
                          ] [ sp:object "urn:USAF:SAF-USM:EVT:1#" ;
                            sp:predicate sxsd:targetNamespace ;
                            sp:subject _:b15
                          ] [ sp:object "qualified" ;
                            sp:predicate sxsd:elementFormDefault ;
                            sp:subject _:b15
                          ] [ sp:object "EVT" ;
                            sp:predicate sxml:prefix ;
                            sp:subject _:b15
                          ] [ sp:object sxml:Document ;
                            sp:predicate rdf:type ;
                            sp:subject _:b16
                          ] [ sp:object _:b15 ;
                            sp:predicate sxml:root ;
                            sp:subject _:b16
                          ]) ;
                sp:where ()
              ] ;
      sml:replace "true"^^xsd:boolean .

demo:ExportToXMLFile_1
      rdf:type sml:ExportToXMLFile ;
      rdfs:label "Export to XMLFile 1"^^xsd:string ;
      sm:next demo:ReturnXML_1 ;
      sm:nodeX 262 ;
      sm:nodeY 593 ;
      sml:targetFilePath "output.xsd"^^xsd:string .

<http://support.tq.com/xsd/demo#Import-sxsd.rdf_1>
      rdf:type sml:ImportRDFFromWorkspace ;
      rdfs:label "Import sxsd.rdf"^^xsd:string ;
      sm:next demo:BindSchemaVariables ;
      sm:nodeX 43 ;
      sm:nodeY 14 ;
      sml:baseURI "http://topbraid.org/sxsd"^^xsd:string .

<http://support.tq.com/xsd/demo#Import-unnamed0.ttl_1>
      rdf:type sml:ImportRDFFromWorkspace ;
      rdfs:label "Import unnamed0.ttl"^^xsd:string ;
      sm:next demo:BindSchemaVariables ;
      sm:nodeX 260 ;
      sm:nodeY 21 ;
      sml:baseURI "{?baseURI}"^^xsd:string .

demo:ReturnXML_1
      rdf:type sml:ReturnXML ;
      rdfs:label "Return XML 1"^^xsd:string ;
      sm:nodeX 510 ;
      sm:nodeY 588 ;
      sml:mimeType "text/xml"^^xsd:string .

demo:createXSD
      rdf:type spin:Function ;
      rdfs:comment 
"http://localhost:8083/tbl/actions?action=sparqlmotion&id=createXSD&baseURI=urn:USAF:A1:MPS:EMPLOYMENT_1.0"^^xsd:string
 ;
      rdfs:label "create XSD"^^xsd:string ;
      rdfs:subClassOf spin:Functions ;
      spin:constraint
              [ rdf:type spl:Argument ;
                rdfs:comment "Base URI of RDF Model to Convert to 
XSD"^^xsd:string ;
                spl:defaultValue "http://support.tq.com/testxsd0"^^xsd:string ;
                spl:predicate sp:baseURI ;
                spl:valueType xsd:string ;
                sm:next <http://support.tq.com/xsd/demo#Import-unnamed0.ttl_1> ;
                sm:nodeX 469 ;
                sm:nodeY 22
              ] ;
      sm:returnModule demo:ReturnXML_1 .

_:b15
      sp:varName "schema"^^xsd:string .

_:b14
      sp:varName "oneOfList"^^xsd:string .

_:b13
      sp:varName "enumName"^^xsd:string .

_:b12
      sp:varName "elem"^^xsd:string .

_:b11
      sp:varName "restr"^^xsd:string .

_:b10
      sp:varName "name"^^xsd:string .

_:b9  sp:varName "cls"^^xsd:string .

_:b8  sp:varName "range"^^xsd:string .

_:b7  sp:varName "ns"^^xsd:string .

_:b6  sp:varName "propRange"^^xsd:string .

_:b5  sp:varName "propRef"^^xsd:string .

_:b4  sp:varName "dtprop"^^xsd:string .

_:b3  sp:varName "seq"^^xsd:string .

_:b2  sp:varName "name"^^xsd:string .

_:b1  sp:varName "cls"^^xsd:string .
# Saved by TopBraid on Fri Apr 15 12:37:55 CDT 2011
# baseURI: http://support.tq.com/testxsd0
# imports: http://topbraid.org/sxsd

@prefix dat:     <urn:tq:support:data:1#> .
@prefix ex:      <http://support.tq.com/testxsd0#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .

<http://support.tq.com/testxsd0>
      rdf:type owl:Ontology ;
      owl:imports <http://topbraid.org/sxsd> ;
      owl:versionInfo "Created with TopBraid Composer"^^xsd:string .

ex:Class1
      rdf:type owl:Class ;
      rdfs:subClassOf owl:Thing ;
      dat:coiExpression "Class1"^^xsd:string .

ex:ClassType1
      rdf:type owl:Class ;
      rdfs:label "Class type1"^^xsd:string ;
      rdfs:subClassOf owl:Thing ;
      dat:coiExpression "Class type1"^^xsd:string .

ex:DatatypeProperty_1
      rdf:type owl:DatatypeProperty ;
      rdfs:label "Datatype property 1"^^xsd:string .

ex:LDISP1
      rdf:type ex:Suffix_oneOf ;
      rdfs:label "LDISP1"^^xsd:string .

ex:REECGE
      rdf:type ex:Suffix_oneOf ;
      rdfs:label "REECGE"^^xsd:string .

ex:Suffix_oneOf
      rdf:type owl:Class ;
      rdfs:label "LDISPI one of"^^xsd:string ;
      rdfs:subClassOf owl:Thing ;
      owl:oneOf (ex:LDISP1 ex:REECGE ex:TAKEOFF) .

ex:TAKEOFF
      rdf:type ex:Suffix_oneOf ;
      rdfs:label "TAKEOFF"^^xsd:string .

ex:aSSN
      rdf:type rdfs:Datatype ;
      rdfs:comment "aaa"^^xsd:string ;
      owl:equivalentClass
              [ rdf:type rdfs:Datatype ;
                owl:onDatatype xsd:string ;
                owl:withRestrictions
                        ([ xsd:pattern "[0-9]{3}-[0-9]{2}-[0-9]{4}"
                          ])
              ] .

ex:datProp_1
      rdf:type owl:DatatypeProperty ;
      rdfs:domain ex:Class1 ;
      rdfs:label "Dat prop 1"^^xsd:string ;
      rdfs:range xsd:dateTime ;
      dat:coiExpression "Dat prop 1"^^xsd:string .

ex:datProp_2
      rdf:type owl:DatatypeProperty ;
      rdfs:domain ex:Class1 ;
      rdfs:range xsd:string ;
      dat:coiExpression "Dat prop 2"^^xsd:string .

ex:hasSSN
      rdf:type owl:DatatypeProperty ;
      rdfs:range ex:aSSN .

ex:objProp_1
      rdf:type owl:ObjectProperty ;
      rdfs:domain ex:Class1 ;
      rdfs:label "obj prop 1"^^xsd:string ;
      rdfs:range ex:ClassType1 .

dat:coiExpression
      rdf:type owl:DatatypeProperty ;
      rdfs:label "coi expression"^^xsd:string .

Reply via email to