Skip to content

Commit

Permalink
not yet merged, so get latest from dev again
Browse files Browse the repository at this point in the history
  • Loading branch information
sydb committed Nov 9, 2023
2 parents d066194 + 8e0242d commit 6a81640
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 36 deletions.
38 changes: 19 additions & 19 deletions Test/expected-results/test15.odd.html
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Ejemplo</span>
</td>
<td class="wovenodd-col2">
<div id="index.xml-egXML-d33e1037" class="pre egXML_valid">
<div id="index.xml-egXML-d33e1038" class="pre egXML_valid">
<span class="element">&lt;body&gt;</span> 
<span class="element">&lt;div 
<span class="attribute">typ</span>="
Expand Down Expand Up @@ -707,7 +707,7 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Content model</span>
</td>
<td class="wovenodd-col2">
<pre id="index.xml-eg-d33e1070" class="pre_eg cdata">
<pre id="index.xml-eg-d33e1071" class="pre_eg cdata">
&lt;content&gt;
&lt;sequence minOccurs="1" maxOccurs="1"&gt;
&lt;alternate minOccurs="0"
Expand Down Expand Up @@ -759,7 +759,7 @@ <h2>
&lt;/sequence&gt;
&lt;/content&gt;

<a href="#index.xml-eg-d33e1070" class="anchorlink"></a>
<a href="#index.xml-eg-d33e1071" class="anchorlink"></a>
</pre>
</td>
</tr>
Expand All @@ -768,7 +768,7 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Declaración</span>
</td>
<td class="wovenodd-col2">
<pre id="index.xml-eg-d33e1077" class="pre_eg">
<pre id="index.xml-eg-d33e1078" class="pre_eg">
element div
{

Expand Down Expand Up @@ -808,7 +808,7 @@ <h2>
)?
)
}
<a href="#index.xml-eg-d33e1077" class="anchorlink"></a>
<a href="#index.xml-eg-d33e1078" class="anchorlink"></a>
</pre>
</td>
</tr>
Expand Down Expand Up @@ -1164,7 +1164,7 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Ejemplo</span>
</td>
<td class="wovenodd-col2">
<div id="index.xml-egXML-d33e1855" class="pre egXML_valid">
<div id="index.xml-egXML-d33e1857" class="pre egXML_valid">
<span class="element">&lt;para&gt;</span>Hallgerd was outside.
<span class="element">&lt;q&gt;</span>There is blood on your axe,
<span class="element">&lt;/q&gt;</span>she said.
Expand Down Expand Up @@ -1208,12 +1208,12 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Content model</span>
</td>
<td class="wovenodd-col2">
<pre id="index.xml-eg-d33e1890" class="pre_eg cdata">
<pre id="index.xml-eg-d33e1892" class="pre_eg cdata">
&lt;content&gt;
&lt;macroRef key="macro.paraContent"/&gt;
&lt;/content&gt;

<a href="#index.xml-eg-d33e1890" class="anchorlink"></a>
<a href="#index.xml-eg-d33e1892" class="anchorlink"></a>
</pre>
</td>
</tr>
Expand All @@ -1222,7 +1222,7 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Declaración</span>
</td>
<td class="wovenodd-col2">
<pre id="index.xml-eg-d33e1897" class="pre_eg">
<pre id="index.xml-eg-d33e1899" class="pre_eg">
element para
{

Expand All @@ -1236,7 +1236,7 @@ <h2>

<a class="link_ref" itemprop="ref" href="#TEI.macro.paraContent" title="macro.paraContent (contenido del párrafo) define el contenido de párrafos y elementos similares. [1.3. The TEI Class System]">macro.paraContent</a>
}
<a href="#index.xml-eg-d33e1897" class="anchorlink"></a>
<a href="#index.xml-eg-d33e1899" class="anchorlink"></a>
</pre>
</td>
</tr>
Expand Down Expand Up @@ -1746,7 +1746,7 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Ejemplo</span>
</td>
<td class="wovenodd-col2">
<div id="index.xml-egXML-d33e2986" class="pre egXML_valid">It is spelled
<div id="index.xml-egXML-d33e2989" class="pre egXML_valid">It is spelled
<span class="element">&lt;q&gt;</span>Tübingen
<span class="element">&lt;/q&gt;</span>— to enter the letter
<span class="element">&lt;q&gt;</span>u
Expand All @@ -1762,12 +1762,12 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Content model</span>
</td>
<td class="wovenodd-col2">
<pre id="index.xml-eg-d33e3000" class="pre_eg cdata">
<pre id="index.xml-eg-d33e3003" class="pre_eg cdata">
&lt;content&gt;
&lt;macroRef key="macro.specialPara"/&gt;
&lt;/content&gt;

