This software is dual-licensed: 1. Distributed under a Creative Commons
Attribution-ShareAlike 3.0 Unported License
http://creativecommons.org/licenses/by-sa/3.0/ 2.
http://www.opensource.org/licenses/BSD-2-Clause Redistribution and use
in source and binary forms, with or without modification, are permitted
provided that the following conditions are met: * Redistributions of
source code must retain the above copyright notice, this list of
conditions and the following disclaimer. * Redistributions in binary
form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials
provided with the distribution. This software is provided by the
copyright holders and contributors "as is" and any express or implied
warranties, including, but not limited to, the implied warranties of
merchantability and fitness for a particular purpose are disclaimed. In
no event shall the copyright holder or contributors be liable for any
direct, indirect, incidental, special, exemplary, or consequential
damages (including, but not limited to, procurement of substitute goods
or services; loss of use, data, or profits; or business interruption)
however caused and on any theory of liability, whether in contract,
strict liability, or tort (including negligence or otherwise) arising in
any way out of the use of this software, even if advised of the
possibility of such damage.
<xsl:template match="tei:attDef/tei:datatype" mode="weave"><xsl:element namespace="{$outputNS}" name="{$rowName}"><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:attribute name="{$rendName}"><xsl:text>odd_label</xsl:text></xsl:attribute><xsl:element namespace="{$outputNS}" name="{$hiName}"><xsl:attribute name="{$langAttributeName}"><xsl:value-of select="$documentationLanguage"/></xsl:attribute><xsl:attribute name="{$rendName}"><xsl:text>label</xsl:text></xsl:attribute><xsl:sequence select="tei:i18n('Datatype')"/></xsl:element><xsl:text></xsl:text></xsl:element><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:attribute name="{$rendName}"><xsl:text>odd_value</xsl:text></xsl:attribute><!-- Convert @minOccurs and @maxOccurs to integers, giving them --><!-- a default of 1, and converting "unbounded" to -1. --><!-- We should probably use the function tei:minOmaxO() instead. --><xsl:variable name="minOccurs" select="( @minOccurs, '1' )[1] cast as xs:integer"/><xsl:variable name="maxOccurs" as="xs:integer"><xsl:choose><xsl:when test="normalize-space( @maxOccurs ) eq 'unbounded'"><xsl:value-of select="-1"/></xsl:when><xsl:when test="@maxOccurs"><xsl:value-of select="@maxOccurs cast as xs:integer"/></xsl:when><xsl:otherwise><xsl:value-of select="1"/></xsl:otherwise></xsl:choose></xsl:variable><xsl:if test="( $minOccurs, $maxOccurs ) != 1"><xsl:text></xsl:text><xsl:value-of select="$minOccurs"/><xsl:text>–</xsl:text><xsl:value-of select="if ($maxOccurs eq -1) then '∞' else $maxOccurs"/><xsl:text></xsl:text><xsl:element namespace="{$outputNS}" name="{$segName}"><xsl:attribute name="{$langAttributeName}"><xsl:value-of select="$documentationLanguage"/></xsl:attribute><xsl:sequence select="tei:i18n('occurrences of')"/></xsl:element><xsl:value-of select="$spaceCharacter"/></xsl:if><!-- <xsl:call-template name="schemaOut">
<xsl:with-param name="grammar"/>
<xsl:with-param name="element">code</xsl:with-param>
<xsl:with-param name="content">
<Wrapper>
<xsl:copy-of select="rng:*"/>
</Wrapper>
</xsl:with-param>
</xsl:call-template>--><!-- 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) --><!-- 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:call-template><xsl:if test="1 != ( $minOccurs, $maxOccurs )"><xsl:text></xsl:text><xsl:element namespace="{$outputNS}" name="{$segName}"><xsl:attribute name="{$langAttributeName}"><xsl:value-of select="$documentationLanguage"/></xsl:attribute><xsl:sequence select="tei:i18n('separated by whitespace')"/></xsl:element></xsl:if></xsl:element></xsl:element></xsl:template>
<xsl:template match="tei:elementSpec/tei:content" mode="weave"><xsl:variable name="name" select="tei:createSpecName(..)"/><xsl:element namespace="{$outputNS}" name="{$rowName}"><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:attribute name="{$rendName}"><xsl:text>wovenodd-col1</xsl:text></xsl:attribute><xsl:element namespace="{$outputNS}" name="{$hiName}"><xsl:attribute name="{$rendName}"><xsl:text>label</xsl:text></xsl:attribute><xsl:attribute name="{$langAttributeName}"><xsl:value-of select="$documentationLanguage"/></xsl:attribute><xsl:sequence select="tei:i18n('ContentModel')"/></xsl:element></xsl:element><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:attribute name="{$rendName}"><xsl:text>wovenodd-col2</xsl:text></xsl:attribute><xsl:call-template name="pureODDOut"><xsl:with-param name="grammar"/><xsl:with-param name="content"><PureODD><xsl:apply-templates select="." mode="PureODD"/></PureODD></xsl:with-param></xsl:call-template><xsl:for-each select="tei:valList[@type='closed']"><xsl:sequence select="tei:i18n('Legal values are')"/><xsl:text>:</xsl:text><xsl:call-template name="valListItems"/></xsl:for-each></xsl:element></xsl:element><xsl:element namespace="{$outputNS}" name="{$rowName}"><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:attribute name="{$rendName}"><xsl:text>wovenodd-col1</xsl:text></xsl:attribute><xsl:element namespace="{$outputNS}" name="{$hiName}"><xsl:attribute name="{$rendName}"><xsl:text>label</xsl:text></xsl:attribute><xsl:attribute name="{$langAttributeName}"><xsl:value-of select="$documentationLanguage"/></xsl:attribute><xsl:sequence select="tei:i18n('Schema Declaration')"/></xsl:element></xsl:element><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:attribute name="{$rendName}"><xsl:text>wovenodd-col2</xsl:text></xsl:attribute><xsl:variable name="content"><Wrapper><rng:element name="{$name}"><xsl:if test="not(key('SCHEMASPECS',1))"><xsl:if test="$autoGlobal='true'"><rng:ref name="att.global.attributes"/></xsl:if><xsl:for-each select=".."><xsl:call-template name="showClassAtts"/></xsl:for-each></xsl:if><!--
We want the attributes here as the result of
tangling our sibling <attList>(s). However, we do
not want the <constraintSpec>s to be processed. See
https://github.com/TEIC/Stylesheets/issues/488
and
https://github.com/TEIC/TEI/issues/2115.
To do this, we pass a tunneled parameter to the tangle
mode templates so that they can suppress the constraintSpecs
when rendering the element content model.
—Syd, Martin, Nick, and Martina, 2021-02-25
--><xsl:apply-templates mode="tangle" select="../tei:attList"><xsl:with-param as="xs:boolean" name="includeConstraints" tunnel="yes" select="false()"/></xsl:apply-templates><xsl:for-each select=".."><xsl:call-template name="defineContent"/></xsl:for-each></rng:element></Wrapper></xsl:variable><xsl:call-template name="schemaOut"><xsl:with-param name="grammar"/><xsl:with-param name="content" select="$content"/></xsl:call-template><xsl:for-each select="tei:valList[@type = 'closed']"><xsl:sequence select="tei:i18n('Legal values are')"/><xsl:text>:</xsl:text><xsl:call-template name="valListItems"/></xsl:for-each></xsl:element></xsl:element></xsl:template>
Template
tei:constraintSpec[parent::tei:schemaSpec or parent::tei:elementSpec or
parent::tei:classSpec or parent::tei:dataSpec or parent::tei:attDef]weave
Namespace
No namespace
Match
tei:constraintSpec[parent::tei:schemaSpec or parent::tei:elementSpec or
parent::tei:classSpec or parent::tei:dataSpec or parent::tei:attDef]
<xsl:template match="tei:elementSpec | tei:classSpec | tei:macroSpec | tei:dataSpec" mode="show"><xsl:param name="atts"/><xsl:variable name="name" select="tei:createSpecName(.)"/><xsl:variable name="linkname" select="concat(tei:createSpecPrefix(.), $name)"/><xsl:element namespace="{$outputNS}" name="{$hiName}"><xsl:attribute name="{$rendName}"><xsl:text>specList-</xsl:text><xsl:value-of select="local-name(.)"/></xsl:attribute><xsl:element namespace="{$outputNS}" name="{$xrefName}"><xsl:attribute name="{$urlName}"><xsl:choose><xsl:when test="number($splitLevel) = -1"><xsl:text>#</xsl:text><xsl:value-of select="$idPrefix"/><xsl:value-of select="$name"/></xsl:when><xsl:when test="$STDOUT = 'true'"><xsl:for-each select="key('IDENTS', $name)"><xsl:call-template name="getSpecURL"><xsl:with-param name="name"><xsl:value-of select="$name"/></xsl:with-param><xsl:with-param name="type"><xsl:value-of select="substring-before(local-name(), 'Spec')"/></xsl:with-param></xsl:call-template></xsl:for-each></xsl:when><xsl:otherwise><xsl:text>ref-</xsl:text><xsl:value-of select="$linkname"/><xsl:text>.html</xsl:text></xsl:otherwise></xsl:choose></xsl:attribute><xsl:value-of select="$name"/><xsl:for-each select="key('IDENTS', $name)"><xsl:if test="tei:content/rng:empty"><xsl:text>/</xsl:text></xsl:if></xsl:for-each></xsl:element></xsl:element><xsl:call-template name="showSpace"/><xsl:sequence select="tei:makeDescription(., false(), true())"/><xsl:choose><xsl:when test="self::tei:classSpec and @type = 'model'"><xsl:if test="key('CLASSMEMBERS-CLASSES', @ident)"><xsl:element namespace="{$outputNS}" name="{$tableName}"><xsl:attribute name="{$rendName}"><xsl:text>classList</xsl:text></xsl:attribute><xsl:apply-templates mode="summary" select="key('CLASSMEMBERS-CLASSES', @ident)"><xsl:sort select="lower-case(@ident)"/></xsl:apply-templates></xsl:element></xsl:if><xsl:if test="key('CLASSMEMBERS-ELEMENTS', @ident)"><xsl:element namespace="{$outputNS}" name="{$tableName}"><xsl:attribute name="{$rendName}"><xsl:text>elementList</xsl:text></xsl:attribute><xsl:apply-templates mode="summary" select="key('CLASSMEMBERS-ELEMENTS', @ident)"><xsl:sort select="lower-case(@ident)"/></xsl:apply-templates></xsl:element></xsl:if></xsl:when><!--
Note: the '-' in the following @test and the <xsl:when>
clause for '+' (which is ~15 lines further down) are not
supported features of the ODD language, and are in fact
invalid values of the @atts attribute which is currently
being processed. See
https://github.com/TEIC/Stylesheets/issues/329. Per the
Stylesheet groups discussion of that ticket earlier today,
we are leaving the code here in case this is a feature we
decide to add to ODD someday.
--><xsl:when test="$atts = '-' or $atts = ''"/><xsl:when test="string-length($atts) > 0"><xsl:element namespace="{$outputNS}" name="{$tableName}"><xsl:attribute name="{$rendName}"><xsl:text>specDesc</xsl:text></xsl:attribute><xsl:variable name="HERE" select="."/><xsl:for-each select="tokenize($atts, ' ')"><xsl:variable name="TOKEN" select="."/><!-- Show a selected attribute where "$HERE" is the
starting node
and $TOKEN is attribute we have been asked to display--><xsl:for-each select="$HERE"><xsl:choose><xsl:when test="$TOKEN = '+'"><!-- See above note (~15 lines up) about this clause for '+'. --><xsl:element namespace="{$outputNS}" name="{$rowName}"><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:attribute name="{$rendName}"><xsl:text>odd_value</xsl:text></xsl:attribute><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></xsl:element></xsl:element></xsl:when><xsl:when test="tei:attList//tei:attDef[@ident = $TOKEN]"><xsl:for-each select="tei:attList//tei:attDef[@ident = $TOKEN]"><xsl:call-template name="showAnAttribute"/></xsl:for-each></xsl:when><xsl:otherwise><!--Look for it in class hierarchy --><xsl:call-template name="checkClassesForAttribute"><xsl:with-param name="TOKEN" select="$TOKEN"/></xsl:call-template></xsl:otherwise></xsl:choose></xsl:for-each></xsl:for-each></xsl:element></xsl:when><xsl:otherwise><xsl:if test="tei:attList//tei:attDef"><xsl:element namespace="{$outputNS}" name="{$tableName}"><xsl:attribute name="{$rendName}"><xsl:text>attList</xsl:text></xsl:attribute><xsl:apply-templates mode="summary" select="tei:attList//tei:attDef"/></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></xsl:otherwise></xsl:choose></xsl:template>
<xsl:template match="tei:exemplum" mode="doc"><xsl:variable name="documentationLanguage"><xsl:sequence select="tei:generateDocumentationLang(.)"/></xsl:variable><xsl:choose><xsl:when test="parent::tei:exemplum"><xsl:call-template name="showExample"/></xsl:when><xsl:when test="not(@xml:lang)"><xsl:call-template name="showExample"/></xsl:when><xsl:when test="@xml:lang = 'und'"><xsl:call-template name="showExample"/></xsl:when><xsl:when test="@xml:lang = 'mul' and not($documentationLanguage = 'zh-TW')"><!-- will need to generalize this if other langs come along like
chinese --><xsl:call-template name="showExample"/></xsl:when><xsl:when test="@xml:lang = $documentationLanguage"><xsl:call-template name="showExample"/></xsl:when><xsl:when test="not(../tei:exemplum[@xml:lang = $documentationLanguage]) and (@xml:lang = 'en' or @xml:lang = 'und' or @xml:lang = 'mul')"><xsl:call-template name="showExample"/></xsl:when></xsl:choose></xsl:template>
<xsl:template name="showAttRefs"><xsl:param name="endspace" select="true()"/><xsl:for-each-group select=".//tei:attRef[not(tei:match(@rend, 'none'))]" group-by="@class"><xsl:element namespace="{$outputNS}" name="{$itemName}"><xsl:attribute name="{$rendName}" select="'attRefItem'"/><xsl:call-template name="linkTogether"><xsl:with-param name="name" select="current-grouping-key()"/><xsl:with-param name="reftext"><xsl:value-of select="current-grouping-key()"/></xsl:with-param></xsl:call-template><!-- set a variable that contains all the <attDef> elements from Original that are children of the referenced <classSpec> --><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" select="$theseAttDefs[ not( @ident = current-group()/@name ) ]" as="element(tei:attDef)*"/><xsl:element namespace="{$outputNS}" name="{$ulName}"><xsl:attribute name="{$rendName}" select="'classSpecAttDefs'"/><!-- display unused attrs with a special class
so they can be displayed as unavailable --><xsl:for-each select="$theUnusedAttDefs"><xsl:element namespace="{$outputNS}" name="{$itemName}"><xsl:element namespace="{$outputNS}" name="{$segName}"><xsl:attribute name="{$rendName}">unusedattribute</xsl:attribute><xsl:value-of select="@ident"/></xsl:element></xsl:element></xsl:for-each><xsl:for-each select="current-group()"><xsl:element namespace="{$outputNS}" name="{$itemName}"><xsl:element namespace="{$outputNS}" name="{$segName}"><xsl:attribute name="{$rendName}">attribute</xsl:attribute><xsl:sequence select="concat('@', @name )"/></xsl:element></xsl:element></xsl:for-each></xsl:element></xsl:element></xsl:for-each-group></xsl:template>
<xsl:template match="tei:exemplum" mode="weave"><xsl:if test="teix:egXML/* or teix:egXML/text() or text()"><xsl:apply-templates select="." mode="doc"/></xsl:if></xsl:template>
<xsl:template match="tei:defaultVal" mode="weave"><xsl:if test="not(../tei:valList)"><xsl:element namespace="{$outputNS}" name="{$rowName}"><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:attribute name="{$rendName}"><xsl:text>odd_label</xsl:text></xsl:attribute><xsl:element namespace="{$outputNS}" name="{$hiName}"><xsl:attribute name="{$langAttributeName}"><xsl:value-of select="$documentationLanguage"/></xsl:attribute><xsl:attribute name="{$rendName}"><xsl:text>label</xsl:text></xsl:attribute><xsl:sequence select="tei:i18n('Default')"/></xsl:element><xsl:text></xsl:text></xsl:element><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:attribute name="{$rendName}"><xsl:text>odd_value</xsl:text></xsl:attribute><xsl:value-of select="."/><xsl:if test="@validUntil"><!-- This clause added 2016-07-22 by Syd and Martin so that --><!-- default values can be deprecated. See issue #158. --><xsl:element namespace="{$outputNS}" name="{$tableName}"><xsl:call-template name="validUntil"/></xsl:element></xsl:if></xsl:element></xsl:element></xsl:if></xsl:template>
Process element desc iff it is the child of a specification
element. We only process specification element descriptions (which
become just plain text in the RELAX NG annotations, as markup is
not allowed in a RELAX NG annotation) here, as a description that
is not the child of a specification element (which becomes a
<desc> element in the output TEI Lite) are processed
elsewhere.
Description
This template changed 2021-06-24 by Stylesheets group in
response to ticket #444 in the Stylesheets repo, which
complained that a <desc> inside a <graphic> was doing the wrong
thing (to wit, copying only the content of the <desc> into the
TEI Lite, not the entire <desc> element, because it was being
processed by this template without the predicate).
<xsl:template name="attClassDetails"><xsl:for-each select="tei:classes/tei:memberOf"><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}"><xsl:attribute name="{$rendName}" select="'classSpecItem'"/><!-- Set the context node to be the <classSpec> this <memberOf> points to --><xsl:for-each select="$thisClassSpec[@type eq 'atts']"><xsl:call-template name="linkTogether"><xsl:with-param name="name" select="@ident"/></xsl:call-template><xsl:if test=".//tei:attDef"><xsl:element namespace="{$outputNS}" name="{$ulName}"><xsl:attribute name="{$rendName}" select="'classSpecAttDefs'"/><xsl:for-each select=".//tei:attDef"><xsl:element namespace="{$outputNS}" name="{$itemName}"><xsl:call-template name="emphasize"><xsl:with-param name="class">attribute</xsl:with-param><xsl:with-param name="content"><xsl:value-of select="'@'||tei:createSpecName(.)"/></xsl:with-param></xsl:call-template></xsl:element></xsl:for-each></xsl:element></xsl:if><xsl:if test=".//tei:attRef"><xsl:element namespace="{$outputNS}" name="{$ulName}"><xsl:attribute name="{$rendName}" select="'classSpecAttRefs'"/><xsl:call-template name="showAttRefs"/></xsl:element></xsl:if><xsl:if test="tei:classes/tei:memberOf"><xsl:element namespace="{$outputNS}" name="{$ulName}"><xsl:attribute name="{$rendName}" select="'classSpecMemberOfs'"/><xsl:call-template name="attClassDetails"/></xsl:element></xsl:if></xsl:for-each></xsl:element></xsl:when></xsl:choose></xsl:for-each></xsl:template>
<xsl:template name="followRef"><!--
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.
— Stylesheets group, 2020-03-17
--><xsl:if test=".//rng:text or .//rng:data or .//tei:textNode"><Element prefix="{@prefix}" type="TEXT" module="~TEXT"/></xsl:if><xsl:for-each select="distinct-values( .//tei:dataRef/@name )"><Element prefix="" type="XSD" module="~XSD" name="{.}"/></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:variable name="Name" 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)"><xsl:choose><xsl:when test="self::tei:elementSpec"><Element prefix="{@prefix}" module="{@module}" type="{local-name()}" name="{tei:createSpecName(.)}"/></xsl:when><xsl:when test="self::tei:macroSpec"><xsl:for-each select="tei:content"><xsl:choose><xsl:when test="(rng:text or rng:data) and count(rng:*) = 1"><Element prefix="{@prefix}" type="TEXT" module="~TEXT"/></xsl:when><xsl:otherwise><xsl:call-template name="followRef"/></xsl:otherwise></xsl:choose></xsl:for-each></xsl:when><xsl:when test="self::tei:dataSpec"><xsl:for-each select="tei:content"><xsl:choose><xsl:when test="(rng:text or rng:data) and count(rng:*) = 1"><Element prefix="{@prefix}" type="TEXT" module="~TEXT"/></xsl:when><xsl:otherwise><xsl:call-template name="followRef"/></xsl:otherwise></xsl:choose></xsl:for-each></xsl:when><xsl:when test="self::tei:classSpec"><xsl:call-template name="followMembers"><xsl:with-param name="include" select="$include"/><xsl:with-param name="except" select="$except"/></xsl:call-template></xsl:when></xsl:choose></xsl:for-each></xsl:if><xsl:if test="@key = 'macro.anyXML'"><Element type="ANYXML" module="~anyXML"/></xsl:if></xsl:for-each></xsl:template>
<xsl:template name="validUntil"><xsl:param name="inline" select="false()"/><!-- The above parameter, and the screwy use of it below, added 2016-12-09 --><!-- by Martin and Syd in an attempt to get phrase-level deprecation warnings --><xsl:variable name="rowName" select="if ($inline) then $segName else $rowName"/><xsl:variable name="cellName" select="if ($inline) then $hiName else $cellName"/><xsl:if test="@validUntil"><xsl:if test="$inline"></xsl:if><xsl:element namespace="{$outputNS}" name="{$rowName}"><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:attribute name="{$rendName}"><xsl:sequence select=" if (ancestor::tei:attDef) then 'odd_label' else 'wovenodd-col1'"/></xsl:attribute><xsl:element namespace="{$outputNS}" name="{$segName}"><xsl:attribute name="{$langAttributeName}"><xsl:value-of select="$documentationLanguage"/></xsl:attribute><xsl:attribute name="{$rendName}"><xsl:text>deprecated</xsl:text></xsl:attribute><xsl:variable name="m"><tei:seg><xsl:sequence select="tei:i18n('deprecated')"/></tei:seg></xsl:variable><xsl:for-each select="$m"><xsl:call-template name="makeExternalLink"><xsl:with-param name="ptr" select="false()"/><xsl:with-param name="dest"><xsl:text>https://tei-c.org/documentation/tcw27/</xsl:text></xsl:with-param></xsl:call-template></xsl:for-each></xsl:element></xsl:element><xsl:element namespace="{$outputNS}" name="{$cellName}"><xsl:if test="not($inline)"><xsl:attribute name="{$colspan}" select=" if (ancestor-or-self::tei:attDef or self::tei:elementSpec) then 1 else 2"/><xsl:attribute name="{$rendName}"><xsl:sequence select=" if (ancestor::tei:attDef) then 'odd_value' else 'wovenodd-col2'"/></xsl:attribute></xsl:if><xsl:element namespace="{$outputNS}" name="{$segName}"><xsl:attribute name="{$langAttributeName}"><xsl:value-of select="$documentationLanguage"/></xsl:attribute><xsl:attribute name="{$rendName}"><xsl:text>deprecated</xsl:text></xsl:attribute><xsl:value-of select="if (self::tei:defaultVal) then tei:i18n('defaultValValidUntil') else tei:i18n('validuntil')"/><xsl:text></xsl:text><xsl:value-of select="@validUntil"/></xsl:element></xsl:element></xsl:element></xsl:if></xsl:template>