TEIC / TEI-Simple

Legacy Repository: TEI SimplePrint now merged into TEI Repository. Originally TEI Simple aimed to define a new highly-constrained and prescriptive subset of the Text Encoding Initiative (TEI) Guidelines suited to the representation of early modern and modern books, a formally-defined set of processing model rules that enable web applications to easily present and analyze the encoded texts, mapping to other ontologies, and processes to describe the encoding status and richness of a TEI digital text.
50 stars 12 forks source link

What should functions do with xpath expressions that return multiple nodes. #1

Closed buckett closed 9 years ago

buckett commented 9 years ago

Functions often take an xpath expression and in the examples it's often the current node, but what should happen if the xpath expression returns multiple nodes?

<model behaviour="block(.//)"/>

Here we're returning all nodes below the current node as asking them to be formatted as block(wrapped with a <div>)

sebastianrahtz commented 9 years ago

This behaves like xsl apply-templates. the task is to visit all the children of the identified nodes and process them using the usual rules.

Your .// isn't valid XPath :-}

buckett commented 9 years ago

Ok so my example should be descendant-or-self::*, but to confirm I should build a block for each encountered node?

sebastianrahtz commented 9 years ago

hmm. no. you build a block for the current node, wrapped around the processing of descendant-or-self::* and whatever they ask for.

On 24 March 2015 at 16:01, Matthew Buckett notifications@github.com wrote:

Ok so my example should be descendant-or-self::*, but to confirm I should build a block for each encountered node?

— Reply to this email directly or view it on GitHub https://github.com/TEIC/TEI-Simple/issues/1#issuecomment-85577081.

Sebastian Rahtz

Director (Research) of Academic IT

University of Oxford IT Services

13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431

Não sou nada.

Nunca serei nada.

Não posso querer ser nada.

À parte isso, tenho em mim todos os sonhos do mundo.