newbie xpath - mapping problem

I

iliad

hi!
i have the given xml and would like to transform it into html. how can
i map the par-elements to the correct pardef-elements?
thanks a lot!!

---------- XML Input ----------
<richtext>
<pardef id='1' ...some additional attributes... />
<par def='1'>
textbefore
</par>
<pardef id='2' list='bullet' ...some additional attributes... />
<par def='2'>
point1
</par>
<par>
point2
</par>
<par>
point3
</par>
<par def='1'>
textmiddle
</par>
<par def='2'>
point4
</par>
<par>
point5
</par>
<par>
point6
</par>
<par def='1'>
textafter
<par/>
</richtext>

---------- HTML output ----------
<P>textbefore</P>
<P>
<UL>
<LI>point1</LI>
<LI>point2</LI>
<LI>point3</LI>
</UL>
</P>
<P>textmiddle</P>
<P>
<UL>
<LI>point4</LI>
<LI>point5</LI>
<LI>point6</LI>
</UL>
</P>
<P>textafter</P>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top