[tei-council] Another issue with @pattern

O'Donnell, Dan daniel.odonnell at uleth.ca
Mon Jun 8 08:05:59 EDT 2009


I don't  seem able to cut out of James reply on my cell phone. But everything I'm hearing, especially his explanation of the origins of why people are finding this hard, tells me that the @target+ at pattern is a distraction. The key bit is the intro of @pattern+ at locus, not @target+ at pattern. 

The cost of having to explain the interaction of @target and @pattern, and the confusion it is introducing a special two-part, dual language path syntax so that people don't have to type //*[xml:id='x'] in this one case is simply too high. It also pushes people away from seeing just how powerful the mechanism is by encouraging them to think in terms of IDs rather than things like Lou's example of //*/@resp='#LB'

If we are really introducing a way of pointing using xpath and locus, which is what we are doing, let's encourage it to be used correctly. In for a nickel on for a dime, I say! 

-dan
-----------
Daniel O'Donnell
University of Lethbridge
(From my mobile telephone)

--- original message ---
From: "James Cummings" <James.Cummings at oucs.ox.ac.uk>
Subject: Re: [tei-council] Another issue with @pattern
Date: June 8, 2009
Time: 3:25:55 

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
_______________________________________________
tei-council mailing list
tei-council at lists.village.Virginia.EDU
http://lists.village.Virginia.EDU/mailman/listinfo/tei-council


More information about the tei-council mailing list