Ok, I was able to open the XML file and see Classes and properties.
However, when I opened Associations, it was empty.
I got a bit lost here:
>    Import it into a RDF file?

If you want to get more sophisticated, and want to control which
class
that an instance has as its type, then you can construct an ontology
where you define the sub-class hierarchy and attach sxml:element
annotations on the classes, with element tag of the instance as the
value of the annotation. Then, you can import an XML file through
Imports View, and the SXML instances will have these annotated
classes
as their type. If you want more sophisticated and more customized
structure, you can write SPIN rules (SPARQL Rules), where you can
construct new triples on the existing SXML triples.

I could use the vocabularies that already exist like BIO, REL and
FOAF.  So, in the Genealogy XML file, I'd start by wanting the Class
Person to be
made an equivalent Class with foaf:Person or a subclass of
foaf:Person, not sure which.  Then I'd have some Event classes that
would relate to the BIO vocabulary.  So, I do have sxml:Node as a
Class and under that most of the data from the xml file is in the
sxml:TextNode.  There are 968 Instances here.  I wouldn't want to
connect this with any ontology because we have different types of data
in this class sxml:TextNode.
Maybe I want <PERSON> from the imported XML file to be of type
foaf:Person instead of a subproperty of foaf:Person.
Bruce


On Aug 26, 5:37 pm, Gokhan Soydan <[email protected]> wrote:
> Hello Bruce,
>
> Here are some answers to your XML questions:> Hello,
> >              My first question is somewhat of a newbie issue to TBC.  I
> > wanted to do something with Genealogy for a project and so I started
> > by converting a couple GEDCOM files to XML.  GEDCOM is the format used
> > by Genealogy - it is standard, as it were.
>
> How did you convert GEDCOM files to XML in TBC? What did you use?>            
>  So, the XML file returned has no namespace definitions.  I
> > thought I'd make certain tags appear as sub-properties and sub-classes
> > of other vocabulary classes and properties.  How would one go about
> > doing this, what's going to be the best way?
>
> The best way in TBC related to manipulating XML files at the moment is
> to use SXML. You can open an XML file as an SXML ontology either by
> double-clicking on it in TBC or right-clicking on it and selecting "Open
> With... > TopBraid (Semantic XML Documents)".  You can then see all XML
> instances as triples under Associations View (from the menu, select
> Window > Show View > Associations), where then you click on "Select
> property..." from the toolbar, and select "composite:child". You can see
> the instances, and what classes and properties they get.
>
> >    Import it into a RDF file?
>
> If you want to get more sophisticated, and want to control which class
> that an instance has as its type, then you can construct an ontology
> where you define the sub-class hierarchy and attach sxml:element
> annotations on the classes, with element tag of the instance as the
> value of the annotation. Then, you can import an XML file through
> Imports View, and the SXML instances will have these annotated classes
> as their type. If you want more sophisticated and more customized
> structure, you can write SPIN rules (SPARQL Rules), where you can
> construct new triples on the existing SXML triples.
>
> > Or just open the XML file in TBC and import other vocabs?  I'm
> > not sure how to then get from an arbitrary XML file into an OWL or RDF
> > file.
>
> When an XML file is imported into an ontology, it is already treated as
> an SXML ontology.
>
> >          Oh, how hard would it be to take one large XML file and also
> > produce individual files for each defined person in the XML version of
> > the GEDCOM - so I would have one large RDF file and several smaller
> > files?
>
> The answer is to use SPARQLMotion, where there are modules for imports,
> iterations and exports to various formats.
>
> Gokhan

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

Reply via email to