[tei-council] cRefPattern discussion in CO

Syd Bauman Syd_Bauman at Brown.edu
Tue Oct 23 07:13:11 EDT 2007


I've been trying to wrap my mind around your point here, Lou, and I'm
sorry to say I was having a lot of trouble. But then I realized that
there is a crucial assumption that probably should be made explicit
in CO: that result of evaluating a cRef= is always an absolute URI.
If after evaluating the <cRefPattern> the processor is left with a
relative URI (as is the case in the example in CO), then it should
be combined with the value of xml:base= (as would be done for href=
in XHTML, and probably for target= in TEI, although I'm not sure we
ever say that explicitly).

So the example in CO is creating the xpointer() part of a URI, but it
is presumed that xml:base= points elsewhere, not to the current
document. That's probably a bad assumption. I think we should fix
that.


So the canonical reference system as currently written is an
extremely powerful system that even when used in a pretty simple way
permits stuff people want to do, e.g. indicating a particular path on
any one of a number of servers:

      <refsDecl>
        <cRefPattern matchPattern="tei(..)"
          replacementPattern="http://bauman.zapto.org/~syd/temp/Guidelines-web/en/html/$1.html"
        />
        <cRefPattern matchPattern="tei(..)"
          replacementPattern="http://tei.oucs.ox.ac.uk/P5/Guidelines-web/en/html/$1.html"
        />
        <cRefPattern matchPattern="tei(..)"
          replacementPattern="http://www.tei-c.org/release/doc/tei-p5-doc/en/html/$1.html"
        />
      </refsDecl>
      <!-- elsewhere ... -->
      See <ptr cRef="teiSA"/>.

But moreover, it permits re-arranging the parsable pieces of the
cRef= value in order to come up with the path to the eventual target. 

      <refsDecl>
        <cRefPattern matchPattern="((..).*)"
          xml:base="http://bauman.zapto.org/"
          replacementPattern="~syd/temp/Guidelines-web/en/html/$2.html#$1"
        />
        <cRefPattern matchPattern="((..).*)"
          xml:base="http://tei.oucs.ox.ac.uk/"
          replacementPattern="P5/Guidelines-web/en/html/$2.html#$1"
        />
        <cRefPattern matchPattern="((..).*)"
          xml:base="http://www.tei-c.org/"
          replacementPattern="release/doc/tei-p5-doc/en/html/$2.html#$1"
        />
      </refsDecl>
      <!-- elsewhere ... -->
      I found errors in <ptr cRef="SACR"/>, which I will send to Lou
      later today. 




More information about the tei-council mailing list