Skip to content

Commit

Permalink
Handle P tags in content. Fixes #26
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Hunt committed Mar 9, 2017
1 parent 91f70f2 commit 5e753b6
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions lexis-nexis.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<xsl:variable name="prefix_length" select="string-length(heading/desig)"/>
<xsl:value-of select="substring(heading/desig, 0, $prefix_length)"/>
</xsl:attribute>
<xsl:value-of select="bodyText" />

<xsl:apply-templates select="bodyText"/>

<xsl:if test="level">
<xsl:apply-templates select="level"/>
Expand All @@ -103,16 +103,31 @@
</xsl:when>

<xsl:otherwise>
<xsl:value-of select="bodyText" />
<xsl:if test="level">
<xsl:apply-templates select="level"/>
</xsl:if>
<xsl:apply-templates />
</xsl:otherwise>

</xsl:choose>

</xsl:template>

<!--Handle markup in our bodyText-->

<xsl:template match="bodyText">
<xsl:apply-templates />
</xsl:template>

<xsl:template match="p">
<p><xsl:apply-templates /></p>
</xsl:template>

<!--Delete locator and heading-->
<xsl:template match="locator|heading" />

<!--Get the content of citation.-->
<xsl:template match="citation">
<xsl:value-of select="content/span" />
</xsl:template>

<xsl:function name="fn:capitalize_word">
<xsl:param name="word" as="xs:string" />
<xsl:value-of select="concat( upper-case(substring( $word, 1, 1 )), lower-case(substring($word,2)) )" />
Expand Down

0 comments on commit 5e753b6

Please sign in to comment.