Skip to content

Commit

Permalink
improve schema for sourcesTEI #68
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Nov 13, 2024
1 parent 205fafa commit 07ddd6e
Show file tree
Hide file tree
Showing 6 changed files with 4,139 additions and 3,416 deletions.
3,284 changes: 1,177 additions & 2,107 deletions compiled-ODD/guidelines-de-wegaSourcesTEI.compiled.xml

Large diffs are not rendered by default.

372 changes: 301 additions & 71 deletions schema/de/wegaSourcesTEI.isosch

Large diffs are not rendered by default.

1,941 changes: 1,326 additions & 615 deletions schema/de/wegaSourcesTEI.rng

Large diffs are not rendered by default.

1,918 changes: 1,314 additions & 604 deletions schema/en/wegaSourcesTEI.rng

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Specs/common-specs.odd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2722,7 +2722,7 @@
</constraintSpec>
<constraintSpec scheme="schematron" ident="relatedItem-target-within-notesStmt">
<constraint>
<sch:rule context="tei:relatedItem[parent::tei:notesStmt]">
<sch:rule context="tei:relatedItem[parent::tei:notesStmt][not(starts-with(ancestor::tei:TEI/@xml:id, 'A22'))]"><!-- exception for sourcesTEI -->
<sch:assert test="@target and @type">Within the notesStmt you must supply both the @target and the @type attribute on <sch:name/>.</sch:assert>
<sch:assert test="starts-with(@target, 'wega:')">Within the notesStmt, pointers to WeGA resources with the @target attribute must be prefixed with 'wega:'.</sch:assert>
</sch:rule>
Expand Down
38 changes: 20 additions & 18 deletions src/Specs/schemaSpec-sourcesTEI.odd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:sch="http://purl.oclc.org/dsdl/schematron">
<moduleRef key="core" include="address author bibl biblStruct date divGen editor graphic head hi imprint item label lb list mentioned monogr name note p postCode publisher pubPlace q quote ref relatedItem rs street term title"/>
<moduleRef key="tei"/>
<moduleRef key="header" include="availability editionStmt fileDesc keywords licence notesStmt profileDesc publicationStmt sourceDesc teiHeader textClass titleStmt"/>
<moduleRef key="header" include="availability change editionStmt fileDesc keywords licence notesStmt profileDesc publicationStmt revisionDesc sourceDesc teiHeader textClass titleStmt"/>
<moduleRef key="textstructure" include="TEI body div front text titlePage titlePart"/>
<moduleRef key="namesdates" include="country orgName persName placeName settlement"/>
<moduleRef key="figures" include="cell figDesc figure row table"/>
Expand All @@ -17,7 +17,7 @@
<specGrpRef target="../Specs/common-specs.odd.xml#wega-common-constraints"/>
<specGrpRef target="../Specs/common-specs.odd.xml#wega-common-atts"/>
<specGrpRef target="../Specs/common-specs.odd.xml#wega-tei-atts"/>
<!-- <specGrpRef target="../Specs/common-specs.odd.xml#wega-core"/>-->
<specGrpRef target="../Specs/common-specs.odd.xml#wega-core"/>
<specGrpRef target="../Specs/common-specs.odd.xml#wega-header"/>
<specGrpRef target="../Specs/common-specs.odd.xml#wega-textstructure"/>
<specGrpRef target="../Specs/common-specs.odd.xml#wega-namesdates"/>
Expand Down Expand Up @@ -71,6 +71,24 @@
</attList>
</elementSpec>

<elementSpec ident="teiHeader" module="header" mode="change">
<content>
<sequence>
<elementRef key="fileDesc"/>
<elementRef key="profileDesc"/>
<elementRef key="revisionDesc"/>
</sequence>
</content>
<constraintSpec scheme="isoschematron" ident="seriesTitle">
<constraint>
<sch:rule context="tei:fileDesc/tei:titleStmt/tei:title[@level='s']">
<sch:assert test=".='WeGA, Textquellen, Digitale Edition'">The series title must be
"WeGA, Textquellen, Digitale Edition".</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
</elementSpec>

<elementSpec ident="publicationStmt" mode="change" module="header">
<classes mode="change">
<memberOf key="att.global" mode="delete"/>
Expand Down Expand Up @@ -135,20 +153,4 @@
</attList>
</elementSpec>

<!--
temporarily overwrite the default note definition
NB, this entails disabling the import of #wega-core at line 20
-->
<elementSpec ident="note" mode="change" module="core">
<attList>
<attDef ident="type" mode="change">
<valList mode="add" type="closed">
<valItem ident="Kurzbeschreibung"/>
<valItem ident="Verweise"/>
<valItem ident="Anmerkungen"/>
</valList>
</attDef>
</attList>
</elementSpec>

</schemaSpec>

0 comments on commit 07ddd6e

Please sign in to comment.