[tei-council] tei: prefix in @match attribute

Martin Holmes mholmes at uvic.ca
Thu Oct 16 08:43:52 EDT 2014


On 14-10-15 06:07 PM, Hugh Cayless wrote:
> Yeah, that can’t be right. I think we should assume the @match XPath
> relies on the namespace declarations available in its context. If we
> *wanted* to use that prefix, I think the example would have to be
> something like:
>
>> <certainty xmlns:tei="http://www.tei-c.org/ns/1.0"
>> match="parent::tei:gap/@reason" locus="value" cert="low"/>
>
> (or to make clear that the tei prefix had been declared on some
> ancestor element). It’s not a great XPath anyway…wouldn’t ../@reason
> be more idiomatic?

Actually, according to other bits of the Guidelines, the default context 
IS the parent element, so @reason should be fine. We need to look at 
standardizing all this.

Cheers,
Martin
>
> On Oct 15, 2014, at 19:13 , Martin Holmes <mholmes at uvic.ca> wrote:
>
>> Hi all,
>>
>> This example:
>>
>> <certainty match="parent::tei:gap/@reason" locus="value"
>> cert="low"/>
>>
>> which appears in this spec:
>>
>> <http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-certainty.html>
>>
>>
>>
uses a tei: prefix in the @match attribute, to point to the parent 
element. Why does it do that? Do we assume that the default element 
namespace in the XML document is not inherited by the XPath context for 
the match expression? Even if that's the case, doesn't it require that a 
tei: prefix be defined somewhere before it can be used?
>>
>> Cheers, Martin -- tei-council mailing list
>> tei-council at lists.village.Virginia.EDU
>> http://lists.village.Virginia.EDU/mailman/listinfo/tei-council
>>
>> PLEASE NOTE: postings to this list are publicly archived
>


More information about the tei-council mailing list