cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: ESQL Query
Date Mon, 30 Sep 2002 17:30:09 GMT
You can do this with a standard xsl stylesheet and xsl:call-template. Something like this

<xsl:template match="member">

<xsl:template match="profilHairColor">
<TR><TD>Hair Color</TD><TD><!-- xsl:call-template goes here with
. as arg --></TD></TR>

You could also put the values in an external xml file and use the document() function.

<xsl:template match="profilHairColor">
<xsl:variable name="id" select="."/>
<TD><TD>Hair Color</TD><TD><xsl:value-of select="document('lookup.xml')/Lookup/HairColor[@id=$id]"/></TD></TR>

where lookup.xml is something like this

 <HairColor id="4">Brown</HairColor>
 <HairColor id="5">etc...

I'm sure there are plenty of other ways to do this as wel, but both of these methods will

John Lambert <> wrote:

>After an ESQL query, I obtain the resulats in a file XML, with amongst other things syntax
>< member > 
>< profilHairColor>4</profilHairColor > 
>< profilEyesColor>2</profilEyesColor > 
>< profilOccupation>8</profilOccupation > 
></member >
>I wish to make correspond in the final result (HTML) the values of the various fields
with their interpretation (for profilHairColor, 4 = brown hair)
>What is the best solution to do this ? 
>- do I Have to use a logisheet especially for this operation ?
>- do I have to create another xml file with all values interpretation, and then to merge
them ?
>Thanks for your help.
>Do you Yahoo!?
>New DSL Internet Access from SBC & Yahoo!

The NEW Netscape 7.0 browser is now available. Upgrade now!

Get your own FREE, personal Netscape Mail account today at

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message