For a custom application I need to transform xhtml to (custom) xml. After some experimentation I decided to give php5's XSLT functionality a try, but so far I'm unable to transform nested p tags to their xml equivalent.
Basicly we have code like this:
<p>Some text</p>
<ol>
<li><p>Some more text</p></li>
..
</ol>
This needs to be transformed to:
<par>Some text</par>
<list>
<li><par>Some more text</par></li>
..
</list>
The real problem is: I need to include inline tags, so xsl:value-of is no option and instead I use xsl:copy-of. So far I have templates for ol|ul and p and the result is this:
<par>Some text</par>
<list>
<li><p>Some more text</p></li>
..
</list>
Anybody some tips how to achieve what I really want just by using a more complex xslt?