Skip to content
Merged
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
6 changes: 3 additions & 3 deletions Test/test30.odd
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@
<rng:text/>
</content>
<attList>
<attRef class="att.global" name="xmlid"/>
<attRef class="att.global.rendition" name="rend"/>
<attRef class="att.global" key="xmlid"/>
<attRef class="att.global.rendition" key="rend"/>
</attList>
</elementSpec>
<elementSpec ident="p" mode="change">
<classes mode="replace">
<memberOf key="model.pLike"/>
</classes>
<attList>
<attRef class="att.global" name="xmlid"/>
<attRef class="att.global" key="xmlid"/>
</attList>
</elementSpec>
<classSpec ident="att.global.rendition" module="tei" mode="change" type="atts">
Expand Down
18 changes: 7 additions & 11 deletions common/common_tagdocs.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,11 @@

<!-- we assume that datatype contains only a single dataRef -->
<!-- (I don't like the above assumption, but I just tested, -->
<!-- and as of now (2016-11-15) it's true for P5. -Syd) -->
<!-- and as of now (2016-11-15) it's true for P5. —Syd) -->
<!-- MDH tweaked this again 2016-12-29 to deal with remaining
rng:data elements not yet PURE-ified. -->
<xsl:call-template name="showElement">
<xsl:with-param name="name" select="if (tei:dataRef/@key) then tei:dataRef/@key else if (tei:dataRef/@name) then tei:dataRef/@name else if (rng:data/@type) then rng:data/@type else ''"/>
<xsl:with-param name="name" select="( tei:dataRef/@key!string(), tei:dataRef/@name!string(), rng:data/@type!string(), '')[1]"/>
</xsl:call-template>
<xsl:if test="1 != ( $minOccurs, $maxOccurs )">
<xsl:text> </xsl:text>
Expand Down Expand Up @@ -2102,7 +2102,7 @@
<xsl:variable name="theseAttDefs" select="$Original//tei:classSpec[@ident = current-grouping-key()]/tei:attList/tei:attDef" as="element(tei:attDef)*"/>
<!-- subset of those that have been deleted or over-ridden -->
<xsl:variable name="theUnusedAttDefs" as="element(tei:attDef)*"
select="$theseAttDefs[ not( @ident = (current-group()/@name, current-group()/@key ) ) ]"/>
select="$theseAttDefs[ not( @ident = current-group()/@key ) ]"/>

<xsl:element namespace="{$outputNS}" name="{$ulName}">
<xsl:attribute name="{$rendName}" select="'classSpecAttDefs'"/>
Expand All @@ -2120,10 +2120,7 @@
<xsl:element namespace="{$outputNS}" name="{$itemName}">
<xsl:element namespace="{$outputNS}" name="{$segName}">
<xsl:attribute name="{$rendName}">attribute</xsl:attribute>
<xsl:sequence select="concat('@', ( @name | @key ) )"/>
<!-- Above union works because only 1 of the attrs
@name & @key will ever be present. Should be
reduced to just @key after 2026-11-13 -->
<xsl:sequence select="concat('@', @key )"/>
</xsl:element>
</xsl:element>
</xsl:for-each>
Expand Down Expand Up @@ -3107,7 +3104,7 @@
<!--
Note that the @prefix being specified on the <Element> elements
we generate are mostly empty, as the current node when we are
called is a <tei:content> which does not have an @prefix.
called is a <tei:content> which does not have a @prefix.
— Stylesheets group, 2020-03-17
-->
<xsl:if test=".//rng:text or .//rng:data or .//tei:textNode">
Expand All @@ -3118,10 +3115,9 @@
</xsl:for-each>
<xsl:for-each
select=".//rng:ref | .//tei:elementRef | .//tei:classRef | .//tei:macroRef | .//tei:dataRef">
<xsl:if
test="not(starts-with(@name, 'any') or starts-with(@name, 'macro.any') or starts-with(@key, 'macro.any') or @name = 'AnyThing')">
<xsl:if test="not(starts-with(@name, 'any') or starts-with(@name, 'macro.any') or starts-with(@key, 'macro.any') or @name = 'AnyThing')">
<xsl:variable name="Name"
select="replace(@name | @key, '_(alternation|sequenceOptionalRepeatable|sequenceOptional|sequenceRepeatable|sequence)', '')"/>
select="replace( @name | @key, '_(alternation|sequenceOptionalRepeatable|sequenceOptional|sequenceRepeatable|sequence)', '')"/>
<xsl:variable name="except" select="@except"/>
<xsl:variable name="include" select="@include"/>
<xsl:for-each select="key('IDENTS', $Name)">
Expand Down
6 changes: 6 additions & 0 deletions debian-tei-xsl/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
tei-xsl (7.62.0a) natty; urgency=low

* new release from upstream

-- TEI <editors@www.tei-c.org> Tue, 17 Nov 2026 16:37:04 -0500

tei-xsl (7.61.0a) natty; urgency=low

* new release from upstream
Expand Down
2 changes: 1 addition & 1 deletion odds/classatts.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<attRef class="{ancestor::classSpec/@ident}" name="{@ident}"/>
<attRef class="{ancestor::classSpec/@ident}" key="{@ident}"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
Expand Down
3 changes: 1 addition & 2 deletions odds/odd2odd.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:key name="odd2odd-MODULE_MEMBERS_NONELEMENT" match="tei:dataSpec" use="@module"/>
<xsl:key name="odd2odd-MODULE_MEMBERS_NONELEMENT" match="tei:macroSpec" use="@module"/>
<xsl:key name="odd2odd-MODULE_MEMBERS_NONELEMENT" match="tei:classSpec" use="@module"/>
<xsl:key name="odd2odd-ATTREFED" use="substring-before( (@name|@key),'.attribute.')" match="tei:attRef"/>
<!-- Above union of @name & @key should be reduced to just @key after 2026-11-13 -->
<xsl:key name="odd2odd-ATTREFED" use="substring-before( @key, '.attribute.')" match="tei:attRef"/>
<xsl:key name="odd2odd-REFED" use="@name" match="rng:ref[ancestor::tei:elementSpec]"/>
<xsl:key name="odd2odd-REFED" use="@name" match="rng:ref[ancestor::tei:macroSpec and not(@name=ancestor::tei:macroSpec/@ident)]"/>
<xsl:key name="odd2odd-REFED" use="@name" match="rng:ref[ancestor::tei:datatype]"/>
Expand Down
29 changes: 9 additions & 20 deletions odds/teiodds.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,6 @@ of this software, even if advised of the possibility of such damage.
<xsl:key match="tei:macroSpec[@predeclare='true']" name="PredeclareMacrosModule" use="@module"/>
<xsl:key match="tei:macroSpec[@predeclare='true']" name="PredeclareAllMacros" use="1"/>


<!--
******** Note for removing deprection on 2026-11-13 or thereafter ********
In ~½ dozen places herein you will find the construct “@name |
@key”. These unions work because 1 and only 1 of those two
attributes will ever be present on the <attRef> being
processed. Should be reduced to just @key after 2026-11-13.
-->


<xsl:variable name="DEFAULTSOURCE">
<xsl:choose>
<xsl:when test="$defaultSource != ''">
Expand Down Expand Up @@ -410,7 +400,7 @@ of this software, even if advised of the possibility of such damage.
</xsl:when>
<xsl:when test="@class"/>
<xsl:otherwise>
<rng:ref name="{@name|@key}"/>
<rng:ref name="{@key}"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Expand Down Expand Up @@ -541,14 +531,13 @@ of this software, even if advised of the possibility of such damage.
</xsl:when>
<xsl:when test="@class"/>
<xsl:otherwise>
<rng:ref name="{@name|@key}"/>
<rng:ref name="{@key}"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</ROOT>
</xsl:variable>
<rng:define
name="{$c}.attributes">
<rng:define name="{$c}.attributes">
<xsl:for-each select="$contents/ROOT">
<xsl:apply-templates mode="justcopy"/>
<xsl:if test="not($contents/ROOT/*)">
Expand Down Expand Up @@ -2013,9 +2002,9 @@ of this software, even if advised of the possibility of such damage.
<xsl:apply-templates mode="justcopy" select="."/>
</xsl:when>
<xsl:when test="self::sch:pattern[ @is-a ]">
<xsl:if test="//sch:pattern[@abstract='true'][@id=current()/@is-a]">
<xsl:apply-templates mode="justcopy" select="."/>
</xsl:if>
<xsl:if test="//sch:pattern[@abstract='true'][@id=current()/@is-a]">
<xsl:apply-templates mode="justcopy" select="."/>
</xsl:if>
</xsl:when>
<xsl:when test="self::sch:rule[not(preceding-sibling::sch:rule)]">
<pattern xmlns="http://purl.oclc.org/dsdl/schematron">
Expand Down Expand Up @@ -2379,11 +2368,11 @@ of this software, even if advised of the possibility of such damage.
</xsl:choose>
</xsl:for-each>
<xsl:choose>
<xsl:when test="not(@name|@key)">
<xsl:value-of select="concat(@class,'.attributes')"/>
<xsl:when test="not( @key )">
<xsl:value-of select="@class||'.attributes'"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(@class,'.attribute.',translate( (@name|@key),':',''))"/>
<xsl:value-of select="@class||'.attribute.'||translate( @key, ':', '')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
Expand Down
Loading