[tei-council] Another issue with @pattern

James Cummings James.Cummings at oucs.ox.ac.uk
Mon Jun 8 05:25:44 EDT 2009


Sebastian Rahtz wrote:
> Lou Burnard wrote:
>> If the can of worms that @path opens proves to be a pandora's box, 
>> then I propose to withdraw it hastily, and replace it with one or 
>> other of the following less attractive hacks:
>>
>> a) restore the possibility of specifying that the locus of uncertainty 
>> is an attribute value by allowing for a value of "@" + anyWord on @locus
>>
>> b) replace @pattern by an ad hoc @attribute attribute
>>
>>   
> yikes no, stick with this good stuff. we can add and elucidate
> prose explanations at our leisure

I'd agree with Sebastian that @pattern provides a very useful mechanism 
and we shouldn't throw out the idea.  I just want us to be clear on how 
it is used and what it means.  It just needs some clear prose.

I think I've realised one of the reasons why people are confused as to 
the meaning of @pattern when we don't have a @target.  People are used, 
in XSLT, to putting <xsl:template match="@resp">  and having it acted 
upon (if possible) on any processed node in the document. However *all* 
template matches are a pattern which are always relative only to the 
context node that is currently being processed.  So it is only because 
template are applied at each level of the document to which templates 
are applied that such an instruction appears to become universal.  If we 
say that without a @target the context node is the root node of the 
document (TEI or teiCorpus) then we need to always be explicit in our 
patterns from there (so //*/@resp or text/body/div//choice/@resp etc.)

-James
-- 
Dr James Cummings, Research Technologies Service, University of Oxford
James dot Cummings at oucs dot ox dot ac dot uk


More information about the tei-council mailing list