Skip to content

Commit

Permalink
Fix crack at fixing #365
Browse files Browse the repository at this point in the history
* Adds some handling for content/valList in generateChildren
* Removes (what to me seems to be) superfluous and incorrect generation of valList items following schema declarations
  • Loading branch information
joeytakeda committed May 7, 2024
1 parent 5a48e15 commit a36ee00
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions common/common_tagdocs.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -926,11 +926,15 @@
</PureODD>
</xsl:with-param>
</xsl:call-template>
<xsl:for-each select="tei:valList[@type='closed']">
<!-- It's unclear to me (JT) why this is here; it produces
a list of the tei:valList children of the elementSpec/content
as part of the serialized content
- 2024-05-06 -->
<!-- <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:for-each>-->
</xsl:element>
</xsl:element>
<xsl:element namespace="{$outputNS}" name="{$rowName}">
Expand Down Expand Up @@ -988,6 +992,10 @@
<xsl:with-param name="grammar"/>
<xsl:with-param name="content" select="$content"/>
</xsl:call-template>
<!-- It's unclear to me (JT) why this is here; it produces
a list of the tei:valList children of the elementSpec/content
as part of the serialized content
- 2024-05-06 -->
<xsl:for-each select="tei:valList[@type = 'closed']">
<xsl:sequence select="tei:i18n('Legal values are')"/>
<xsl:text>:</xsl:text>
Expand Down Expand Up @@ -2990,6 +2998,31 @@
<xsl:sequence select="tei:i18n('Empty element')"/>
</xsl:element>
</xsl:when>
<xsl:when test="tei:content/tei:valList">
<xsl:for-each select="tei:content/tei:valList">
<xsl:sequence select="tei:i18n('Character data only')"/>
<xsl:text>. </xsl:text>
<xsl:choose>
<xsl:when test="@type = 'semi'">
<xsl:sequence select="tei:i18n('Suggested values include')"/>
<xsl:text>:</xsl:text>
</xsl:when>
<xsl:when test="@type = 'open'">
<xsl:sequence select="tei:i18n('Sample values include')"/>
<xsl:text>:</xsl:text>
</xsl:when>
<xsl:when test="@type = 'closed'">
<xsl:sequence select="tei:i18n('Legal values are')"/>
<xsl:text>:</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:sequence select="tei:i18n('Sample values include')"/>
<xsl:text>:</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="valListItems"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="Children">
<xsl:for-each select="tei:content">
Expand Down

0 comments on commit a36ee00

Please sign in to comment.