You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Andres Voldman <av...@profesi.com.ar> on 2001/01/11 13:55:31 UTC
XSLT or XSP???
Hi everybody:
this is the scenario:
I've one xml "personaldata.xml" which contains addresses of several people.
I render it using XSL, and it works perfectly.
Now, I want to build a new Frame with a Menu to the diferent sections of the
personaldata.xml. The problem is that the sections are optional.
My first aproach was to build a new xml called "menu.xml" and a "menu.xsl".
It works Ok, I used <xsl:if test="document("personaldata.xml")//telephones[ @id = $param])"> in
the style sheet to get information from the "personaldata.xml".
The problem with this solutions it that is not elegant at all ( both, the logic and
the presentation are mixed in the ".xsl", while the ".xml" is almost empty)
I also thought about this other posible solutions:
1. xinclude personaldata.xml in a file called "personaldata-menu.xml",
and use 2 xsl . The first one to convert the "personaldata-menu.xml", in
a menu , and the second one to render the menu in HTML.
2. Use XSP in the personaldata.xml, and receive the style sheet as parameter
( personaldata.xsl or personaldata-menu.xsl)
3. Use XSP in the "personaldata-menu.xml" and parse for the existence of
the sections in the "personaldata.xml". (Nice but too complex for such a
small problems )
So, guys: what do you think????
Thanks in advance
Andres
PD: I tookme one hour to translate this email to english, so I'll be very happy
if I receice at least one opinion.