RE: aboutEachPrefix: possible alternative

>Mark Nottingham asked:
>...
> > I agree there is a much bigger picture and there are many
> people still
> > hashing this out (the developers of Apache's Cocoon project just
> > developed their own URI matching syntax) even as they implement
it.
>
> Do you have a reference for this?
>
The best I can come up with right now (without Cocoon2 CVS access) is
a reference to the archived mailing list.

http://archive.covalent.net/xml/cocoon-dev/2000/06/thread.xml

These are some of the relevant threads.

  [C2] Matcher concept
  [C2] Sitemap revised again
  Sitemap Draft comments
  sitemap draft still needs work in the matcher/chooser area
  Cocoon2 Design
  Pipeline conditional model
  [C2] (hopefully) last sitemap major changes

Interestingly, one of the decisions the team made was to write their
own XML transformation document types even if the result ended up
looking exactly like XSLT, in part because XSLT contains the
inappropriate word "Stylesheet" and they think names are important.
In the process they concluded XSLT's match/choose/select (whatever you
want to call it) syntax is a complete, simple, and useful solution
provided you extend it beyond XPath productions with an additional
attibute on xsl:when to specify the production to use.  (I don't
recall if this is what they finally used.)

One proposal was along these lines, using the XSLT rules.

<choose>
  <when tester="uri" test="http://example.com/foo">
    <!-- uri may be the default and is equivalent to rdf:about -->
    </when>
  <when tester="prefix" test="http://example.com/bar">
    <!-- This would be equivalent to rdf:aboutEachPrefix -->
    </when>
  <when tester="wildcard" test="http://example.com/baz/*">
    </when>
  <when tester="regex" test="http://server[0-3].example.com">
    </when>
  <when tester="xpath" test="author[address/state@postal = 'TX']">
    <!-- This is the XSLT default, and is probably not useful
     in the context of rdf since you may use tester="uri"
     with a URI fragment test="#xpointer(...)" -->
    </when>
  <otherwise>
    </otherwise>
</choose>

My personal opinion is to tokenize the URI (and application-specific
things like MIME type) into an XML construct to allow the use of xpath
on the URI, so no other testers are necessary and the XSLT syntax may
be used without modifcation.  I think this would be a good thing.

Received on Tuesday, 3 October 2000 12:16:39 UTC