OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Imbue XML instances with semantics

and just to completely the loop (namespaces not included):

    a owl:ObjectProperty;
    rdfs:domain class:Node;
    rdfs:range class:Node;

Then you can get into deeper definitions of a ring network by saying that all members of a ring network must be nodes, every node must have one and only one corresponding inbound next link and outbound next link, the inbound and outbound links can not be the same as one another or the base node, and all nodes must be used.

Kurt Cagle
Founder, Semantical LLC

On Fri, Dec 23, 2016 at 3:06 PM, Kurt Cagle <kurt.cagle@gmail.com> wrote:
node:n1 a class:node.
node:n2 a class:node.
node:n3 a class:node.
node:n4 a class:node.
node:n1 node:next node:n2.
node:n2 node:next node:n3.
node:n3 node:next node:n4.
node:n4 node:next node:n1.

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:node="http://www.example.com/ns/node#" xmlns:class="http://www.example.com/ns/class#"> <class:node rdf:about="http://www.example.com/ns/node#n1" > <rdf:type rdf:resource="http://www.example.com/ns/class#node"/> <node:next rdf:resource="http://www.example.com/ns/node#n2"/> </class:node> <class:node rdf:about="http://www.example.com/ns/node#n2" > <rdf:type rdf:resource="http://www.example.com/ns/class#node"/> <node:next rdf:resource="http://www.example.com/ns/node#n34"/> </class:node> <class:node rdf:about="http://www.example.com/ns/node#n3" > <rdf:type rdf:resource="http://www.example.com/ns/class#node"/> <node:next rdf:resource="http://www.example.com/ns/node#n4"/> </class:node> <class:node rdf:about="http://www.example.com/ns/node#n4" > <rdf:type rdf:resource="http://www.example.com/ns/class#node"/> <node:next rdf:resource="http://www.example.com/ns/node#n1"/> </class:node> </rdf:RDF>

XML has its own base semantics, but then again, so does RDF. If you're creating a network graph, use a network language.

Kurt Cagle
Founder, Semantical LLC

On Fri, Dec 23, 2016 at 2:19 PM, Patrick Durusau <patrick@durusau.net> wrote:


You say below:


Lesson Learned: XML has no semantics. When we define operators on the XML and imbue specific behaviors on the operators, only then we may informally treat the XML as having semantics.


I'm puzzling over what you mean by "no semantics?"

I'm not helped by your saying the defining of behavior on operators leads to "informal" semantics for XML?

Do you mean that operators have "no semantics" until we define them?

Even if we had a way back machine and encountered the first instance of XML ever recorded (assume SGML never existed), XML would still have "semantics" in the way I understand the term.

Possibly "incorrect" given it is a first encounter but semantics none the less. Just as Egyptian hieroglyphics were "translated" in the 18th century, although those translations are thought today to be incorrect. Being incorrect isn't the same thing as having "no semantics."


Hope you are having a great day!


On 12/23/2016 03:53 PM, Costello, Roger L. wrote:

Hi Folks,

Problem: There are N nodes. Create an XML instance so that the nodes form a ring (cyclic) topology.

Rick Jelliffe solved this problem very elegantly [1].

Here’s Rick’s solution: Arrange the nodes in document order:

<Node id="N1">...</Node>
<Node id="N2">...</Node>
<Node id="Nn">...</Node>


“How does that form a ring topology?” you ask. It doesn’t. Not yet. You need to define an operator on the nodes and give the operator the desired behavior (semantics). Allow me to explain.


To traverse from one <Node> element to the next, you must perform an operation. If you are moving from <Node> to <Node> using your eyes, then the operator is “physically move your eyes downward (or upward).” If you are moving from <Node> to <Node> using XPath, then the operator is following-sibling (or preceding-sibling). Regardless of the technology, some operator must be used to move from one <Node> element to the next. Let’s generically denote that operator by succ. To achieve our ring topology goal, then, we need to imbue the succ operator with this semantic:


The succ of a <Node> is the next node in document order
               except when <Node> is the last node, then the succ is the
               first node.


Now the nodes take on a ring topology, by way of the succ operator.


Awesome! Thanks Rick!


Lesson Learned: XML has no semantics. When we define operators on the XML and imbue specific behaviors on the operators, only then we may informally treat the XML as having semantics.






[1] http://xml-dev.markmail.org/message/b3n774tmzqfe5k4d?q=Notable+declarative+expressions%3F+date:201612


Patrick Durusau
Technical Advisory Board, OASIS (TAB)
Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300
Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)

Another Word For It (blog): http://tm.durusau.net
Homepage: http://www.durusau.net
Twitter: patrickDurusau 

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS