Skip to content

Commit 5a517ef

Browse files
committed
Consistently use 'sch:' prefix rather than explicit namespace decl on Schematron, for no apparent reason other than it is mildly easier to read when consistent.
1 parent 21ba627 commit 5a517ef

File tree

3 files changed

+44
-57
lines changed

3 files changed

+44
-57
lines changed

P5/Source/Guidelines/en/TD-DocumentationElements.xml

+20-20
Original file line numberDiff line numberDiff line change
@@ -872,11 +872,11 @@ to mark any technical term, thus:
872872
<egXML xmlns="http://www.tei-c.org/ns/Examples">
873873
<constraintSpec ident="subclauses" scheme="schematron">
874874
<constraint>
875-
<ns prefix="tei" uri="http://www.tei-c.org/ns/1.0" xmlns="http://purl.oclc.org/dsdl/schematron"/>
876-
<rule context="tei:div" xmlns="http://purl.oclc.org/dsdl/schematron">
877-
<report test="count( tei:div ) eq 1">if it contains any subdivisions, a
878-
division must contain at least two of them</report>
879-
</rule>
875+
<sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
876+
<sch:rule context="tei:div" xmlns="http://purl.oclc.org/dsdl/schematron">
877+
<sch:report test="count( tei:div ) eq 1">if it contains any subdivisions, a
878+
division must contain at least two of them</sch:report>
879+
</sch:rule>
880880
</constraint>
881881
</constraintSpec>
882882
</egXML>
@@ -906,13 +906,13 @@ to mark any technical term, thus:
906906
<egXML xmlns="http://www.tei-c.org/ns/Examples">
907907
<constraintSpec ident="alt" scheme="schematron">
908908
<constraint>
909-
<ns prefix="tei" uri="http://www.tei-c.org/ns/1.0" xmlns="http://purl.oclc.org/dsdl/schematron"/>
910-
<pattern id="altTags" xmlns="http://purl.oclc.org/dsdl/schematron">
911-
<rule context="tei:figure">
912-
<report test="not(tei:figDesc or tei:head)"> You should provide information in a figure from
913-
which we can construct an alt attribute in HTML </report>
914-
</rule>
915-
</pattern>
909+
<sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
910+
<sch:pattern id="altTags" xmlns="http://purl.oclc.org/dsdl/schematron">
911+
<sch:rule context="tei:figure">
912+
<sch:report test="not(tei:figDesc or tei:head)"> You should provide information in a figure from
913+
which we can construct an alt attribute in HTML </sch:report>
914+
</sch:rule>
915+
</sch:pattern>
916916
</constraint>
917917
</constraintSpec>
918918
</egXML>
@@ -921,14 +921,14 @@ to mark any technical term, thus:
921921
<egXML xmlns="http://www.tei-c.org/ns/Examples">
922922
<constraintSpec ident="tables" scheme="schematron">
923923
<constraint>
924-
<ns prefix="tei" uri="http://www.tei-c.org/ns/1.0" xmlns="http://purl.oclc.org/dsdl/schematron"/>
925-
<pattern id="Tables" xmlns="http://purl.oclc.org/dsdl/schematron">
926-
<rule context="tei:table">
927-
<assert test="tei:head">A &lt;table> should have a caption, using a &lt;head>
928-
element</assert>
929-
<report test="parent::tei:body">Do not use tables to lay out the document body</report>
930-
</rule>
931-
</pattern>
924+
<sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
925+
<sch:pattern id="Tables">
926+
<sch:rule context="tei:table">
927+
<sch:assert test="tei:head">A &lt;table> should have a caption, using a &lt;head>
928+
element</sch:assert>
929+
<sch:report test="parent::tei:body">Do not use tables to lay out the document body</sch:report>
930+
</sch:rule>
931+
</sch:pattern>
932932
</constraint>
933933
</constraintSpec>
934934
</egXML>

P5/Source/Specs/att.identified.xml

