[
Lists Home |
Date Index |
Thread Index
]
- From: Uche Ogbuji <uche.ogbuji@fourthought.com>
- To: xml-dev@xml.org
- Date: Thu, 14 Dec 2000 09:44:52 -0700 (MST)
---------- Forwarded message ----------
Date: Thu, 14 Dec 2000 08:52:04 -0700 (MST)
From: Uche Ogbuji <uche.ogbuji@localhost.localdomain>
To: Nikita Ogievetsky <nogievet@cogx.com>
Cc: xml-dev@xml.org, martind@netfolder.com
Subject: RDF? TM? (was Re: Didier's lab report)
> Lets take this as an example:
> > > In the scope of WML aware client use this stylesheet,
> > > in the scope IE5 use another stylesheet
> > > and in the scope of NC and IE4 and IE3 use yet third stylesheet.
> > > I used this approach a couple of months ago and quite successfully!.
> > > Same thing applies to the values of XSLT parameters.
>
> Here is XTM syntax for it (my $.02):
>
> <topic id="abc">
> <subjectIdentity><resourceRef xlink:href="abc.xml"/></subjectIdentity>
> <occurrence>
> <instanceOf><topicRef xlink:href="#xslt-stylesheet"/></instanceOf>
> <scope><topicRef xlink:href="#wml"/></scope>
> <resourceRef xlink:href="wml.xsl"/>
> </occurrence>
> <occurrence>
> <instanceOf><topicRef xlink:href="#xslt-stylesheet"/></instanceOf>
> <scope><topicRef xlink:href="#ie5"/></scope>
> <resourceRef xlink:href="ie5.xsl"/>
> </occurrence>
> <occurrence>
> <instanceOf><topicRef xlink:href="#xslt-stylesheet"/></instanceOf>
> <scope><topicRef xlink:href="#nc"/></scope>
> <resourceRef xlink:href="nc.xsl"/>
> </occurrence>
> </topic>
>
> The "xslt-stylesheet" topic defined elsewhere specifies that this occurrence
> is XSLT stylesheet
> The "wml" scoping topic (theme) defined elsewhere specifies that "wml.xsl"
> stylesheet should be used in the scope of WML aware browsers;
> same goes for "ie5" and "nc"
>
> Note that this is a very RDF-like case because the subject of the topic is a
> resource.
Sure. And here's just one of ten vigintillion ways to express this in RDF
right in the original XML
<MyOriginElement rdf:ID="origin1">
<incstyle:remotestyle>
<rdf:Alt>
<incstyle:sheet incstyle:case="WML" xlink:href="wml.xslt"/>
<incstyle:sheet incstyle:case="IE5" xlink:href="ie.xslt"
incstyle:param="version=5"/>
<incstyle:sheet incstyle:case="IE4" xlink:href="ie.xslt"
incstyle:param="version=4"/>
<incstyle:sheet incstyle:case="other" xlink:href="default.xslt"/>
</rdf:Alt>
</incstyle:remotestyle>
</MyOriginElement>
Again, I even included a few bonuses, and it's still quite simple. Of
course it does illustrate another of RDF's annoyances: that you must
have a namespace on all attributes if you wish to them to be considered
abbreviated properties.
And RDF is flexible enough that you can also express this without a single
"rdf" element or attribute besides the envelopes.
> (XTM topic can also have a real-world subject, one that can not be addressed
> directly.
So can RDF with anonymous resources.
> In this case "the subject may be indicated through one or more resources
> that describe the subject" -- xtm spec.)
>
> In any case, could you give an equivalent to the above example that uses RDF
> triples? Would you like to go for this exercise?
Your statement makes me wonder how you understand the role of "triples" in
RDF. I get the impression that you might not realize that they are
simply a database and list-processing convenient representation of the
RDF abstract model, which is a graph, just like TM's.
You can work with RDF just fine without worrying about constructing
"triples" if you like. You can use the graph or the XML serialization.
--
Uche Ogbuji Principal Consultant
uche.ogbuji@fourthought.com +1 303 583 9900 x 101
Fourthought, Inc. http://Fourthought.com
4735 East Walnut St, Ste. C, Boulder, CO 80301-2537, USA
Software-engineering, knowledge-management, XML, CORBA, Linux, Python
|