Skip to content

Commit

Permalink
Stage one for issue #296: new parameter added to tei:makeDescription,…
Browse files Browse the repository at this point in the history
… and all invocations changed to use it, but values maintain current behaviour.
  • Loading branch information
martindholmes committed Jan 21, 2018
1 parent 9f297ea commit c250ab5
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 32 deletions.
24 changes: 12 additions & 12 deletions common/common_tagdocs.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
<xsl:attribute name="{$rendName}">
<xsl:text>odd_value</xsl:text>
</xsl:attribute>
<xsl:sequence select="tei:makeDescription(., true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
<xsl:apply-templates select="tei:valList"/>
</xsl:element>
</xsl:element>
Expand Down Expand Up @@ -212,7 +212,7 @@
<xsl:attribute name="{$rendName}">
<xsl:text>odd_value</xsl:text>
</xsl:attribute>
<xsl:sequence select="tei:makeDescription(., false())"/>
<xsl:sequence select="tei:makeDescription(., false(), true())"/>
<xsl:apply-templates select="tei:valList"/>
</xsl:element>
</xsl:element>
Expand Down Expand Up @@ -240,7 +240,7 @@
<xsl:attribute name="{$rendName}">
<xsl:text>odd_value</xsl:text>
</xsl:attribute>
<xsl:sequence select="tei:makeDescription(., true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
<xsl:element namespace="{$outputNS}" name="{$tableName}">
<xsl:attribute name="{$rendName}">
<xsl:text>attDef</xsl:text>
Expand Down Expand Up @@ -484,7 +484,7 @@
</xsl:with-param>
</xsl:call-template>
<xsl:text>&#160;</xsl:text>
<xsl:sequence select="tei:makeDescription(., true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:element>
</xsl:element>
<xsl:if test="@generate">
Expand Down Expand Up @@ -682,7 +682,7 @@
</xsl:choose>
<xsl:text>&gt; </xsl:text>
</xsl:element>
<xsl:sequence select="tei:makeDescription(., true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:element>
</xsl:element>
<xsl:call-template name="validUntil"/>
Expand Down Expand Up @@ -982,7 +982,7 @@
<xsl:attribute name="{$rendName}">
<xsl:text>wovenodd-col2</xsl:text>
</xsl:attribute>
<xsl:sequence select="tei:makeDescription(., true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
<xsl:for-each select="tei:constraint">
<xsl:element namespace="{$outputNS}" name="{$divName}">
<xsl:attribute name="xml:space">preserve</xsl:attribute>
Expand Down Expand Up @@ -1059,7 +1059,7 @@
</xsl:element>
</xsl:element>
<xsl:call-template name="showSpace"/>
<xsl:sequence select="tei:makeDescription(., false())"/>
<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)">
Expand Down Expand Up @@ -1200,7 +1200,7 @@
</xsl:element>
</xsl:element>
<xsl:element namespace="{$outputNS}" name="{$cellName}">
<xsl:sequence select="tei:makeDescription(., true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
<xsl:if test="$verboseSpecDesc = 'true' and tei:valList">
<xsl:element namespace="{$outputNS}" name="{$tableName}">
<xsl:attribute name="{$rendName}">
Expand Down Expand Up @@ -1344,7 +1344,7 @@
<xsl:value-of select="$name"/>
</xsl:element>
<xsl:text>&#160;</xsl:text>
<xsl:sequence select="tei:makeDescription(., true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:element>
</xsl:element>
<xsl:call-template name="validUntil"/>
Expand Down Expand Up @@ -1414,7 +1414,7 @@
<xsl:value-of select="$name"/>
</xsl:element>
<xsl:text>&#160;</xsl:text>
<xsl:sequence select="tei:makeDescription(., true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:element>
</xsl:element>
<xsl:call-template name="validUntil"/>
Expand Down Expand Up @@ -1584,7 +1584,7 @@
<xsl:value-of select="$spaceCharacter"/>
<xsl:value-of select="@ident"/>
<xsl:text>: </xsl:text>
<xsl:sequence select="tei:makeDescription(., true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:element>
<xsl:element namespace="{$outputNS}" name="{$ddName}">
<xsl:element namespace="{$outputNS}" name="{$ulName}">
Expand Down Expand Up @@ -1921,7 +1921,7 @@
separator=", "/>
<xsl:text>) </xsl:text>
</xsl:if>
<xsl:sequence select="tei:makeDescription(., true() )"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
<xsl:if test="@ident = ../../tei:defaultVal">
<xsl:element namespace="{$outputNS}" name="{$hiName}">
<xsl:attribute name="{$rendName}">
Expand Down
6 changes: 5 additions & 1 deletion common/functions.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,10 @@ of this software, even if advised of the possibility of such damage.
<xsl:function name="tei:makeDescription" as="node()*">
<xsl:param name="context"/>
<xsl:param name="showListRef"/>
<!-- MDH 2018-01-21: added this param so we can stop building
ugly and superfluous lists in Guidelines ref pages. See
issue #296. -->
<xsl:param name="makeMiniList" as="xs:boolean"/>
<xsl:variable name="D">
<xsl:for-each select="$context">
<xsl:variable name="langs"
Expand Down Expand Up @@ -1166,7 +1170,7 @@ of this software, even if advised of the possibility of such damage.
of 'eq' in the "if" comparison in the definition of $msg.
—Syd, 2018-01-19
-->
<xsl:when test="tei:valList[ @type = ('open','semi')]">
<xsl:when test="tei:valList[ @type = ('open','semi')] and $makeMiniList = true()">
<xsl:variable name="msg"
select="tei:i18n( concat( if (tei:valList/@type = 'open') then 'Sample' else 'Suggested', '&#x20;values include' ) )"/>
<xsl:value-of select="concat('&#x0A;', $msg, ':&#x20;')"/>
Expand Down
10 changes: 5 additions & 5 deletions html/html_oddprocessing.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:sort select="lower-case(@ident)"/>
<tr>
<td id="{@ident}"><a href="http://www.tei-c.org/release/doc/tei-p5-doc/{$documentationLanguage}/html/ref-{@ident}.html"><xsl:value-of select="@ident"/></a>:
<xsl:sequence select="tei:makeDescription(.,true())"/></td>
<xsl:sequence select="tei:makeDescription(., true(), true())"/></td>
</tr>
</xsl:for-each>
</table>
Expand Down Expand Up @@ -780,7 +780,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:text>[</xsl:text>
<xsl:value-of select="@ident"/>
<xsl:text>] </xsl:text>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:for-each>
</h3>
<xsl:for-each select="key('MACRO-MODULE',@module)">
Expand Down Expand Up @@ -831,7 +831,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:text>[</xsl:text>
<xsl:value-of select="@ident"/>
<xsl:text>] </xsl:text>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:for-each>
</h3>
<xsl:for-each select="key('ELEMENT-MODULE',@module)">
Expand Down Expand Up @@ -912,7 +912,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:text>[</xsl:text>
<xsl:value-of select="@ident"/>
<xsl:text>] </xsl:text>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:for-each>
</h3>
<xsl:for-each select="key('MODEL-CLASS-MODULE',@module)">
Expand Down Expand Up @@ -965,7 +965,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:text>[</xsl:text>
<xsl:value-of select="@ident"/>
<xsl:text>] </xsl:text>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:for-each>
</h3>
<xsl:for-each
Expand Down
8 changes: 4 additions & 4 deletions odds/odd2dtd.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:text>. </xsl:text>
<xsl:call-template name="copyright"/>
<xsl:call-template name="makeTEIVersion"/>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:with-param>
</xsl:call-template>
<xsl:choose>
Expand Down Expand Up @@ -184,7 +184,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:text>.&#10;</xsl:text>
<xsl:call-template name="copyright"/>
<xsl:call-template name="makeTEIVersion"/>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="datatypeMacros"/>
Expand Down Expand Up @@ -348,7 +348,7 @@ of this software, even if advised of the possibility of such damage.
separator=""/>
<xsl:call-template name="copyright"/>
<xsl:call-template name="makeTEIVersion"/>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:with-param>
</xsl:call-template>
<xsl:choose>
Expand Down Expand Up @@ -1139,7 +1139,7 @@ of this software, even if advised of the possibility of such damage.
</xsl:choose>
</xsl:variable>
<xsl:text>&#10;&lt;!--doc:</xsl:text>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
<xsl:text> --&gt;&#10;</xsl:text>
<xsl:text>&lt;!ELEMENT </xsl:text>
<xsl:value-of select="$ename"/>
Expand Down
2 changes: 1 addition & 1 deletion odds/odd2json.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ of this software, even if advised of the possibility of such damage.