<a href="#index.xml-eg-d33e3000" class="anchorlink"></a>
<a href="#index.xml-eg-d33e3003" class="anchorlink"></a>
</pre>
</td>
</tr>
Expand All @@ -1776,7 +1776,7 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Declaración</span>
</td>
<td class="wovenodd-col2">
<pre id="index.xml-eg-d33e3007" class="pre_eg">
<pre id="index.xml-eg-d33e3010" class="pre_eg">
element q
{

Expand All @@ -1798,7 +1798,7 @@ <h2>

<a class="link_ref" itemprop="ref" href="#TEI.macro.specialPara" title="macro.specialPara (contenido de párrafo especial) define el modelo de contenido de elementos tipo notas o entradas de lista que...">macro.specialPara</a>
}
<a href="#index.xml-eg-d33e3007" class="anchorlink"></a>
<a href="#index.xml-eg-d33e3010" class="anchorlink"></a>
</pre>
</td>
</tr>
Expand Down Expand Up @@ -1914,12 +1914,12 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Content model</span>
</td>
<td class="wovenodd-col2">
<pre id="index.xml-eg-d33e3201" class="pre_eg cdata">
<pre id="index.xml-eg-d33e3204" class="pre_eg cdata">
&lt;content&gt;
&lt;dataRef key="teidata.word"/&gt;
&lt;/content&gt;

