David,

How's this: I stored the following in an XML file, opened it up as semantic
XML, and imported sp.rdf and spin.rdf into the model.

<orders>
  <order><item>shirt</item><color>blue</color></order>
  <order><item>belt</item><color>black</color></order>
  <order><item>socks</item><color>white</color></order>
</orders>


I then added the following spin:rule to the item class created by the
semantic XML import:

CONSTRUCT {
    ?this rdfs:label ?label .
}
WHERE {
    ?this composite:child ?cc .
    ?cc sxml:text ?label .
}


With TopSPIN included as one of the selected inference engines, running
inferences then gave each item instance an rdfs:label value of the PCDATA
from the item element (i.e. the sxml:text value of its composite:child). 

Bob

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Wednesday, November 09, 2011 4:30 PM
To: TopBraid Suite Users
Subject: [topbraid-users] adding a label in SPIN

I have an xml file that I converted to RDF. I have about 35 classes
and each class has several instances.

I am trying to add a label to each instance, based on a
composite:child reference to another instance that contains the
smxml:text

Any examples to do this would be appreciated. I would like to do it
within SPIN.

thx

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

Reply via email to