<xsl:template name="desc">
<xsl:variable name="d">
<xsl:sequence select="tei:makeDescription(.,false())"/>
<xsl:sequence select="tei:makeDescription(., false(), true())"/>
</xsl:variable>
<xsl:text>"desc":"</xsl:text>
<xsl:value-of select="replace(normalize-space($d),$dq,$escdq)"/>
Expand Down
2 changes: 1 addition & 1 deletion odds/odd2lite.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:value-of select="@ident"/>
</ref>
</hi>:
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</cell>
</row>
</xsl:for-each>
Expand Down
4 changes: 2 additions & 2 deletions odds/odd2relax.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ of this software, even if advised of the possibility of such damage.
select="(/tei:TEI/tei:text/tei:front/tei:titlePage/tei:docDate,'.')"
separator=""/>
<xsl:call-template name="makeTEIVersion"/>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
<xsl:text>&#10;</xsl:text>
</xsl:comment>
<xsl:comment>
Expand Down Expand Up @@ -244,7 +244,7 @@ of this software, even if advised of the possibility of such damage.
<xsl:sequence select="tei:whatsTheDate()"/>
<xsl:call-template name="makeTEIVersion"/>
<xsl:call-template name="copyright"/>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</xsl:comment>
<xsl:call-template name="moduleSpec-body"/>
</grammar>
Expand Down
8 changes: 4 additions & 4 deletions odds/teiodds.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ select="$makeDecls"/></xsl:message>
</xsl:if>
<xsl:if test="not($oddmode = 'tei')">
<a:documentation>
<xsl:sequence select="tei:makeDescription(., true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</a:documentation>
</xsl:if>
<xsl:choose>
Expand Down Expand Up @@ -1039,7 +1039,7 @@ select="$makeDecls"/></xsl:message>
</value>
<xsl:if test="not($oddmode='tei')">
<a:documentation>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</a:documentation>
</xsl:if>
</xsl:for-each>
Expand Down Expand Up @@ -1421,7 +1421,7 @@ select="$makeDecls"/></xsl:message>
</value>
<xsl:if test="not($oddmode='tei')">
<a:documentation>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</a:documentation>
</xsl:if>
</xsl:for-each>
Expand Down Expand Up @@ -1473,7 +1473,7 @@ select="$makeDecls"/></xsl:message>
</xsl:if>
<xsl:if test="not($oddmode='tei')">
<a:documentation>
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
</a:documentation>
</xsl:if>
<xsl:variable name="minmax" select="tei:minOmaxO( tei:datatype/@minOccurs, tei:datatype/@maxOccurs )"/>
Expand Down
2 changes: 1 addition & 1 deletion rdf/make-acdc.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<XSL:for-each select="key('MEMBERS','model.placeNamePart')">
<E55_Type rdf:about="http://www.tei-c.org/type/place/{@ident}" xmlns="http://purl.org/NET/crm-owl#" >
<label xmlns="http://www.w3.org/2000/01/rdf-schema#" >
<XSL:sequence select="tei:makeDescription(.,true())"/>
<XSL:sequence select="tei:makeDescription(., true(), true())"/>
</label>
<P127_has_broader_term rdf:resource="http://www.tei-c.org/type/place"/>
</E55_Type>
Expand Down
2 changes: 1 addition & 1 deletion tools/odd-to-tree.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
<label>@<xsl:value-of select="@ident"/></label>
<eLeaf>
<label rend="desc">
<xsl:sequence select="tei:makeDescription(.,true())"/>
<xsl:sequence select="tei:makeDescription(., true(), true())"/>
<xsl:text> (</xsl:text>
<xsl:value-of select="if (@usage='opt' or not(@usage)) then
'Optional' else 'Mandatory'"/>
Expand Down

0 comments on commit c250ab5

Please sign in to comment.