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: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 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 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:call-template name="attClassDetails"/></xsl:for-each></xsl:variable><xsl:choose><xsl:when test="$minimal='true' and not($clatts='')"><xsl:text> [+ </xsl:text><xsl:copy-of select="$clatts"/><xsl:text>]</xsl:text></xsl:when><xsl:when test="not($clatts='')"><xsl:if test="ancestor::tei:schemaSpec and key('CLASSES','att.global')"><xsl:element namespace="{$outputNS}" name="{$segName}"><xsl:attribute name="{$langAttributeName}"><xsl:value-of select="$documentationLanguage"/></xsl:attribute><xsl:variable name="word"><xsl:choose><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:choose></xsl:variable><xsl:sequence select="tei:i18n($word)"/><xsl:value-of select="$spaceCharacter"/></xsl:element></xsl:if><xsl:copy-of select="$clatts"/></xsl:when><xsl:when test="ancestor::tei:schemaSpec and not(key('CLASSES','att.global'))"></xsl:when><xsl:otherwise><xsl:variable name="word"><xsl:choose><xsl:when test="not($autoGlobal='true')">Attributes</xsl:when><xsl:when test=".//tei:attDef">In addition to global attributes</xsl:when><xsl:otherwise>Global attributes only</xsl:otherwise></xsl:choose></xsl:variable><xsl:sequence select="tei:i18n($word)"/></xsl:otherwise></xsl:choose></xsl:template>