Skip to content

Commit

Permalink
Update TP ODD schema to allow @PB:mode introduced in tei-publisher-lib 3
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangmm committed Mar 1, 2024
1 parent 2053648 commit 11ad56c
Show file tree
Hide file tree
Showing 5 changed files with 4,613 additions and 956 deletions.
35 changes: 27 additions & 8 deletions odd/ns1.tmp
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://teipublisher.com/1.0" xmlns:ns1="http://teipublisher.com/1.0" xmlns:dcr="http://www.isocat.org/ns/dcr" xmlns:teix="http://www.tei-c.org/ns/Examples" xmlns:tei="http://www.tei-c.org/ns/1.0">
<xs:import namespace="http://www.isocat.org/ns/dcr" schemaLocation="dcr.tmp"/>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://teipublisher.com/1.0" xmlns:ns1="http://teipublisher.com/1.0" xmlns:teix="http://www.tei-c.org/ns/Examples" xmlns:tei="http://www.tei-c.org/ns/1.0">
<xs:import namespace="http://www.tei-c.org/ns/1.0" schemaLocation="teipublisher_odds.xsd.tmp"/>
<xs:import namespace="http://www.tei-c.org/ns/Examples" schemaLocation="teix.tmp"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.tmp"/>
<xs:attribute name="mode">
<xs:annotation>
<xs:documentation/>
</xs:annotation>
<xs:simpleType>
<xs:union memberTypes="xs:Name">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="*">
<xs:annotation>
<xs:documentation/>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="text()">
<xs:annotation>
<xs:documentation/>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
<xs:element name="template">
<xs:complexType mixed="true">
<xs:group minOccurs="0" maxOccurs="unbounded" ref="tei:anyElement-template"/>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="tei:anyElement_template_6"/>
<xs:attributeGroup ref="tei:tei_att.global.attribute.xmlspace"/>
</xs:complexType>
</xs:element>
<xs:element name="behaviour">
<xs:complexType>
<xs:sequence>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group minOccurs="0" ref="tei:tei_model.glossLike"/>
<xs:group minOccurs="0" ref="tei:tei_model.descLike"/>
</xs:sequence>
<xs:group minOccurs="0" maxOccurs="unbounded" ref="tei:tei_model.descLike"/>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="ns1:param"/>
<xs:element ref="ns1:template"/>
</xs:sequence>
Expand All @@ -31,7 +50,7 @@
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:pattern value="(\p{L}|\p{N}|\p{P}|\p{S})+"/>
<xs:pattern value="[^\p{C}\p{Z}]+"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
Expand Down
35 changes: 17 additions & 18 deletions odd/teipublisher_odds.odd
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<TEI xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="http://www.tei-c.org/ns/1.0" xmlns:teix="http://www.tei-c.org/ns/Examples"
xmlns:pb="http://teipublisher.com/1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0">
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:pb="http://teipublisher.com/1.0" xmlns:teix="http://www.tei-c.org/ns/Examples" xmlns:rng="http://relaxng.org/ns/structure/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>TEI Publisher Customization for ODD Authoring
<desc>Utility ODD defining extensions to the TEI Processing Model. Used to generate a schema for validation.</desc></title>
<title>TEI Publisher Customization for ODD Authoring</title>
<author>Wolfgang Meier</author>
</titleStmt>
<publicationStmt>
Expand Down Expand Up @@ -37,7 +35,7 @@
<desc>Data type for elementSpec/@ident</desc>
<content>
<alternate>
<dataRef name="Name"></dataRef>
<dataRef name="Name"/>
<valList>
<valItem ident="*"/>
<valItem ident="text()"/>
Expand All @@ -49,10 +47,8 @@
<content>
<sequence>
<elementRef key="behaviour" minOccurs="0" maxOccurs="unbounded"/>
<elementRef key="rendition" minOccurs="0"
maxOccurs="unbounded"/>
<elementRef key="namespace" minOccurs="0"
maxOccurs="unbounded"/>
<elementRef key="rendition" minOccurs="0" maxOccurs="unbounded"/>
<elementRef key="namespace" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</content>
</elementSpec>
Expand All @@ -70,8 +66,7 @@
<content>
<alternate minOccurs="1" maxOccurs="unbounded">
<textNode/>
<anyElement require="http://relaxng.org/ns/structure/1.0"
minOccurs="0" maxOccurs="unbounded"/>
<anyElement require="http://relaxng.org/ns/structure/1.0" minOccurs="0" maxOccurs="unbounded"/>
</alternate>
</content>
<attList>
Expand All @@ -81,18 +76,22 @@
<elementSpec ident="model" mode="change">
<content>
<sequence>
<alternate minOccurs="0"
maxOccurs="unbounded">
<alternate minOccurs="0" maxOccurs="unbounded">
<classRef key="model.glossLike"/>
<classRef key="model.descLike"/>
</alternate>
<elementRef key="param" minOccurs="0"
maxOccurs="unbounded"/>
<elementRef key="param" minOccurs="0" maxOccurs="unbounded"/>
<elementRef key="template" minOccurs="0" maxOccurs="1"/>
<elementRef key="outputRendition"
minOccurs="0" maxOccurs="unbounded"/>
<elementRef key="outputRendition" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</content>
<attList>
<attDef usage="opt" ident="mode" ns="http://teipublisher.com/1.0">
<datatype>
<dataRef key="publisher.ident"/>
</datatype>
</attDef>
</attList>
</elementSpec>
<elementSpec ident="behaviour" ns="http://teipublisher.com/1.0" mode="add">
<desc>Define a processing model behaviour based on a template expression. It combines one or more <gi>pb:param</gi> parameter definitions with a single <gi>pb:template</gi>.</desc>
Expand Down Expand Up @@ -136,4 +135,4 @@
</schemaSpec>
</body>
</text>
</TEI>
</TEI>
Loading

0 comments on commit 11ad56c

Please sign in to comment.