Hi,
I have a problem with processing a list within list:
Source snippet:
Code:
<Paragraph process="False">
<ParagraphContent>Blah Blah Blah</ParagraphContent>
</Paragraph>
<Paragraph process="True">
<ParagraphContent>
<List>
<ListItem>A List entry</ListItem>
<ListItem>
<List>
<ListItem>Another List entry</ListItem>
</List>
<List>
</ParagraphContent>
</Paragraph>
The transform :
Code:
<xsl:template match="Paragraph[@Process='True']">
<div><xsl:apply-templates/><div>
</xsl:template>
<xsl:template match="List">
<list><xsl:apply-templates/></list>
</xsl:template>
<xsl:template match="ListItem>
<li><xsl:value-of select="."/></li>
</template>
What I get as an output:
Code:
<div>
<list>
<li>A list entryAnother List entry</li>
</list>
</div>
What I would like to see as an output:
Code:
<div>
<list>
<li>A list entry</li>
<li>
<list>
<li>Another List entry</li>
</list>
</li>
</list>
I can see where I am going wrong in that xsl:value-of probably isnt the way forward. Has anyone got any ideas?
Many thanks
