scottkleinman / aeme

AEME Development Repo
1 stars 2 forks source link

Shadow Gap rendering #89

Open scottkleinman opened 8 years ago

scottkleinman commented 8 years ago

This is a modified version of our current xslt for sg:

  <!-- ELEMENT: sg -->
  <xsl:template exclude-result-prefixes="#all" match="tei:sg">
    <xsl:choose>
      <xsl:when test="@type='ln'">
        <span class="sg-ln">&#xA0;</span>
      </xsl:when>
      <xsl:when test="text()=' '">
        <span class="sg-spaced">&#xA0;</span>
      </xsl:when>
      <xsl:otherwise>
        <span class="sg-collapsed">
          <xsl:apply-templates/>
        </span>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

Currently, the test for a space in the sg element fails, so both <sg/> and <sg> </sg> get rendered as html <span class="sg-collapsed"></span>.

The problem seems to be at the top of the stylesheet: <xsl:strip-space elements="*"/>. Both <xsl:preserve-space elements="*"/> and <xsl:preserve-space elements="sg"/> get the html to render correctly. But I'm not sure what, if any, impact this will have on the rest of the rendering.

Any thoughts, Sharon?