API documentation
The readcitable
function
Use the readcitable
function to create a citable corpus from a source document.
CitableTeiReaders.readcitable
— FunctionRead from src
a citable document identified by urn
. Its citation scheme must be parseable using the type citescheme
.
readcitable(src, urn, citescheme)
Read from file fname
a citable document identified by urn
. Its citation scheme must be parseable using the type citescheme
.
readcitable(fname, urn, citescheme, rdr)
Read from url
a citable document identified by urn
. Its citation scheme must be parseable using the type citescheme
.
readcitable(url, urn, citescheme, rdr)
Implementation of readcitable
for type TEIPoeticLine
.
Implementation of readcitable
for type TEIAnonblock
.
Implementation of readcitable
for type TEIDivAb
.
Implementation of readcitable
for type TEIDivLine
.
Implementation of readcitable
for type TEIDivDivLine
.
Implementation of readcitable
for type TEIDivDivDiv
.
Implementation of readcitable
for type TEIThreeDivsGrouped
.
Implementation of readcitable
for type DelimitedText
.
Implementation of readcitable
for type TEIDivDivDiv
.
Subtypes of CiteStructureTrait
Any package can implement the CiteStructure
with a custom type to supply to the readcitable
function. The following types are included in the CitableTeiReaders
package.
Delimited-text file
CitableTeiReaders.DelimitedText
— TypeSingleton type for delimited-text document with citation scheme of arbitrary depth already expressed with URNs.
XML cited by one-tier citation scheme
CitableTeiReaders.TEIPoeticLine
— TypeSingleton type for TEI document cited by poetic line using TEI l
.
CitableTeiReaders.TEIAnonblock
— TypeSingleton type for TEI document cited by prose block using TEI ab
.
XML cited by two-tier citation scheme
CitableTeiReaders.TEIDivAb
— TypeSingleton type for TEI document cited in two tiers using TEI div
and ab
elements.
CitableTeiReaders.TEIDivLine
— TypeSingleton type for TEI document cited in two tiers using TEI div
and l
.
XML cited by three-tier citation scheme
CitableTeiReaders.TEIDivDivDiv
— TypeSingleton type for TEI document cited in three tiers using TEI div
, div
and div
.
CitableTeiReaders.TEIThreeDivsGrouped
— TypeSingleton type for grouped TEI documents cited in three tiers using TEI group
, div
and div
.
A useful utility function
CitableTeiReaders.ezxmlstring
— Functionezxmlstring(n)
Serialize an EzXML.Node
to an XML string. If a node n
was created by parsing an XML string, the output of ezxmlstring(n)
will be XML equivalent to the source string.
Functions used internally
CitableTeiReaders.citeNAttr
— FunctionciteNAttr(n, docUrn)
Construct a CitablePassage
from an element with a citable value on @n
attribute.
citeNAttr(n, docUrn, psg)
Construct a CitablePassage
from an element with citable value on @n
attribute.
CitableTeiReaders.nodefromline
— FunctionCreate a CitablePassage
from a string of delimited text.