+17-30
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,33 @@ $Date$
77
$Id$
88
-->
99
<?xml-model href="https://jenkins.tei-c.org/job/TEIP5-dev/lastSuccessfulBuild/artifact/P5/release/xml/tei/odd/p5.nvdl" type="application/xml" schematypens="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"?>
10-
<classSpec xmlns="http://www.tei-c.org/ns/1.0" module="tagdocs" type="atts" ident="att.identified">
11-
<desc versionDate="2021-08-22" xml:lang="en">provides identifying attributes for elements which can be
12-
subsequently referenced by means of a <att>key</att>
13-
attribute.</desc>
14-
<desc versionDate="2007-12-20" xml:lang="ko"><att>key</att> 속성에
15-
의해 참조될 수 있는 요소의 속성을 제시한다.</desc>
16-
<desc versionDate="2007-05-02" xml:lang="zh-TW">可利用屬性
17-
<att>key</att>來參照的元素</desc>
10+
<classSpec xmlns="http://www.tei-c.org/ns/1.0" xmlns:sch="http://purl.oclc.org/dsdl/schematron" module="tagdocs" type="atts" ident="att.identified">
11+
<desc versionDate="2021-08-22" xml:lang="en">provides identifying attributes for elements which can be subsequently referenced by means of a <att>key</att> attribute.</desc>
12+
<desc versionDate="2007-12-20" xml:lang="ko"><att>key</att> 속성에 의해 참조될 수 있는 요소의 속성을 제시한다.</desc>
13+
<desc versionDate="2007-05-02" xml:lang="zh-TW">可利用屬性 <att>key</att>來參照的元素</desc>
1814
<desc versionDate="2022-05-09" xml:lang="ja">後で<att>key</att>属性によって参照されうる要素を指定する属性を示す。</desc>
19-
<desc versionDate="2007-06-12" xml:lang="fr">fournit les attributs
20-
pour des éléments référençables au moyen d'un attribut
21-
<att>key</att>.</desc>
22-
<desc versionDate="2007-05-04" xml:lang="es">elementos a los que se
23-
puede hacer referencia a través del atributo <att>key</att>.</desc>
24-
<desc versionDate="2007-01-21" xml:lang="it">elementi ai quali si
25-
può fare riferimento tramite l'attributo <att>key</att>
26-
</desc>
15+
<desc versionDate="2007-06-12" xml:lang="fr">fournit les attributs pour des éléments référençables au moyen d'un attribut <att>key</att>.</desc>
16+
<desc versionDate="2007-05-04" xml:lang="es">elementos a los que se puede hacer referencia a través del atributo <att>key</att>.</desc> <desc versionDate="2007-01-21" xml:lang="it">elementi ai quali si può fare riferimento tramite l'attributo <att>key</att></desc>
2717
<classes>
2818
<memberOf key="att.combinable"/>
2919
</classes>
3020
<constraintSpec ident="spec-in-module" scheme="schematron">
31-
<constraint>
32-
<rule xmlns="http://purl.oclc.org/dsdl/schematron" context="tei:elementSpec[@module]|tei:classSpec[@module]|tei:macroSpec[@module]">
33-
<assert test="(not(ancestor::tei:schemaSpec | ancestor::tei:TEI | ancestor::tei:teiCorpus)) or (not(@module) or (not(//tei:moduleSpec) and not(//tei:moduleRef)) or (//tei:moduleSpec[@ident = current()/@module]) or (//tei:moduleRef[@key = current()/@module]))">
34-
Specification <value-of select="@ident"/>: the value of the module attribute ("<value-of select="@module"/>")
21+
<sch:constraint>
22+
<sch:rule context="tei:elementSpec[@module]|tei:classSpec[@module]|tei:macroSpec[@module]">
23+
<sch:assert test="(not(ancestor::tei:schemaSpec | ancestor::tei:TEI | ancestor::tei:teiCorpus)) or (not(@module) or (not(//tei:moduleSpec) and not(//tei:moduleRef)) or (//tei:moduleSpec[@ident = current()/@module]) or (//tei:moduleRef[@key = current()/@module]))">
24+
Specification <sch:value-of select="@ident"/>: the value of the module attribute ("<sch:value-of select="@module"/>")
3525
should correspond to an existing module, via a moduleSpec or
36-
moduleRef</assert>
37-
</rule>
38-
</constraint>
26+
moduleRef</sch:assert>
27+
</sch:rule>
28+
</sch:constraint>
3929
</constraintSpec>
4030
<attList>
4131
<attDef ident="ident" usage="req">
4232
<desc versionDate="2012-12-27" xml:lang="en">supplies the identifier by which this element may be referenced.</desc>
4333
<desc versionDate="2007-12-20" xml:lang="ko">이 요소가 참조된 확인소를 제공한다.</desc>
4434
<desc versionDate="2007-05-02" xml:lang="zh-TW">提供被參照的元素的識別符號。</desc>
4535
<desc versionDate="2008-04-05" xml:lang="ja">当該要素を参照する識別子を示す。</desc>
46-
<desc versionDate="2007-06-12" xml:lang="fr">fournit l'identifiant qui référence cet
47-
élément.</desc>
36+
<desc versionDate="2007-06-12" xml:lang="fr">fournit l'identifiant qui référence cet élément.</desc>
4837
<desc versionDate="2007-05-04" xml:lang="es">proporciona el identificador utilizado para indicar un elemento.</desc>
4938
<desc versionDate="2007-01-21" xml:lang="it">specifica l'identificatore utilizzato per indicare l'elemento</desc>
5039
<datatype><dataRef key="teidata.name"/></datatype>
@@ -54,8 +43,7 @@ should correspond to an existing module, via a moduleSpec or
5443
<ident type="module">tei</ident> infrastructure module.</desc>
5544
<desc versionDate="2007-12-20" xml:lang="ko"><ident type="module">tei</ident> 하부구조 모듈에서 이 대상이 미리 선언되어야 하는지를 설명한다.</desc>
5645
<desc versionDate="2007-05-02" xml:lang="zh-TW">說明該元素集是否為全域元素集,並必須在核心中宣告。</desc>
57-
<desc versionDate="2008-04-05" xml:lang="ja">当該オブジェクトが、<ident type="module">TEI</ident>基盤モジュー
58-
ルで事前に宣言されるべきかどうかを示す。</desc>
46+
<desc versionDate="2008-04-05" xml:lang="ja">当該オブジェクトが、<ident type="module">TEI</ident>基盤モジュー ルで事前に宣言されるべきかどうかを示す。</desc>
5947
<desc versionDate="2009-05-27" xml:lang="fr">précise si cet objet nécessite une prédéfinition dans le module d'infrastructure <ident type="module">tei</ident>.</desc>
6048
<desc versionDate="2007-05-04" xml:lang="es">declara si la clase debe ser considerada global y por tanto definida en el módulo core</desc>
6149
<desc versionDate="2007-01-21" xml:lang="it">dichiara se la classe debba essere considerata globale e quindi definita nel modulo core</desc>
@@ -67,11 +55,10 @@ should correspond to an existing module, via a moduleSpec or
6755
<desc versionDate="2007-12-20" xml:lang="ko">이 대상이 정의되어야 하는 모듈명을 제시한다.</desc>
6856
<desc versionDate="2007-05-02" xml:lang="zh-TW">提供定義該元素的模組名稱。</desc>
6957
<desc versionDate="2008-04-05" xml:lang="ja">当該オブジェクトが定義されているモジュール名を示す。</desc>
70-
<desc versionDate="2007-06-12" xml:lang="fr">fournit le nom du module dans lequel doit
71-
être défini cet objet.</desc>
58+
<desc versionDate="2007-06-12" xml:lang="fr">fournit le nom du module dans lequel doit être défini cet objet.</desc>
7259
<desc versionDate="2007-05-04" xml:lang="es">proporciona el nombre del módulo en que el objeto debe ser definido.</desc>
7360
<desc versionDate="2007-01-21" xml:lang="it">indica il nome del modulo nel quale l'oggetto deve essere definito</desc>
7461
<datatype><dataRef key="teidata.xmlName"/></datatype>
7562
</attDef>
7663
</attList>
77-
</classSpec>
64+
</classSpec>

