tei

XSLT 2.0 moving a node (created in first step of a multi-step transformation)

自作多情 提交于 2020-02-06 13:10:02
问题 XML and the XSLT 2.0 files for this question are found at https://xsltfiddle.liberty-development.net/6qVRKwX/3 I am trying to 'move' an element ahead of outputting a section of HTML. This element was created during the first part of the transformation) using @mode to insert footnote numbers into the text. The first mode fn-add-marker creates <fn-marker/> to hold the footnote number. The second mode number then inserts incremented footnote numbers. All of this works fine (through to line 52

XSLT 2.0 moving a node (created in first step of a multi-step transformation)

岁酱吖の 提交于 2020-02-06 13:09:24
问题 XML and the XSLT 2.0 files for this question are found at https://xsltfiddle.liberty-development.net/6qVRKwX/3 I am trying to 'move' an element ahead of outputting a section of HTML. This element was created during the first part of the transformation) using @mode to insert footnote numbers into the text. The first mode fn-add-marker creates <fn-marker/> to hold the footnote number. The second mode number then inserts incremented footnote numbers. All of this works fine (through to line 52

Traversing TEI in Python 3, text comes up empty for some entities

青春壹個敷衍的年華 提交于 2020-01-16 04:59:08
问题 I have a TEI-encoded xml file with entities as follows: <sp> <speaker rend="italic">Sampson.</speaker> <ab> <lb n="5"/> <hi rend="italic">Gregory:</hi> <seg type="homograph">A</seg> my word wee'l not carry coales.<lb n="6"/> </ab> </sp> <sp> <speaker rend="italic">Greg.</speaker> <ab>No, for then we should be Colliars. <lb n="7" rend="rj"/> </ab> </sp> The full file is very large but can be accessed here: http://ota.ox.ac.uk/desc/5721. I'm attempting to use Python 3 to traverse the xml and

eXist-db - basic Lucene query returns empty sequence

烈酒焚心 提交于 2019-12-24 11:57:51
问题 In eXist-db 4.4 I am attempting to implement a basic Lucene query structure, but it is returning no results. In /db/apps/deheresi/data I have a collection of tei-xml documents which have the same structure, and I want to apply my query only to the text content found within the element tei:seg and its descendants. A typical sample would be: <TEI> <text> [...] <seg type="dep_event" subtype="event" xml:id="MS609-0001-1"> <pb n="1r"/> <lb break="n" n="1"/> <date type="deposition_date" when="1245

eXist DB and Xquery : xincludes or collections (TEI-XML)?

一曲冷凌霜 提交于 2019-12-24 10:08:05
问题 I have a corpus in TEI-XML which uses a 'master' corpus XML document that then contains, via xi:include , thousands of other documents. Each of these documents themselves contain xi:include s to master lists of named entities (people, places, etc linked by xml:id s) . All of this works very well in XSLT (and in my IDE Oxygen for fast encoding). I am now embarking on building a website using eXist-DB applications. I am rewriting everything directly in Xquery (to replace XSLT), and I have hit

XSLT 2.0 creating incremental footnote numbers in HTML output through multi-stage transformation

北战南征 提交于 2019-12-20 07:36:38
问题 This question builds on the responses to my original question, where it was suggested that I post a followup. This concerns attempting to integrate the XSL code from the previous post. In the previous question I presented a simplified version of the TEI:XML document I am transforming into HTML using XSLT 2.0 (the full tei file and current xslt can be found here https://xsltfiddle.liberty-development.net/bdxtqT/6). This is a fuller view of the hierarchy, but not all details: <tei> <teiHeader/>

XSL 2.0 - generating distinct urls from nested elements

馋奶兔 提交于 2019-12-13 03:24:08
问题 I have tei-xml files where I've marked up named entities within medieval documents, in particular people's names using <persName/> . A simple example: <persName nymref="#Bernard_Faure_Senior">Bernardus Fabri senior</persName> However, there are often names in the manuscript where I need to mark up "Raimunda uxor Bernardi Fabri" (ie "Raimunda, wife of Bernard Faure"). Here I markup both names, in nested fashion: <persName nymref="#Raimunda_Faure">Raimunda uxor <persName nymref="#Bernard_Faure

Transform XML to HTML in XSLT with string length condition

橙三吉。 提交于 2019-12-08 02:27:23
问题 I have a XML file using TEI build like that: <div type="chapter" n="1"> <p> <s xml:id="e_1">sentence e1.</s> <s xml:id="f_1">sentence f1</s> </p> <p> <s xml:id="e_2"> sentence e2</s> <s xml:id="f_2"> sentence f2</s> </p> </div> <div type="chapter" n="2"> <!-- --> </div> I need to transform it to this HTML structure: <div> <h1>Chapter 1</h1> <div class="book-content"> <p> <span class='source-language-sent' data-source-id='1'>sentence e1.</span> <span id='1' style='display:none'>sentence f1<

XSL:FO float for displaying margin notes - breaks document

风流意气都作罢 提交于 2019-12-07 16:39:37
问题 I have a large medieval manuscript transcribed into XML (using TEI schema). I am using xsl:fo and Apache FOP to process into PDF. The file is constructed using nested <body> , <p> , <seg> as shown below. Occasionally <add> is used for margin notes. <body> <p> <title>title here</title> <seg>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque a orci non mauris convallis imperdiet consequat nec purus. Cras mollis lacus vel lectus facilisis, non hendrerit velit tempor. Phasellus

Transform XML to HTML in XSLT with string length condition

浪子不回头ぞ 提交于 2019-12-06 08:23:43
I have a XML file using TEI build like that: <div type="chapter" n="1"> <p> <s xml:id="e_1">sentence e1.</s> <s xml:id="f_1">sentence f1</s> </p> <p> <s xml:id="e_2"> sentence e2</s> <s xml:id="f_2"> sentence f2</s> </p> </div> <div type="chapter" n="2"> <!-- --> </div> I need to transform it to this HTML structure: <div> <h1>Chapter 1</h1> <div class="book-content"> <p> <span class='source-language-sent' data-source-id='1'>sentence e1.</span> <span id='1' style='display:none'>sentence f1</span> </p> <p> <span class='source-language-sent' data-source-id='2'>sentence e2</span> <span id='2'