<a href="#index.xml-eg-d33e3201" class="anchorlink"></a>
<a href="#index.xml-eg-d33e3204" class="anchorlink"></a>
</pre>
</td>
</tr>
Expand All @@ -1928,10 +1928,10 @@ <h2>
<span xml:lang="es" lang="es" class="label" itemprop="hi">Declaración</span>
</td>
<td class="wovenodd-col2">
<pre id="index.xml-eg-d33e3208" class="pre_eg">
<pre id="index.xml-eg-d33e3211" class="pre_eg">
teidata.enumerated =
<a class="link_ref" itemprop="ref" href="#TEI.teidata.word" title="teidata.word define una gama de valores de atributos expresados como una única palabra o señal.">teidata.word</a>
<a href="#index.xml-eg-d33e3208" class="anchorlink"></a>
<a href="#index.xml-eg-d33e3211" class="anchorlink"></a>
</pre>
</td>
</tr>
Expand Down
49 changes: 32 additions & 17 deletions common/common_tagdocs.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,11 @@
</xsl:attribute>
<xsl:choose>
<xsl:when test="not(tei:attList)">
<xsl:call-template name="showAttClasses"/>
<xsl:element namespace="{$outputNS}" name="{$ulName}">
<xsl:attribute name="{$rendName}" select="'attList'"/>
<xsl:processing-instruction name="DEBUG"> calling showAttClasses 01 </xsl:processing-instruction>
<xsl:call-template name="showAttClasses"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="tei:attList">
Expand Down Expand Up @@ -708,6 +712,7 @@
<a>
<xsl:choose>
<xsl:when test="not(tei:attList)">
<xsl:processing-instruction name="DEBUG"> calling showAttClasses 02 </xsl:processing-instruction>
<xsl:call-template name="showAttClasses"/>
</xsl:when>
<xsl:otherwise>
Expand Down Expand Up @@ -742,7 +747,11 @@
</xsl:attribute>
<xsl:choose>
<xsl:when test="not(tei:attList)">
<xsl:call-template name="showAttClasses"/>
<xsl:element namespace="{$outputNS}" name="{$ulName}">
<xsl:attribute name="{$rendName}" select="'attList'"/>
<xsl:processing-instruction name="DEBUG"> calling showAttClasses 03 </xsl:processing-instruction>
<xsl:call-template name="showAttClasses"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="tei:attList">
Expand All @@ -756,7 +765,7 @@
<xsl:for-each select="$myatts/a">
<xsl:copy-of select="*|text()"/>
</xsl:for-each>
-->
-->
</xsl:element>
</xsl:element>
</xsl:if>
Expand Down Expand Up @@ -1153,6 +1162,7 @@
<xsl:attribute name="{$colspan}">
<xsl:text>2</xsl:text>
</xsl:attribute>
<xsl:processing-instruction name="DEBUG"> calling showAttClasses 04 </xsl:processing-instruction>
<xsl:call-template name="showAttClasses">
<xsl:with-param name="minimal">true</xsl:with-param>
</xsl:call-template>
Expand Down Expand Up @@ -1186,6 +1196,7 @@
/>
</xsl:element>
</xsl:if>
<xsl:processing-instruction name="DEBUG"> calling showAttClasses 05 </xsl:processing-instruction>
<xsl:call-template name="showAttClasses">
<xsl:with-param name="minimal">true</xsl:with-param>
</xsl:call-template>
Expand Down Expand Up @@ -2125,6 +2136,7 @@
<xsl:template name="displayAttList">
<xsl:param name="mode"/>
<xsl:variable name="attribute_list_items">
<xsl:processing-instruction name="DEBUG"> calling showAttClasses 06 </xsl:processing-instruction>
<xsl:call-template name="showAttClasses"/>
<xsl:if test=".//tei:attRef">
<xsl:call-template name="showAttRefs"/>
Expand All @@ -2142,7 +2154,7 @@
<xsl:choose>
<xsl:when test="$mode = 'all'">
<!--ISSUE 328 (martindholmes and joeytakeda): Added predicate
to suppress copying tei:attRef, which were invalid in TEI lite-->
to suppress copying tei:attRef, which were invalid in TEI lite-->
<xsl:apply-templates select="node()[not(self::tei:attRef)]"/>
</xsl:when>
<xsl:otherwise>
Expand Down Expand Up @@ -2739,8 +2751,7 @@
<xsl:template name="showAttClasses">
<xsl:param name="minimal">false</xsl:param>
<xsl:variable name="clatts">
<xsl:for-each
select="ancestor-or-self::tei:elementSpec | ancestor-or-self::tei:classSpec">
<xsl:for-each select="ancestor-or-self::tei:elementSpec | ancestor-or-self::tei:classSpec">
<xsl:call-template name="attClassDetails"/>
</xsl:for-each>
</xsl:variable>
Expand All @@ -2754,12 +2765,9 @@
<xsl:if test="ancestor::tei:schemaSpec and key('CLASSES', 'att.global')">
<xsl:variable name="word">
<xsl:choose>
<!-- Per issue 515, the word "Attributes" need not be output here. -->
<xsl:when test="not($autoGlobal = 'true')"><!--Attributes--></xsl:when>
<xsl:when test=".//tei:attDef">In addition to global attributes
and those inherited from</xsl:when>
<xsl:otherwise>Global attributes and those inherited
from</xsl:otherwise>
<xsl:when test="not($autoGlobal = 'true')"/>
<xsl:when test=".//tei:attDef">In addition to global attributes and those inherited from</xsl:when>
<xsl:otherwise>Global attributes and those inherited from</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="normalize-space($word) ne ''">
Expand All @@ -2777,10 +2785,8 @@
<xsl:otherwise>
<xsl:variable name="word">
<xsl:choose>
<!-- Per issue 515, the word "Attributes" need not be output here. -->
<xsl:when test="not($autoGlobal = 'true')"><!--Attributes--></xsl:when>
<xsl:when test=".//tei:attDef">In addition to global
attributes</xsl:when>
<xsl:when test="not($autoGlobal = 'true')"/>
<xsl:when test=".//tei:attDef">In addition to global attributes</xsl:when>
<xsl:otherwise>Global attributes only</xsl:otherwise>
</xsl:choose>
</xsl:variable>
Expand All @@ -2791,7 +2797,16 @@

<xsl:template name="attClassDetails">
<xsl:for-each select="tei:classes/tei:memberOf">
<xsl:variable name="thisClassSpec" select="key('ATTCLASSES', @key)" as="element(tei:classSpec)?"/>
<xsl:variable name="key" select="@key"/>
<!--
Note: following line does not use "key('ATTCLASSES', @key)",
which would arguable be mildly faster, because ATTCLASSES is
not defined in this or any imported file, and importing the
file in which it is defined (odds/classatts.xsl) requires
importing other files, which in turn importing other files,
etc. —Syd, 2023-11-03
-->
<xsl:variable name="thisClassSpec" select="//tei:classSpec[@type eq 'atts'][@ident eq $key]" as="element(tei:classSpec)?"/>
<xsl:choose>
<xsl:when test="$thisClassSpec">
<xsl:element namespace="{$outputNS}" name="{$itemName}">
Expand Down

0 comments on commit 6a81640

Please sign in to comment.