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

Hugh Cayless philomousos at gmail.com
Wed Oct 15 21:07:09 EDT 2014


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?

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