I am converting snippets of XHTML to be inserted into Open Document
files. For example,
<ul>
<li>item1
<ul>
<li>subitem1</li>
<li>subitem2</li>
<li>subitem3</li>
</ul></li>
<li>item2</li>
<li>item3</li>
<li>multi<br>line</li>
</ul>
I currently got a XSL stylesheet to change this to Open Document XML,
but have hit a wall with wrapping text in text tags. The correct
conversion for the above should be:
<text:list>
<text:list-item><text:p>item1</text:p>
<text:list>
<text:list-item><text:p>subitem1</text:p></text:list-item>
<text:list-item><text:p>subitem2</text:p></text:list-item>
<text:list-item><text:p>subitem3</text:p></text:list-item>
</text:list>
</text:list-item>
<text:list-item><text:p>item2</text:p>
<text:list-item><text:p>item3</text:p>
<text:list-item>
<text:p>multi</text:p><text:p>line</text:p>
</text:list-item>
</text:list>
What rule can I use to add the <text:p> tags? I've tried:
<xsl:template match="li/text()">
<text:p><xsl:value-of select="text()"></text:p>
</xsl:template>
But end up with the closing </text:p> in the wrong palce. Eg.
<text:p>item1<!--sub list here--></text:p>
Any ideas?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]