<?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=Xmlid_uniqueness.sch</id>
	<title>Xmlid uniqueness.sch - 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=Xmlid_uniqueness.sch"/>
	<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=Xmlid_uniqueness.sch&amp;action=history"/>
	<updated>2026-04-21T15:41:22Z</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=Xmlid_uniqueness.sch&amp;diff=14461&amp;oldid=prev</id>
		<title>Syd: Simpler XPath to select @xml:id attrs; bug fix: double-escape '&lt;'</title>
		<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=Xmlid_uniqueness.sch&amp;diff=14461&amp;oldid=prev"/>
		<updated>2015-10-15T02:43:55Z</updated>

		<summary type="html">&lt;p&gt;Simpler XPath to select @xml:id attrs; bug fix: double-escape &amp;#039;&amp;lt;&amp;#039;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 02:43, 15 October 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot; &gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &amp;lt;sch:pattern&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &amp;lt;sch:pattern&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;sch:rule context=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;//&lt;/del&gt;@xml:id&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;sch:rule context=&amp;quot;@xml:id&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:let name=&amp;quot;myID&amp;quot; value=&amp;quot;normalize-space(.)&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:let name=&amp;quot;myID&amp;quot; value=&amp;quot;normalize-space(.)&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:report test=&amp;quot; ../ancestor::*/@xml:id[ normalize-space(.) eq $myID ]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:report test=&amp;quot; ../ancestor::*/@xml:id[ normalize-space(.) eq $myID ]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l29&quot; &gt;Line 29:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 29:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                          ../preceding::*/@xml:id[ normalize-space(.) eq $myID ]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                          ../preceding::*/@xml:id[ normalize-space(.) eq $myID ]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         &amp;quot;&amp;gt;#1 The @xml:id &amp;quot;&amp;lt;sch:value-of select=&amp;quot;.&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         &amp;quot;&amp;gt;#1 The @xml:id &amp;quot;&amp;lt;sch:value-of select=&amp;quot;.&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;quot; on &amp;amp;lt;&amp;lt;sch:value-of select=&amp;quot;name(..)&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;quot; on &amp;amp;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;amp;&lt;/ins&gt;lt;&amp;lt;sch:value-of select=&amp;quot;name(..)&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;gt; duplicates an @xml:id found earlier in the document&amp;lt;/sch:report&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;gt; duplicates an @xml:id found earlier in the document&amp;lt;/sch:report&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;/sch:rule&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;/sch:rule&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot; &gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 35:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &amp;lt;sch:pattern&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &amp;lt;sch:pattern&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;sch:rule context=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;//&lt;/del&gt;@xml:id&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;sch:rule context=&amp;quot;@xml:id&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:let name=&amp;quot;myID&amp;quot; value=&amp;quot;normalize-space(.)&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:let name=&amp;quot;myID&amp;quot; value=&amp;quot;normalize-space(.)&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:report test=&amp;quot;//*[ current()/.. &amp;gt;&amp;gt; .]/@xml:id[ normalize-space(.) eq $myID ]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:report test=&amp;quot;//*[ current()/.. &amp;gt;&amp;gt; .]/@xml:id[ normalize-space(.) eq $myID ]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         &amp;quot;&amp;gt;#2 The  @xml:id &amp;quot;&amp;lt;sch:value-of select=&amp;quot;.&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         &amp;quot;&amp;gt;#2 The  @xml:id &amp;quot;&amp;lt;sch:value-of select=&amp;quot;.&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;quot; on &amp;amp;lt;&amp;lt;sch:value-of select=&amp;quot;name(..)&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;quot; on &amp;amp;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;amp;&lt;/ins&gt;lt;&amp;lt;sch:value-of select=&amp;quot;name(..)&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;gt; duplicates an @xml:id found earlier in the document&amp;lt;/sch:report&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;gt; duplicates an @xml:id found earlier in the document&amp;lt;/sch:report&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;/sch:rule&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;/sch:rule&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l45&quot; &gt;Line 45:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &amp;lt;sch:pattern&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &amp;lt;sch:pattern&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;sch:rule context=&amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;//&lt;/del&gt;@xml:id&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;sch:rule context=&amp;quot;@xml:id&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:let name=&amp;quot;myID&amp;quot; value=&amp;quot;normalize-space(.)&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:let name=&amp;quot;myID&amp;quot; value=&amp;quot;normalize-space(.)&amp;quot;/&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:report test=&amp;quot;../(ancestor::*|preceding::*)/@xml:id[ normalize-space(.) eq $myID ]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;       &amp;lt;sch:report test=&amp;quot;../(ancestor::*|preceding::*)/@xml:id[ normalize-space(.) eq $myID ]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         &amp;quot;&amp;gt;#3 The @xml:id &amp;quot;&amp;lt;sch:value-of select=&amp;quot;.&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         &amp;quot;&amp;gt;#3 The @xml:id &amp;quot;&amp;lt;sch:value-of select=&amp;quot;.&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;quot; on &amp;amp;lt;&amp;lt;sch:value-of select=&amp;quot;name(..)&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;quot; on &amp;amp;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;amp;&lt;/ins&gt;lt;&amp;lt;sch:value-of select=&amp;quot;name(..)&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;gt; duplicates an @xml:id found earlier in the document&amp;lt;/sch:report&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;                         /&amp;gt;&amp;gt; duplicates an @xml:id found earlier in the document&amp;lt;/sch:report&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;/sch:rule&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;/sch:rule&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Syd</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.tei-c.org/index.php?title=Xmlid_uniqueness.sch&amp;diff=14447&amp;oldid=prev</id>
		<title>Syd: added page</title>
		<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=Xmlid_uniqueness.sch&amp;diff=14447&amp;oldid=prev"/>
		<updated>2015-10-02T22:56:28Z</updated>

		<summary type="html">&lt;p&gt;added page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;It is often convenient to validate XML documents against RELAX NG schemas ''without'' using the “DTD Compatability” feature of RELAX NG. (Particularly when&lt;br /&gt;
using certain wildcard patterns, as this feature can cause a “conflicting ID-types for attribute &amp;quot;id&amp;quot; from namespace &amp;quot;http://www.w3.org/XML/1998/namespace&amp;quot; of element …” error. Personally, I think getting notified of the conflict is good, but it should be a warning, not an error.) However, when DTD Compatability is turned off, the RELAX NG validator no longer tests that the values of your ID attributes (which, in TEI, means your &amp;lt;tt&amp;gt;@xml:id&amp;lt;/tt&amp;gt; attributes) are unique across all IDs in your document.&lt;br /&gt;
&lt;br /&gt;
Here are three slightly different ways to test for unique &amp;lt;tt&amp;gt;@xml:id&amp;lt;/tt&amp;gt; attributes in ISO Schematron.&lt;br /&gt;
&lt;br /&gt;
BTW, in oXygen this feature can be turned on and off in &amp;lt;tt&amp;gt;Options &amp;gt; Preferences… &amp;gt; XML &amp;gt; XML Parser &amp;gt; RELAX NG&amp;lt;/tt&amp;gt; pane by checking or unchecking the &amp;lt;tt&amp;gt;Check ID/IDREF&amp;lt;/tt&amp;gt; box. The easy way to get to it is to filter for the string “IDREF”, which does not appear in any other preference panes. At least this works in oXygen 17.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;sch:schema xmlns:sch=&amp;quot;http://purl.oclc.org/dsdl/schematron&amp;quot; queryBinding=&amp;quot;xslt2&amp;quot;&lt;br /&gt;
  xmlns:sqf=&amp;quot;http://www.schematron-quickfix.com/validator/process&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;sch:p&amp;gt;This Schematron schema contains three different ways of doing&lt;br /&gt;
    exactly the same thing: checking that each and every @xml:id&lt;br /&gt;
    attribute in the input has a unique value.&amp;lt;/sch:p&amp;gt;&lt;br /&gt;
  &amp;lt;sch:p&amp;gt;I do not know which of these three methods, or some other, is&lt;br /&gt;
    “best”, and I’m not sure there is any way to know. While #2 has the&lt;br /&gt;
    shortest XPath, I think #3 is easier to understand. But if you think&lt;br /&gt;
    #1 or #2 is easier to understand, by all means use it.&amp;lt;/sch:p&amp;gt;&lt;br /&gt;
  &amp;lt;sch:p&amp;gt;Note that none of these rules check that the value of @xml:id&lt;br /&gt;
    is a valid identifier, or even that it is present. They only check&lt;br /&gt;
    for uniqueness.&amp;lt;/sch:p&amp;gt;&lt;br /&gt;
  &amp;lt;sch:p&amp;gt;Written 2015-10-02 by Syd Bauman. Copyleft.&amp;lt;/sch:p&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;sch:pattern&amp;gt;&lt;br /&gt;
    &amp;lt;sch:rule context=&amp;quot;//@xml:id&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;sch:let name=&amp;quot;myID&amp;quot; value=&amp;quot;normalize-space(.)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;sch:report test=&amp;quot; ../ancestor::*/@xml:id[ normalize-space(.) eq $myID ]&lt;br /&gt;
                        |&lt;br /&gt;
                         ../preceding::*/@xml:id[ normalize-space(.) eq $myID ]&lt;br /&gt;
                        &amp;quot;&amp;gt;#1 The @xml:id &amp;quot;&amp;lt;sch:value-of select=&amp;quot;.&amp;quot;&lt;br /&gt;
                        /&amp;gt;&amp;quot; on &amp;amp;lt;&amp;lt;sch:value-of select=&amp;quot;name(..)&amp;quot;&lt;br /&gt;
                        /&amp;gt;&amp;gt; duplicates an @xml:id found earlier in the document&amp;lt;/sch:report&amp;gt;&lt;br /&gt;
    &amp;lt;/sch:rule&amp;gt;&lt;br /&gt;
  &amp;lt;/sch:pattern&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;sch:pattern&amp;gt;&lt;br /&gt;
    &amp;lt;sch:rule context=&amp;quot;//@xml:id&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;sch:let name=&amp;quot;myID&amp;quot; value=&amp;quot;normalize-space(.)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;sch:report test=&amp;quot;//*[ current()/.. &amp;gt;&amp;gt; .]/@xml:id[ normalize-space(.) eq $myID ]&lt;br /&gt;
                        &amp;quot;&amp;gt;#2 The  @xml:id &amp;quot;&amp;lt;sch:value-of select=&amp;quot;.&amp;quot;&lt;br /&gt;
                        /&amp;gt;&amp;quot; on &amp;amp;lt;&amp;lt;sch:value-of select=&amp;quot;name(..)&amp;quot;&lt;br /&gt;
                        /&amp;gt;&amp;gt; duplicates an @xml:id found earlier in the document&amp;lt;/sch:report&amp;gt;&lt;br /&gt;
    &amp;lt;/sch:rule&amp;gt;&lt;br /&gt;
  &amp;lt;/sch:pattern&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;sch:pattern&amp;gt;&lt;br /&gt;
    &amp;lt;sch:rule context=&amp;quot;//@xml:id&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;sch:let name=&amp;quot;myID&amp;quot; value=&amp;quot;normalize-space(.)&amp;quot;/&amp;gt;&lt;br /&gt;
      &amp;lt;sch:report test=&amp;quot;../(ancestor::*|preceding::*)/@xml:id[ normalize-space(.) eq $myID ]&lt;br /&gt;
                        &amp;quot;&amp;gt;#3 The @xml:id &amp;quot;&amp;lt;sch:value-of select=&amp;quot;.&amp;quot;&lt;br /&gt;
                        /&amp;gt;&amp;quot; on &amp;amp;lt;&amp;lt;sch:value-of select=&amp;quot;name(..)&amp;quot;&lt;br /&gt;
                        /&amp;gt;&amp;gt; duplicates an @xml:id found earlier in the document&amp;lt;/sch:report&amp;gt;&lt;br /&gt;
    &amp;lt;/sch:rule&amp;gt;&lt;br /&gt;
  &amp;lt;/sch:pattern&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/sch:schema&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Schematron]]&lt;/div&gt;</summary>
		<author><name>Syd</name></author>
		
	</entry>
</feed>