xsl-list
[Top] [All Lists]

[xsl] Manage XHTML-Output with XSL-T

2006-11-27 01:54:07
Hi Folks,

I have a little problem in transforming a XML-document to a XHTML-document 
using XSL-T.

I have the near following structure in the XML-document:

<doc><page nr="1">
<standard>Some text</standard>
<standard><p>some other text</p><standard>
<in_01><p>a list element</p></in_01>
<in_01><p>a second list element</p></in_01>
<in_10><p>a list element without dot</p></in_10>
<in_01><p>a third list element</p></in_01>
<in_02><p>list element as child of the third element</p></in_02>
<in_20><p>list element as child of the third element without dot</p></in_20>
<standard><p>text</p></standard>
<standard-bold><p>bold text</p></standard-bold>
</page>
<page nr="2">
<!-- here can be the similiar structure as in page 1 -->
</page>
</doc>

Now I want to transform this structure to the following XHTML-Structure:

<html>
<head>
</head>
<body>
<p>Some Text</p>
<p>Some other text</p>
<ul>
<li>a list element</li>
<li>a second list element<br />
a list element without dot</li>
<li>a third list element
<ul>
<li>list element as child of the third element<br />
list element as child of the third element without dot</li>
</ul>
</li>
</ul>
<p>text</p>
<p><strong>bold text</strong></p>
<!-- now the content of page 2 follows -->
</body>
</html>

I have the following problems in my transformation:
- I cannot open a tag in an xsl:choose-xsl:when cause without closing it. So I 
have an output of <ul><li>...</li></ul><ul><li>...</li></ul> instead of 
<ul><li>...</li><li>...</ul>
- I cannot analyse the previous node (maybe I still didn't found the right 
function), so that I can decide if I have to open the <ul>-Tag or I have to 
close it.
- I cannot make an XHTML-Output like 
<ul><li>...<ul><li>...</li></ul></li></ul>. Here I have the similiar problem as 
in the first topic.

There is no way to put some additional content into the XML-File, so I have a 
structure like <add><in_01>...</in_01><in_01>...</in_01></add>.

I hope you can help me with my problem or give me tipps to analyse and 
transform the XML-File to an XHTML-File.

Thanks for your fast help.

Best regards.

Michael

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>