Skip to content

Shadow Gap rendering #89

@scottkleinman

Description

@scottkleinman

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions