Skip to content
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
48 changes: 28 additions & 20 deletions P5/Source/Guidelines/en/TD-DocumentationElements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -874,23 +874,23 @@ to mark any technical term, thus:
<constraintSpec ident="ref-or-key-or-name" scheme="schematron">
<constraint>
<sch:rule context="tei:relation">
<sch:assert test="@ref or @key or @name">One of the attributes @name, @ref, or @key must be supplied</sch:assert>
<sch:assert test="@ref or @key or @name">One of the attributes @name, @ref, or @key must be supplied.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>

<constraintSpec ident="active-mutual" scheme="schematron">
<constraint>
<sch:rule context="tei:relation">
<sch:report test="@active and @mutual">Only one of the attributes @active and @mutual may be supplied</sch:report>
<sch:report test="@active and @mutual">Only one of the attributes @active and @mutual may be supplied.</sch:report>
</sch:rule>
</constraint>
</constraintSpec>

<constraintSpec ident="active-passive" scheme="schematron">
<constraint>
<sch:rule context="tei:relation">
<sch:report test="@passive and not(@active)">the attribute @passive may be supplied only if the attribute @active is supplied</sch:report>
<sch:report test="@passive and not(@active)">the attribute @passive may be supplied only if the attribute @active is supplied.</sch:report>
</sch:rule>
</constraint>
</constraintSpec>
Expand All @@ -906,13 +906,13 @@ to mark any technical term, thus:
whose <att>scheme</att> matches that of the
<gi>constraintDecl</gi>.
<egXML xmlns="http://www.tei-c.org/ns/Examples" source="#NONE">
<constraintDecl scheme="schematron" queryBinding="xslt3">
<sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
<sch:ns prefix="xi" uri="http://www.w3.org/2001/XInclude"/>
<sch:let name="edition" value="substring-before( /*/tei:teiHeader//tei:editionStmt/tei:edition/@n, '.')"/>
<sch:let name="uses_old_encoding" value="$edition cast as xs:integer lt 3"/>
</constraintDecl>
</egXML>
<constraintDecl scheme="schematron" queryBinding="xslt3">
<sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
<sch:ns prefix="xi" uri="http://www.w3.org/2001/XInclude"/>
<sch:let name="edition" value="substring-before( /*/tei:teiHeader//tei:editionStmt/tei:edition/@n, '.')"/>
<sch:let name="uses_old_encoding" value="$edition cast as xs:integer lt 3"/>
</constraintDecl>
</egXML>
In this example the Schematron query language binding is set (to
<val>xslt3</val>) for use by a Schematron processor, two
namespace prefixes are bound to namespace URIs for later use within
Expand All @@ -939,8 +939,8 @@ to mark any technical term, thus:
<constraintSpec ident="subclauses" scheme="schematron">
<constraint>
<sch:rule context="tei:div">
<sch:report test="count( tei:div | xi:include[ contains( @href, 'sect') ] ) eq 1">if it contains any
subdivisions, a division must contain at least two of them</sch:report>
<sch:report test="count( tei:div | xi:include[ contains( @href, 'sect') ] ) eq 1">If it contains any
subdivisions, a division must contain at least two of them.</sch:report>
</sch:rule>
</constraint>
</constraintSpec>
Expand All @@ -953,17 +953,23 @@ to mark any technical term, thus:
<constraintSpec ident="introtitle" scheme="schematron">
<constraint>
<sch:rule context="tei:teiHeader">
<sch:assert test="tei:fileDesc/tei:titleStmt/tei:title[@type='introductory']"> an introductory component of the title is expected</sch:assert>
<sch:assert test="tei:fileDesc/tei:titleStmt/tei:title[@type='introductory']">
An introductory component of the title is expected.
</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
<constraintSpec ident="maintitle" scheme="schematron">
<constraint>
<sch:rule context="tei:teiHeader[ $uses_old_encoding ]">
<sch:assert test="tei:fileDesc/tei:titleStmt/tei:title[@type eq 'main']"> a main title must be supplied</sch:assert>
<sch:assert test="tei:fileDesc/tei:titleStmt/tei:title[@type eq 'main']">
A main title must be supplied.
</sch:assert>
</sch:rule>
<sch:rule context="tei:teiHeader[ not( $uses_old_encoding ) ]">
<sch:assert test="tei:fileDesc/tei:titleStmt/tei:title[ not( @type eq 'sub' ) ]"> a main title must be supplied</sch:assert>
<sch:assert test="tei:fileDesc/tei:titleStmt/tei:title[ not( @type eq 'sub' ) ]">
A main title must be supplied.
</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
Expand All @@ -978,8 +984,10 @@ to mark any technical term, thus:
<constraint>
<sch:pattern id="altTags">
<sch:rule context="tei:figure">
<sch:assert test="tei:figDesc or tei:head"> You should provide information in a figure from
which we can construct an alt attribute in HTML </sch:assert>
<sch:assert test="tei:figDesc or tei:head">
You should provide information in a &lt;figure> from
which we can construct an @alt attribute in HTML.
</sch:assert>
</sch:rule>
</sch:pattern>
</constraint>
Expand All @@ -992,8 +1000,8 @@ to mark any technical term, thus:
<constraint>
<sch:pattern id="Tables">
<sch:rule context="tei:table">
<sch:assert test="tei:head">A &lt;table&gt; should have a caption, using a &lt;head&gt; element</sch:assert>
<sch:report test="parent::tei:body">Do not use tables to lay out the document body</sch:report>
<sch:assert test="tei:head">A &lt;table&gt; should have a caption, using a &lt;head&gt; element.</sch:assert>
<sch:report test="parent::tei:body">Do not use tables to lay out the document body.</sch:report>
</sch:rule>
</sch:pattern>
</constraint>
Expand Down Expand Up @@ -1147,7 +1155,7 @@ to mark any technical term, thus:
<constraintSpec ident="lessThan150" scheme="schematron">
<constraint>
<sch:rule context="@ageAtDeath">
<sch:assert test=". le 150">age at death must be an integer less than 150</sch:assert>
<sch:assert test=". le 150">Age at death must be an integer less than 150.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
Expand Down
2 changes: 1 addition & 1 deletion P5/Source/Specs/alternate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<constraintSpec ident="alternatechilden" scheme="schematron" xml:lang="en">
<constraint>
<sch:rule context="tei:alternate">
<sch:assert test="count(*) gt 1">The alternate element must have at least two child elements</sch:assert>
<sch:assert test="count(*) gt 1">The alternate element must have at least two child elements.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
Expand Down
11 changes: 6 additions & 5 deletions P5/Source/Specs/att.deprecated.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@
<sch:let name="advance_warning_period" value="current-date() + xs:dayTimeDuration('P60D')"/>
<sch:let name="me_phrase" value="if (@ident) then concat('The ', @ident ) else concat('This ', local-name(.), ' of ', ancestor::tei:*[@ident][1]/@ident )"/>
<sch:assert test="@validUntil cast as xs:date ge current-date()">
<sch:value-of select="concat( $me_phrase, ' construct is outdated (as of ', @validUntil, '); ODD processors may ignore it, and its use is no longer supported' )"/></sch:assert>
<sch:assert role="warning" test="@validUntil cast as xs:date ge $advance_warning_period">
<sch:value-of select="concat( $me_phrase, ' construct becomes outdated on ', @validUntil )"/>
</sch:assert>
<sch:value-of select="concat( $me_phrase, ' construct is outdated (as of ', @validUntil, '); ODD processors may ignore it, and its use is no longer supported.' )"/>
</sch:assert>
<sch:assert role="warning" test="@validUntil cast as xs:date ge $advance_warning_period">
<sch:value-of select="concat( $me_phrase, ' construct becomes outdated on ', @validUntil, '.')"/>
</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
<constraintSpec scheme="schematron" ident="deprecation-should-be-explained" xml:lang="en">
<constraint>
<sch:rule context="tei:*[@validUntil][ not( self::tei:valDesc | self::tei:valList | self::tei:defaultVal | self::tei:remarks )]">
<sch:assert test="child::tei:desc[ @type eq 'deprecationInfo']">
A deprecated construct should include, whenever possible, an explanation, but this <sch:value-of select="name(.)"/> does not have a child &lt;desc type="deprecationInfo"&gt;</sch:assert>
A deprecated construct should include, whenever possible, an explanation, but this <sch:value-of select="name(.)"/> does not have a child &lt;desc type="deprecationInfo">.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
Expand Down
2 changes: 1 addition & 1 deletion P5/Source/Specs/att.global.source.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
and
$srcs[2]">
When used on a schema description element (like
<sch:value-of select="name(.)"/>), the @source attribute
&lt;<sch:value-of select="name(.)"/>>), the @source attribute
should have only 1 value. (This one has <sch:value-of
select="count($srcs)"/>.)
</sch:report>
Expand Down
12 changes: 4 additions & 8 deletions P5/Source/Specs/att.repeatable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<sch:rule context="tei:*[ @minOccurs and @maxOccurs ]">
<sch:let name="min" value="@minOccurs cast as xs:integer"/>
<sch:let name="max" value="if ( normalize-space( @maxOccurs ) eq 'unbounded') then -1 else @maxOccurs cast as xs:integer"/>
<sch:assert test="$max eq -1 or $max ge $min">@maxOccurs should be greater than or equal to @minOccurs</sch:assert>
<sch:assert test="$max eq -1 or $max ge $min">@maxOccurs should be greater than or equal to @minOccurs.</sch:assert>
</sch:rule>
<sch:rule context="tei:*[ @minOccurs and not( @maxOccurs ) ]">
<sch:assert test="@minOccurs cast as xs:integer lt 2">When @maxOccurs is not specified, @minOccurs must be 0 or 1</sch:assert>
<sch:assert test="@minOccurs cast as xs:integer lt 2">When @maxOccurs is not specified, @minOccurs must be 0 or 1.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
Expand All @@ -33,11 +33,8 @@
<gloss versionDate="2007-11-06" xml:lang="it">numero minimo di occorrenze</gloss>
<gloss versionDate="2007-05-04" xml:lang="es">número mínimo de apariciones</gloss>
<gloss versionDate="2023-09-27" xml:lang="ja">最小出現数</gloss>
<desc versionDate="2013-11-21" xml:lang="en">indicates the smallest number of times this
component may occur.</desc>
<desc versionDate="2013-11-21" xml:lang="en">indicates the smallest number of times this component may occur.</desc>
<desc versionDate="2023-09-27" xml:lang="ja">この部品が出現し得る最小回数を示す。</desc>


