Skip to content

Commit 5e753b6

Browse files
author
Bill Hunt
committed
Handle P tags in content. Fixes #26
1 parent 91f70f2 commit 5e753b6

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

lexis-nexis.xsl

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@
9292
<xsl:variable name="prefix_length" select="string-length(heading/desig)"/>
9393
<xsl:value-of select="substring(heading/desig, 0, $prefix_length)"/>
9494
</xsl:attribute>
95-
96-
<xsl:value-of select="bodyText" />
95+
96+
<xsl:apply-templates select="bodyText"/>
9797

9898
<xsl:if test="level">
9999
<xsl:apply-templates select="level"/>
@@ -103,16 +103,31 @@
103103
</xsl:when>
104104

105105
<xsl:otherwise>
106-
<xsl:value-of select="bodyText" />
107-
<xsl:if test="level">
108-
<xsl:apply-templates select="level"/>
109-
</xsl:if>
106+
<xsl:apply-templates />
110107
</xsl:otherwise>
111108

112109
</xsl:choose>
113110

114111
</xsl:template>
115112

113+
<!--Handle markup in our bodyText-->
114+
115+
<xsl:template match="bodyText">
116+
<xsl:apply-templates />
117+
</xsl:template>
118+
119+
<xsl:template match="p">
120+
<p><xsl:apply-templates /></p>
121+
</xsl:template>
122+
123+
<!--Delete locator and heading-->
124+
<xsl:template match="locator|heading" />
125+
126+
<!--Get the content of citation.-->
127+
<xsl:template match="citation">
128+
<xsl:value-of select="content/span" />
129+
</xsl:template>
130+
116131
<xsl:function name="fn:capitalize_word">
117132
<xsl:param name="word" as="xs:string" />
118133
<xsl:value-of select="concat( upper-case(substring( $word, 1, 1 )), lower-case(substring($word,2)) )" />

0 commit comments

Comments
 (0)