Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address #1981 with SchXslt (aka mausatron) instead of skeleton #2509

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions P5/Exemplars/tei_jtei.odd
Original file line number Diff line number Diff line change
Expand Up @@ -3061,18 +3061,16 @@
</constraintSpec>
<constraintSpec ident="jtei.sch-variables" scheme="schematron" xml:lang="zxx">
<constraint>
<sch:pattern>
<xsl:key name="idrefs" match="@target[starts-with(normalize-space(.), '#')]|@rendition[starts-with(normalize-space(.), '#')]" use="for $i in tokenize(., '\s+') return substring-after($i, '#')"/>
<sch:let name="double.quotes" value="'[&quot;“”]'"/>
<sch:let name="apos.typographic" value="'[‘’]'"/>
<sch:let name="apos.straight" value="''''"/>
<sch:let name="quotes" value="concat('[', $apos.straight, '&quot;]')"/>
<sch:let name="div.types.front" value="('abstract', 'acknowledgements', 'authorNotes', 'editorNotes', 'corrections', 'dedication')"/>
<!-- http://www.tei-c.org/release/doc/tei-p5-doc/VERSION produces
429 "Too Many Requests" errors -->
<sch:let name="tei.version.url" value="'https://jenkins.tei-c.org/job/TEIP5/lastStableBuild/artifact/P5/release/doc/tei-p5-doc/VERSION'"/>
<sch:let name="tei.version" value="if (unparsed-text-available($tei.version.url)) then normalize-space(unparsed-text($tei.version.url)) else ()"/>
</sch:pattern>
<xsl:key name="idrefs" match="@target[starts-with(normalize-space(.), '#')]|@rendition[starts-with(normalize-space(.), '#')]" use="for $i in tokenize(., '\s+') return substring-after($i, '#')"/>
<sch:let name="double.quotes" value="'[&quot;“”]'"/>
<sch:let name="apos.typographic" value="'[‘’]'"/>
<sch:let name="apos.straight" value="''''"/>
<sch:let name="quotes" value="concat('[', $apos.straight, '&quot;]')"/>
<sch:let name="div.types.front" value="('abstract', 'acknowledgements', 'authorNotes', 'editorNotes', 'corrections', 'dedication')"/>
<!-- http://www.tei-c.org/release/doc/tei-p5-doc/VERSION produces
429 "Too Many Requests" errors -->
<sch:let name="tei.version.url" value="'https://jenkins.tei-c.org/job/TEIP5/lastStableBuild/artifact/P5/release/doc/tei-p5-doc/VERSION'"/>
<sch:let name="tei.version" value="if (unparsed-text-available($tei.version.url)) then normalize-space(unparsed-text($tei.version.url)) else ()"/>
</constraint>
</constraintSpec>
<elementSpec ident="tag" module="tagdocs" mode="change">
Expand Down
21 changes: 20 additions & 1 deletion P5/Source/Specs/att.declarable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@
<att>decls</att>.</desc>
<desc versionDate="2007-05-04" xml:lang="es">proporciona atributos para los elementos contenidos en el encabezado que pueden ser seleccionados autónomamente mediante el atributo <att>decls</att> adecuado.</desc>
<desc versionDate="2007-01-21" xml:lang="it">individua attributi per gli elementi contenuti nell'intestazione che possono essere selezionati autonomamente grazie all'apposito attributo <att>decls</att></desc>
<constraintSpec ident="att-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern id="declarable" abstract="true">
<!-- parameter 'tde' is for "this declarable element (type)" -->
<sch:rule context="$tde[ ancestor::tei:teiHeader
and
following-sibling::$tde
and
not( preceding-sibling::$tde ) ]">
<sch:report test="../child::$tde[ not( @xml:id ) ]">
When there is more than one <sch:name/>, each must have an @xml:id
</sch:report>
<sch:assert test="count( ../child::$tde[ normalize-space( @default ) = ('1','true') ] ) eq 1">
When there is more than one <sch:name/>, one and only one must have a @default of 'true'.
</sch:assert>
</sch:rule>
</sch:pattern>
</constraint>
</constraintSpec>
<attList>
<attDef ident="default" usage="opt">
<desc versionDate="2005-10-10" xml:lang="en">indicates whether or not this element is selected by default when
Expand Down Expand Up @@ -61,7 +80,7 @@ il est sélectionné si son parent a été choisi</desc>
<remarks versionDate="2007-06-12" xml:lang="fr">
<p>Les règles régissant l'association d'éléments déclarables avec des parties
individuelles d'un texte TEI sont entièrement définies
au chap1itre <ptr target="#CCAS"/>. Un seul élément
au chap1itre <ptr target="#CCAS"/>. Un seul élément
d'un type particulier peut avoir un attribut <att>default</att> avec une valeur
<val>true</val>.</p>
</remarks>
Expand Down
7 changes: 7 additions & 0 deletions P5/Source/Specs/availability.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
<classRef key="model.pLike"/>
</alternate>
</content>
<constraintSpec ident="availability-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:availability"/>
</sch:pattern>
</constraint>
</constraintSpec>
<attList>
<attDef ident="status" usage="opt">
<gloss versionDate="2016-11-25" xml:lang="en">status</gloss>
Expand Down
31 changes: 18 additions & 13 deletions P5/Source/Specs/bibl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,25 @@
<memberOf key="model.biblPart"/>
</classes>
<content>

