<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tei-c.org/index.php?action=history&amp;feed=atom&amp;title=Unique-witnesses-within-app</id>
	<title>Unique-witnesses-within-app - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tei-c.org/index.php?action=history&amp;feed=atom&amp;title=Unique-witnesses-within-app"/>
	<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=Unique-witnesses-within-app&amp;action=history"/>
	<updated>2026-04-21T16:16:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://wiki.tei-c.org/index.php?title=Unique-witnesses-within-app&amp;diff=14681&amp;oldid=prev</id>
		<title>Syd: initial creation of clever but insufficient test for duplicate witness references in an &lt;app&gt;</title>
		<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=Unique-witnesses-within-app&amp;diff=14681&amp;oldid=prev"/>
		<updated>2016-01-10T19:39:54Z</updated>

		<summary type="html">&lt;p&gt;initial creation of clever but insufficient test for duplicate witness references in an &amp;lt;app&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In general, a given witness should only be referred to once within an&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;lt;app&amp;gt;&amp;lt;/code&amp;gt; (either on the &amp;lt;code&amp;gt;@wit&amp;lt;/code&amp;gt; of&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;lt;rdg&amp;gt;&amp;lt;/code&amp;gt; or of &amp;lt;code&amp;gt;&amp;amp;lt;lem&amp;gt;&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
This snippet of ODD code may be included in the&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;lt;elementSpec&amp;gt;&amp;lt;/code&amp;gt; for &amp;lt;tt&amp;gt;app&amp;lt;/tt&amp;gt; to test the collection&lt;br /&gt;
of pointers to witnesses within a given &amp;lt;code&amp;gt;&amp;amp;lt;app&amp;gt;&amp;lt;/code&amp;gt; for&lt;br /&gt;
duplicates.&lt;br /&gt;
&lt;br /&gt;
This test is insufficient for a variety of reasons. First,&lt;br /&gt;
the ''TEI Guidelines'' explicit permit the specification of witnesses (on&lt;br /&gt;
&amp;lt;code&amp;gt;@wit&amp;lt;/code&amp;gt;) for one reading to be omitted. (See&lt;br /&gt;
[http://www.tei-c.org/release/doc/tei-p5-doc/en/html/TC.html#TCAPPS 12.2.3 The Parallel Segmentation Method].)&lt;br /&gt;
&lt;br /&gt;
Second, this code only tests the string value of a given pointer, not&lt;br /&gt;
what it points at. Thus the value of &amp;lt;code&amp;gt;@xml:base&amp;lt;/code&amp;gt; is not&lt;br /&gt;
taken into account, and the values &amp;lt;code&amp;gt;&amp;quot;witnesses.xml#A&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;amp;amp; &amp;lt;code&amp;gt;&amp;quot;./witnesses.xml#A&amp;quot;&amp;lt;/code&amp;gt; will incorrectly be considered&lt;br /&gt;
as different. Similarly, this code will consider it OK when two&lt;br /&gt;
&amp;lt;code&amp;gt;@wit&amp;lt;/code&amp;gt; pointers point two two different&lt;br /&gt;
&amp;lt;code&amp;gt;witness&amp;lt;/code&amp;gt; elements that list the same MSS. (Arguably bad&lt;br /&gt;
encoding, but not technically incorrect.)&lt;br /&gt;
&lt;br /&gt;
This also means that a repeated pointer to a witness (also bad&lt;br /&gt;
encoding, but not technically incorrect) will be flagged as an error.&lt;br /&gt;
&lt;br /&gt;
And, perhaps most importantly, it means that this test does not check&lt;br /&gt;
that the pointers on &amp;lt;code&amp;gt;@wit&amp;lt;/code&amp;gt; actually point to&lt;br /&gt;
&amp;lt;code&amp;gt;witness&amp;lt;/code&amp;gt;es, as opposed to, say, &amp;lt;code&amp;gt;person&amp;lt;/code&amp;gt;s.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;constraintSpec ident=&amp;quot;unique-witness-within-app&amp;quot; scheme=&amp;quot;isoschematron&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;constraint&amp;gt;&lt;br /&gt;
    &amp;lt;sch:let name=&amp;quot;wits&amp;quot; value=&amp;quot;tokenize( normalize-space( string-join( .//@wit,' ') ),' ')&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;sch:let name=&amp;quot;witless&amp;quot; value=&amp;quot;distinct-values( $wits )&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;sch:report test=&amp;quot;count( $wits ) ne count( $witless )&amp;quot;&amp;gt;Duplicate witness within 'app'&amp;lt;/sch:report&amp;gt;&lt;br /&gt;
  &amp;lt;/constraint&amp;gt;&lt;br /&gt;
&amp;lt;/constraintSpec&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Customization]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Schematron]]&lt;/div&gt;</summary>
		<author><name>Syd</name></author>
		
	</entry>
</feed>