Okay, I didn't see the class created since I'm trying to filter out
triples defined in my GSIVocabulary.

There is a difference between how an undefined class and an undefined
property is handled though.  When a namespace is used in the xml, the
undefined property is created and defined using the base URI of the
ConvertXMLToRDF step.  However, when a namespace is used on an
undefined element, the class is defined using the base URI of the GSI
namespace.

Therefore, you are right; they are both created when undefined.
However, they are created differently; they are created with
difference namespaces.

You can see these differences in the output from your script:
gsi:undefinedClass
      rdf:type owl:Class ;
      rdfs:label "gsi:undefinedClass" ;
      sxml:element gsi:undefinedClass .

mymod:gsisomeUndefinedAtt-skosConcept
      rdf:type owl:DatatypeProperty ;
      rdfs:domain skos:Concept ;
      rdfs:label "gsi:someUndefinedAtt" ;
      sxml:attribute "gsi:someUndefinedAtt" .

Thanks,
Catrina

On Nov 23, 12:09 am, Scott Henninger <[email protected]>
wrote:
> Catrina;  I have attached a script that converts XML to an existing RDF 
> model.  I've tried to reproduce your scenario.  The example does create a 
> class named 'gsi:undefinedClass'.  Take a look and see if it works for you, 
> and let me know if something different needs to be tried.
> In general, ConvertXMLtoRDF will create a class for each XML element type 
> found and an instance for each element in the XML file.  Attributes are tied 
> to elements in XML (meaning the same attribute name in different element tags 
> are defined to be different attributes), therefore a unique property is 
> created for each element-attribute pair.
> So element/attribute mapping to RDF is slightly different because XML treats 
> them differently than in RDF.  But a class should be created for each element 
> type.
> -- Scott
> Catrina wrote:When I want to import XML using a predefined RDF data model, I 
> use the sxml:attribute property to map an XML attribute to a predefined RDF 
> property. If I do not add the sxml:attribute property to my data model, then 
> a new property is created when my XML is converted to RDF (ConvertXMLToRDF 
> module). A new property is created even if I try to use a namespace on the 
> attribute (as shown in the example outlined below). However, when my XML 
> contains an element that is NOT predefined in my RDF data model and I use the 
> data model's namespace on the undefined element, a new Class is NOT created 
> during the ConvertXMLToRDF. There seems to be an inconsistency between the 
> way attributes and elements are handled when they are not predefined in the 
> given namespace of the RDF data model. Should undefined attributes(RDF 
> properties) and elements(RDF classes) be handled different? ---------------- 
> EXAMPLE: Input XML: <skos:Concept 
> xmlns:skos="http://www.w3.org/2004/02/skos/core"xmlns:gsi="http://www.myURI.com/GSIVocabulary"gsi:virtual="false";
>  gsi:topicOrder="0" skos:prefLabel="All Topics" gsi:someUndefinedAtt="some 
> undefined property value"><gsi:undefinedClass rdfs:label="undefined class 
> node"></ gsi:undefinedClass></skos:Concept> As you can see, my XML includes 2 
> undefined items; gsi:someUndefinedAtt attribute and gsi:undefinedClass. I 
> labeled them undefined since neither one exists in 
> xmlns:gsi="http://www.myURI.com/ GSIVocabulary". When I import this XML and 
> convert to RDF, a new property is created for the undefined attribute as 
> expected. However, a new class is not created for the undefined element. NEW 
> PROPERTY IN 
> RESULTS:<http://www.myURI.com/GSI_A#gsisomeUndefinedAtt-skosConcept>rdf:type 
> owl:DatatypeProperty ; rdfs:domain skos:Concept ; rdfs:label 
> "gsi:someUndefinedAtt" ; sxml:attribute "gsi:someUndefinedAtt" . REFERENCE TO 
> UNDEFINED CLASS IN RESULTS (but no new class 
> created):<http://www.myURI.com/GSI_A#Documentr-0>rdf:type gsi:undefinedClass 
> ; rdfs:label "undefined class node" ; Thanks, Catrina -- You received this 
> message because you are subscribed to the Google Groups "TopBraid Composer 
> Users" group. To post to this group, send email 
> [email protected]. To unsubscribe from this group, 
> send email [email protected]. For more 
> options, visit this group 
> athttp://groups.google.com/group/topbraid-composer-users?hl=.
>
>  XMLtoRDFex.zip
> 2KViewDownload

--

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=.


Reply via email to