<datatype>
<dataRef key="teidata.count"/>
</datatype>
Expand All @@ -51,8 +48,7 @@
<gloss versionDate="2007-11-06" xml:lang="it">numero minimo di occorrenze</gloss>
<gloss versionDate="2007-05-04" xml:lang="es">número máximo de apariciones.</gloss>
<gloss versionDate="2023-09-27" xml:lang="ja">最大出現数</gloss>
<desc versionDate="2013-11-21" xml:lang="en">indicates the largest number of times this
component may occur.</desc>
<desc versionDate="2013-11-21" xml:lang="en">indicates the largest number of times this component may occur.</desc>
<desc versionDate="2023-09-27" xml:lang="ja">概算推量のための最大推定値を与える。</desc>
<datatype>
<dataRef key="teidata.unboundedCount"/>
Expand Down
2 changes: 1 addition & 1 deletion P5/Source/Specs/att.spanning.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<constraint>
<sch:rule context="tei:*[ starts-with( @spanTo, '#') ]">
<sch:assert test="id( substring( @spanTo, 2 ) ) >> .">
The element indicated by @spanTo (<sch:value-of select="@spanTo"/>) must follow the current <sch:name/> element
The element indicated by @spanTo (<sch:value-of select="@spanTo"/>) must follow the current &lt;<sch:name/>> element.
</sch:assert>
</sch:rule>
</constraint>
Expand Down
19 changes: 9 additions & 10 deletions P5/Source/Specs/att.typed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
<desc versionDate="2007-12-20" xml:lang="ko">요소의 분류 또는 하위분류에서 사용될 수 있는 속성을 제공한다.</desc>
<desc versionDate="2007-05-02" xml:lang="zh-TW">提供可依任何方法將元素分類或次要分類的一般屬性。</desc>
<desc versionDate="2008-04-05" xml:lang="ja">要素を分類するための属性を示す。</desc>
<desc versionDate="2009-05-29" xml:lang="fr">fournit des attributs qui peuvent être
utilisés pour classer ou interclasser des éléments de n'importe quelle façon.</desc>
<desc versionDate="2009-05-29" xml:lang="fr">fournit des attributs qui peuvent être utilisés pour classer ou interclasser des éléments de n'importe quelle façon.</desc>
<desc versionDate="2007-05-04" xml:lang="es">proporciona atributos genéricos utilizables para cualquier clasificación o subclasificación de elementos.</desc>
<desc versionDate="2007-01-21" xml:lang="it">assegna degli attributi generici utilizzabili per qualsiasi classificazione e sottoclassificazione di elementi.</desc>
<constraintSpec scheme="schematron" ident="subtypeTyped" xml:lang="en">
<constraint>
<sch:rule context="tei:*[@subtype]">
<sch:assert test="@type">The <sch:name/> element should not be categorized in detail with @subtype unless also categorized in general with @type</sch:assert>
<sch:assert test="@type">
The &lt;<sch:name/>> element should not be categorized in detail with @subtype unless also categorized in general with @type.
</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
Expand All @@ -22,8 +23,7 @@
<!-- Any time changes are made to this @type attribute, you should change the definitions in att.entryLike
and att.textCritical if needed for consistency.
-->
<desc versionDate="2005-10-10" xml:lang="en">characterizes the element in some sense, using any convenient
classification scheme or typology.</desc>
<desc versionDate="2005-10-10" xml:lang="en">characterizes the element in some sense, using any convenient classification scheme or typology.</desc>
<desc versionDate="2007-12-20" xml:lang="ko">다양한 분류 스키마 또는 유형을 사용해서 요소의 특성을 기술한다.</desc>
<desc versionDate="2007-05-02" xml:lang="zh-TW">用合適的分類標準或類型來描述該元素。</desc>
<desc versionDate="2008-04-05" xml:lang="ja">当該要素の分類を示す。</desc>
Expand All @@ -48,8 +48,8 @@
</exemplum>
<remarks versionDate="2012-04-21" xml:lang="en">
<p>The <att>type</att> attribute is present on a number of
elements, not all of which are members of <ident type="class">att.typed</ident>, usually because these elements
restrict the possible values for the attribute in a specific way.</p>
elements, not all of which are members of <ident type="class">att.typed</ident>, usually because these elements
restrict the possible values for the attribute in a specific way.</p>
</remarks>
</attDef>
<attDef ident="subtype" usage="opt">
Expand All @@ -59,8 +59,7 @@
<desc versionDate="2007-12-20" xml:lang="ko">필요하다면 요소의 하위범주를 제시한다.</desc>
<desc versionDate="2007-05-02" xml:lang="zh-TW">若有需要,提供該元素的次要分類</desc>
<desc versionDate="2008-04-05" xml:lang="ja">必要であれば、当該要素の下位分類を示す。</desc>
<desc versionDate="2007-06-12" xml:lang="fr">fournit une sous-catégorisation de l'élément, si
c'est nécessaire.</desc>
<desc versionDate="2007-06-12" xml:lang="fr">fournit une sous-catégorisation de l'élément, si c'est nécessaire.</desc>
<desc versionDate="2007-05-04" xml:lang="es">proporciona, si es necesario, una subcategorización del elemento.</desc>
<desc versionDate="2007-01-21" xml:lang="it">stabilisce, se necessario, una sottocategorizzazione dell'elemento.</desc>
<datatype><dataRef key="teidata.enumerated"/></datatype>
Expand All @@ -80,7 +79,7 @@ sub-classification for the element additional to that provided by its
</remarks>
<remarks versionDate="2008-04-05" xml:lang="ja">
<p>
属性<att>subtype</att>は、属性<att>type</att>に加えて、当該要
属性<att>subtype</att>は、属性<att>type</att>に加えて、当該要
素の下位分類を示すために使われる。
</p>
</remarks>
Expand Down
Loading
Loading