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

Hugh Cayless philomousos at gmail.com
Thu Oct 16 09:22:19 EDT 2014


Quite right. I'd forgotten that. Agreed on the need for standardizing this.
Another question which occurs to me: now that TEI XPointers are (I hope)
viable, should we recommend using them in @target instead of @match? Does
@match do anything @target can't now do?

Hugh

On Thu, Oct 16, 2014 at 8:43 AM, Martin Holmes <mholmes at uvic.ca> wrote:

> 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