P5/Source/Specs/moduleRef.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ $Id$
4242
<datatype minOccurs="0" maxOccurs="1"><dataRef key="teidata.xmlName"/></datatype>
4343
<constraintSpec scheme="schematron" ident="not-same-prefix">
4444
<constraint>
45-
<rule xmlns="http://purl.oclc.org/dsdl/schematron" context="tei:moduleRef">
46-
<report test="//*[ not( generate-id(.) eq generate-id( current() ) ) ]/@prefix = @prefix">The prefix attribute
45+
<sch:rule xmlns="http://purl.oclc.org/dsdl/schematron" context="tei:moduleRef">
46+
<sch:report test="//*[ not( generate-id(.) eq generate-id( current() ) ) ]/@prefix = @prefix">The prefix attribute
4747
of <sch:name/> should not match that of any other
48-
element (it would defeat the purpose)</report>
49-
</rule>
48+
element (it would defeat the purpose)</sch:report>
49+
</sch:rule>
5050
</constraint>
5151
</constraintSpec>
5252
<constraintSpec scheme="schematron" ident="not-except-and-include">
5353
<constraint>
54-
<rule xmlns="http://purl.oclc.org/dsdl/schematron" context="tei:moduleRef">
55-
<report test="@except and @include">It is an error to supply both the @include and @except attributes</report>
56-
</rule>
54+
<sch:rule xmlns="http://purl.oclc.org/dsdl/schematron" context="tei:moduleRef">
55+
<sch:report test="@except and @include">It is an error to supply both the @include and @except attributes</sch:report>
56+
</sch:rule>
5757
</constraint>
5858
</constraintSpec>
5959
<remarks versionDate="2011-09-21" xml:lang="en">

0 commit comments

Comments
 (0)