<alternate minOccurs="0" maxOccurs="unbounded">
<textNode/>
<classRef key="model.gLike"/>
<classRef key="model.highlighted"/>
<classRef key="model.pPart.data"/>
<classRef key="model.pPart.edit"/>
<classRef key="model.segLike"/>
<classRef key="model.ptrLike"/>
<classRef key="model.biblPart"/>
<classRef key="model.global"/>
</alternate>

<alternate minOccurs="0" maxOccurs="unbounded">
<textNode/>
<classRef key="model.gLike"/>
<classRef key="model.highlighted"/>
<classRef key="model.pPart.data"/>
<classRef key="model.pPart.edit"/>
<classRef key="model.segLike"/>
<classRef key="model.ptrLike"/>
<classRef key="model.biblPart"/>
<classRef key="model.global"/>
</alternate>
</content>
<constraintSpec ident="bibl-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:bibl"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-bibl-egXML-sb">
<bibl>Blain, Clements and Grundy: Feminist Companion to Literature in English (Yale,
Expand Down
7 changes: 7 additions & 0 deletions P5/Source/Specs/biblFull.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
</sequence>
</alternate>
</content>
<constraintSpec ident="biblFull-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:biblFull"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-biblFull-egXML-ov">
<biblFull>
Expand Down
7 changes: 7 additions & 0 deletions P5/Source/Specs/biblStruct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@
</alternate>
</sequence>
</content>
<constraintSpec ident="biblStruct-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:biblStruct"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-biblStruct-egXML-fg">
<biblStruct>
Expand Down
9 changes: 8 additions & 1 deletion P5/Source/Specs/broadcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,19 @@
<memberOf key="model.recordingPart"/>
</classes>
<content>
<alternate>
<alternate>
<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>
<classRef key="model.biblLike"/>
<elementRef key="recording"/>
</alternate>
</content>
<constraintSpec ident="broadcast-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:broadcast"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-broadcast-egXML-fk">
<broadcast>
Expand Down
11 changes: 8 additions & 3 deletions P5/Source/Specs/correction.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,15 @@
<memberOf key="model.editorialDeclPart"/>
</classes>
<content>

<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>

<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>
</content>
<constraintSpec ident="correction-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:correction"/>
</sch:pattern>
</constraint>
</constraintSpec>
<attList>
<attDef ident="status" usage="opt">
<desc versionDate="2005-01-14" xml:lang="en">indicates the degree of correction applied to the text.</desc>
Expand Down
15 changes: 9 additions & 6 deletions P5/Source/Specs/correspDesc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@
<content>
<!-- modeled after publicationStmt -->
<alternate>

<classRef key="model.correspDescPart" minOccurs="1" maxOccurs="unbounded"/>


<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>

<classRef key="model.correspDescPart" minOccurs="1" maxOccurs="unbounded"/>
<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>
</alternate>
</content>
<constraintSpec ident="correspDesc-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:correspDesc"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-correspDesc-egXML-ve">
<correspDesc>
Expand Down
17 changes: 11 additions & 6 deletions P5/Source/Specs/editorialDecl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ during the encoding of a text.</desc>
<memberOf key="model.encodingDescPart"/>
</classes>
<content>

<alternate minOccurs="1" maxOccurs="unbounded">
<classRef key="model.pLike"/>
<classRef key="model.editorialDeclPart"/>
</alternate>

<alternate minOccurs="1" maxOccurs="unbounded">
<classRef key="model.pLike"/>
<classRef key="model.editorialDeclPart"/>
</alternate>
</content>
<constraintSpec ident="editorialDecl-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:editorialDecl"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-editorialDecl-egXML-be">
<editorialDecl>
Expand Down
11 changes: 8 additions & 3 deletions P5/Source/Specs/equipment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ an audio or video recording used as the source for a spoken text.</desc>
<memberOf key="model.recordingPart"/>
</classes>
<content>

<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>

<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>
</content>
<constraintSpec ident="equipment-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:equipment"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-equipment-egXML-gt">
<equipment>
Expand Down
7 changes: 7 additions & 0 deletions P5/Source/Specs/geoDecl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
<content>
<macroRef key="macro.phraseSeq"/>
</content>
<constraintSpec ident="geoDecl-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:geoDecl"/>
</sch:pattern>
</constraint>
</constraintSpec>
<attList>
<attDef ident="datum" usage="opt">
<desc versionDate="2007-06-25" xml:lang="en">supplies a commonly used code name for the datum employed.</desc>
Expand Down
11 changes: 8 additions & 3 deletions P5/Source/Specs/hyphenation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@
<memberOf key="model.editorialDeclPart"/>
</classes>
<content>

<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>

<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>
</content>
<constraintSpec ident="hyphenation-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:hyphenation"/>
</sch:pattern>
</constraint>
</constraintSpec>
<attList>
<attDef ident="eol" usage="opt">
<gloss versionDate="2007-07-04" xml:lang="en">end-of-line</gloss>
Expand Down
11 changes: 8 additions & 3 deletions P5/Source/Specs/interpretation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@
<memberOf key="model.editorialDeclPart"/>
</classes>
<content>

<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>

<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>
</content>
<constraintSpec ident="interpretation-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:interpretation"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-interpretation-egXML-be">
<interpretation>
Expand Down
19 changes: 11 additions & 8 deletions P5/Source/Specs/langUsage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@
<memberOf key="model.profileDescPart"/>
</classes>
<content>
<alternate>

<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>


<elementRef key="language" minOccurs="1" maxOccurs="unbounded"/>

</alternate>
<alternate>
<classRef key="model.pLike" minOccurs="1" maxOccurs="unbounded"/>
<elementRef key="language" minOccurs="1" maxOccurs="unbounded"/>
</alternate>
</content>
<constraintSpec ident="langUsage-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:langUsage"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-langUsage-egXML-ev">
<langUsage>
Expand Down
9 changes: 8 additions & 1 deletion P5/Source/Specs/listApp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@
</alternate>
</sequence>
</content>
<exemplum versionDate="2012-08-06" xml:lang="en">
<constraintSpec ident="listApp-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:listApp"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en" versionDate="2012-08-06">
<p>In the following example from the exegetical Yasna, the base text is encoded in the <gi>body</gi> of
the document, and two separate <gi>listApp</gi> elements are used in the <gi>back</gi>, containing
variant readings written in different scripts.</p>
Expand Down
7 changes: 7 additions & 0 deletions P5/Source/Specs/listBibl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
</sequence>
</sequence>
</content>
<constraintSpec ident="listBibl-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:listBibl"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-listBibl-egXML-eb">
<listBibl>
Expand Down
7 changes: 7 additions & 0 deletions P5/Source/Specs/listEvent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
</sequence>
</sequence>
</content>
<constraintSpec ident="listEvent-is-declarable" scheme="schematron" xml:lang="en">
<constraint>
<sch:pattern is-a="declarable">
<sch:param name="tde" value="tei:listEvent"/>
</sch:pattern>
</constraint>
</constraintSpec>
<exemplum xml:lang="en">
<egXML xmlns="http://www.tei-c.org/ns/Examples" xml:id="gi-listEvent-egXML-ad">
<listEvent>
Expand Down
Loading