From: <wol...@ex...> - 2013-08-27 18:54:38
|
Hi, > util:index-keys(//@target, "", util:function('local:termCallback', 2), 1000) The XQuery 3 way of referencing a known function would be local:termCallback#2, so you can rewrite the expression to: util:index-keys(//@target, "", local:termCallback#2, 1000) > I also have a supplementary question about indexes and namespaces. In a > TEI document, the elements are in the TEI namespace, but most attributes > are not in a namespace (since they're unprefixed). So I assume that this > is the correct way to set up indexes: > > <index xmlns:tei="http://www.tei-c.org/ns/1.0"> > [...] > <create qname="tei:ref" type="xs:string"/> > <create qname="@target" type="xs:string"/> > […] Yes, correct. > In other words, for this: > > <ref target="#fred>Fred Bloggs</ref> > > the <ref> element text content index needs the tei: prefix, but its > child attribute is not in a namespace so it doesn't. Am I right? Yes. Wolfgang |