[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RDF? TM? (was Re: Didier's lab report) (fwd)

  • From: Uche Ogbuji <uche.ogbuji@f...>
  • To: xml-dev@x...
  • Date: Thu, 14 Dec 2000 09:44:52 -0700 (MST)

href xslt

---------- Forwarded message ----------
Date: Thu, 14 Dec 2000 08:52:04 -0700 (MST)
From: Uche Ogbuji <uche.ogbuji@l...>
To: Nikita Ogievetsky <nogievet@c...>
Cc: xml-dev@x..., martind@n...
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@f...               +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



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.