Questions tagged [tei]

Text Encoding Initiative, a semantically rich XML-based language for marking up literature such as classical documents.

TEI stands for Text Encoding Initiative, a semantically rich XML-based language for marking up literature (prose, poetry, drama) such as classical documents.

Links

148 questions
2
votes
2 answers

Use One Template for Attribute (by Value) and Another for the (Parent) Node

I am getting this ambiguous match warning on a largish (420 lines) XSL transformation of a large (TEI-flavored) XML file (~6000 lines) (using Saxon-HE 9.5.1.6J on OS X). I'd like to understand (and fix) the warning. Recoverable error XTRE0540:…
cforster
  • 577
  • 2
  • 7
  • 19
1
vote
2 answers

Resolving pointer schemas in TEI

Text Encoding Initiative reccomends using various pointer schemes. Are there already any XSLT (<= 2.0) implementations which can deal with resolving them? For instance, resolving of @corresp="#range(#id1, #id5)"
o-sapov
  • 320
  • 2
  • 13
1
vote
2 answers

Add a new element surrounding a given word in the texts of a given element and its tail using lxml

So I have a relatively complex XML encoding where the text can contain an open number of elements. Let's take this simplified example:

-I like James he said to her , but I am not sure James understands…

José
  • 533
  • 1
  • 4
  • 14
1
vote
1 answer

Export text from xml with self-closing tag

I have a set of XML TEI files, containing transcriptions of document. I would like to parse these XML file and extract only text informations. My XML looks like:
hedone5628
  • 13
  • 2
1
vote
1 answer

how to use following-sibling correctly

I have an XML that sort of looks like this: New York New Jersey visiting my grandma
Laura P
  • 23
  • 4
1
vote
1 answer

xpath for selecting xml elements between two milestones/empty elements

In the following xml file, I have encoded the structure of a text as div elements as well as the layout information (two columns) of the book containing the text using empty pb (page beginning) and cb (column beginning) elements. XML/TEI…
np18
  • 25
  • 4
1
vote
1 answer

How to transform HTML into XML-TEI with PHP?

I need to turn some HTML strings into an XML file written with a specific set of TEI (Text Encoding Initiative) tags. That file should then be provided to lodel, a web-based academic publishing system, in order to get published online. A bit more…
ept0915
  • 13
  • 4
1
vote
0 answers

Why does lxml cut out one piece of an XML file?

I am using pyspellchecker spell checking library in order to post-correct the OCR output of a text in French. I use lxml for extracting only the raw text from a TEI-XML file, in order to apply the spell checker afterwards. The corrections apply…
ljushu
  • 105
  • 1
  • 10
1
vote
1 answer

Is there a way to have an Xquery in an XSLT stylesheet which will be executed upon transformation?

I have an XML file which I've been trying to transform both with xQuery and XSLT at the same moment. The document basically encodes two different types of text according to TEI standards. The first part is a philological study which I have written…
1
vote
1 answer

Write TEI compliant XML File with xQuery using xmldb:store while iterating over documents

So I need to iterate over a given set of XML documents, search for encoding errors and then create a XML file, that's compliant with TEI standards and has a table in its body containing the file names and the errors of each file structured like…
1
vote
1 answer

XPath query on exist-db returns no hits

I'm running a clean exist-db 4.5.0 on MacOS. Just installed the "shakespeare" package for testing. When im running the following request via browser I get no hits. But the he5.xml is a valid TEI file and contains in the body one text element.…
zypro
  • 1,158
  • 3
  • 12
  • 33
1
vote
0 answers

Substitution using regex with line breaks on a folder of text files

I have hundreds of text files of OCRed law journals that I'm ultimately encoding in TEI-XML. I'm doing a lot of cleaning using regex. I've been doing this cleaning using Oxygen XML editor, which does a nice job for single find-and-replace…
Will Hanley
  • 457
  • 3
  • 16
1
vote
2 answers

MarkLogic search:search() not searching a specific TEI element

I have a MarkLogic database containing TEI XML documents. I built an application to search and display these documents. During testing, we found that certain keywords were not being found when searched and narrowed down the problem to realize that…
user2725782
  • 139
  • 9
1
vote
1 answer

eXist-db - basic Lucene query returns empty sequence

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…
jbrehr
  • 775
  • 6
  • 19
1
vote
1 answer

eXist-DB transformation failure with XSLT - where to find error log?

Environment: eXist 4.2.1 - xquery 3.1 - xslt 3.0 - TEI-XML document Using the eXide interface, I am attempting to do a transformation of a TEI-XML document with an XSL file, with an output of HTML. Until now I have been developing XML documents and…
jbrehr
  • 775
  • 6
  • 19
1
2
3
9 10