P
petr.simek
Hello,
I have this XML:
<document>
<header>One</header>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
<header>Two</header>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
<header>Three</header>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
</document>
and need it to get to this XML:
<body>
<section>
<title>Jedna</title>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
</section>
<section>
<title>Two</title>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
</section>
<section>
<title>Three</title>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
</section>
</body>
I really do not know how to handle these sections correctly. How to
force the engine to open the section before each header and close it
after each last para.
Is it possible with XSLT?
Thank you for any advice.
Petr Simek
I have this XML:
<document>
<header>One</header>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
<header>Two</header>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
<header>Three</header>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
<para>Haleluja</para>
</document>
and need it to get to this XML:
<body>
<section>
<title>Jedna</title>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
</section>
<section>
<title>Two</title>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
</section>
<section>
<title>Three</title>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
<p>Haleluja</p>
</section>
</body>
I really do not know how to handle these sections correctly. How to
force the engine to open the section before each header and close it
after each last para.
Is it possible with XSLT?
Thank you for any advice.
Petr Simek