Skip to content

Instantly share code, notes, and snippets.

@dmj
Created October 18, 2020 10:39
Show Gist options
  • Select an option

  • Save dmj/d63a2688e964fbcf7e33fc78486c07b3 to your computer and use it in GitHub Desktop.

Select an option

Save dmj/d63a2688e964fbcf7e33fc78486c07b3 to your computer and use it in GitHub Desktop.
TEI Stylesheets Issue 467
<?xml version="1.0"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
<teiHeader>
<fileDesc>
<titleStmt>
<title>My TEI Extension</title>
<author>generated by Roma 5.0.1</author>
</titleStmt>
<publicationStmt>
<p>for use by whoever wants it</p>
</publicationStmt>
<notesStmt>
<note type="ns">http://www.example.org/ns/nonTEI</note>
</notesStmt>
<sourceDesc>
<p>created on Saturday 17th October 2020 06:10:57 PM</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<front>
<divGen type="toc"/>
</front>
<body>
<schemaSpec ident="myTEI" docLang="en" prefix="tei_" xml:lang="en">
<moduleRef key="core" except=""/>
<moduleRef key="tei" except=""/>
<moduleRef key="header" except=""/>
<moduleRef key="textstructure" except=""/>
<elementSpec ident="bibl" module="core" mode="change">
<attList>
<attDef ns="http://www.tei-c.org/ns/1.0" ident="new-attribute" mode="add" usage="req">
<desc>My Attribute</desc>
</attDef>
</attList>
</elementSpec>
</schemaSpec>
</body>
</text>
</TEI>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc">
<p:output port="result"/>
<p:load content-type="application/xml" href="example.odd"/>
<p:xslt>
<p:with-input port="stylesheet" href="../odd2odd.xsl"/>
</p:xslt>
<p:xslt>
<p:with-input port="stylesheet" href="../odd2relax.xsl"/>
</p:xslt>
</p:declare-step>
element bibl {
(text
| tei_model.gLike
| tei_model.highlighted
| tei_model.pPart.data
| tei_model.pPart.edit
| tei_model.segLike
| tei_model.ptrLike
| tei_model.biblPart
| tei_model.global)*,
tei_att.global.attributes,
tei_att.declarable.attributes,
tei_att.typed.attributes,
tei_att.sortable.attributes,
tei_att.docStatus.attributes,
## My Attribute
attribute tei:new-attribute { text },
empty
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment