Hi all,
I have the following problem. I have an XML file like below. I want to output this as valid xhtml (with xslt) and therefore all text-elements without an html-tag should be surrounded by a paragraph-tag. Although I'm pretty sure that it's relatively easy, but I don't know how to do it.
XML:
Output should be like this:
Gert
I have the following problem. I have an XML file like below. I want to output this as valid xhtml (with xslt) and therefore all text-elements without an html-tag should be surrounded by a paragraph-tag. Although I'm pretty sure that it's relatively easy, but I don't know how to do it.
XML:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<content>
And here a text without surrounding paragraph-element
<p>Deze alinea heeft volgordenummer 20, maar daar zie je <a href="tcm:17-58812" xmlns:xlink="[URL unfurl="true"]http://www.w3.org/1999/xlink"[/URL] xlink:title="Nu" tcmuri="tcm:17-58812">straks</a> niets meer van. Wel zou deze dan ook op de tweede plek in het component moet staan, <strong>terwijl</strong> deze als eerste is ingevoerd. Hierbij trouwens een <A href="tcm:17-58769" xmlns:xlink="[URL unfurl="true"]http://www.w3.org/1999/xlink"[/URL] xlink:title="Test algemeen" tcmuri="tcm:17-58769">link</A> naar een andere component.</p>
<p>Bijgevoegd de <a href="tcm:17-58804" xmlns:xlink="[URL unfurl="true"]http://www.w3.org/1999/xlink"[/URL] xlink:title="blabla SP3 ReleaseNotes" tcmuri="tcm:17-58804">Blablabla SP3 ReleaseNotes</a></p>
And another text without paragraph-elemen
<ul>
<li>item 1</li>
<li>item 2</li>
</ul>
</content>
Output should be like this:
Code:
<p>And here a text without surrounding paragraph-element</p>
<p>Deze alinea heeft volgordenummer 20, maar daar zie je <a href="tcm:17-58812" xmlns:xlink="[URL unfurl="true"]http://www.w3.org/1999/xlink"[/URL] xlink:title="Nu" tcmuri="tcm:17-58812">straks</a> niets meer van. Wel zou deze dan ook op de tweede plek in het component moet staan, <strong>terwijl</strong> deze als eerste is ingevoerd. Hierbij trouwens een <A href="tcm:17-58769" xmlns:xlink="[URL unfurl="true"]http://www.w3.org/1999/xlink"[/URL] xlink:title="Test algemeen" tcmuri="tcm:17-58769">link</A> naar een andere component.</p>
<p>Bijgevoegd de <a href="tcm:17-58804" xmlns:xlink="[URL unfurl="true"]http://www.w3.org/1999/xlink"[/URL] xlink:title="blabla SP3 ReleaseNotes" tcmuri="tcm:17-58804">Blablabla SP3 ReleaseNotes</a></p>
<p>And another text without paragraph-elemen</p>
<ul>
<li>item 1</li>
<li>item 2</li>
</ul>
Gert