RE: [xsl] Problems selecting nodes

Subject: RE: [xsl] Problems selecting nodes
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Wed, 12 May 2004 08:29:03 -0600
Wow, im definitely seeing a theme this morning.  It's either all or
nothing as far as providing sample code...

Veronica, my best advice to you is to use XSLT the way it was designed
and that is for the XML data to drive its own processing. It seems you
have married so much of this template with this specific data set that
using the same XSLT against any other set of data will require an entire
rewrite of your stylesheet.  If you find yourself having to do a ton of
comparing to determine the proper data to output then using a
combination of XML sources to determine your final output is going to
save you a ton of time and frustration.  Your best bet is to take the
next 3-4 hours and spend some quality time at Jeni Tennisons XSLT site.

http://www.jenitennison.com/xslt/index.html

I would pay specific attention to her grouping tutorials as it seems
these will be very important to helping you get the data out of the XSLT
and into the XML where it belongs and then grouping this data as
necessary using one of the several techniques Jeni teaches here.  I can
tell you that almost everyone on this list who now understands these
techniques owes this knowledge to Jeni (I guess Steve Muench should get
a lot of credit for developing the technique(s) but Jeni definitely has
taken the teaching and evangelizing of proper usage to a whole new level
:)

Once you have gone through this site completely I would probably start
over and go through one more time simply because there are some
difficult concepts presented that will sink much deeper and make a lot
more sense with a second pass through the tutorials.

I wish you the best of luck with your challenge and encourage you to
keep at it, using this list as a resource to help with the problems that
you just cant seem to figure out using resources such as Jenis site,
Dave Pawson's XSLT FAQ (http://www.dpawson.co.uk/xsl/index.html),
Michael Kay's XSLT reference
(http://www.amazon.com/exec/obidos/tg/detail/-/0764543814/qid=1084372061
/sr=8-1/ref=pd_ka_1/002-6621421-6316854?v=glance&s=books&n=507846) or
any other of the excellent books and web sites developed by many of the
members of this list.

Best regards,

<M:D/>

> -----Original Message-----
> From: Veronica Sanchez [mailto:vsguiseris@xxxxxxxxxxx]
> Sent: Wednesday, May 12, 2004 7:40 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Problems selecting nodes
> 
> Hi,
> 
> I have a xml as this one:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <DATOS>
>   <FILTRO>
>     <VER nombre="codVers14" lit="Model" valor="0"/>
>     <AS nombre="aSalon" lit="Annie Modhle" valor="0"/>
>     <COL nombre="codColor" lit="Couleur" valor="0"/>
>     <TAP nombre="codTapizado" lit="Garnissage" valor="0"/>
>     <OPT nombre="codOpciones" lit="OPCIONES" valor="0"/>
>   </FILTRO>
>   <COLORES>
>     <COL cod="C1" lit="Amarillo Heliodoro" ord="1"/>
>     <COL cod="3H" lit="Azul Grand Pavois" ord="1"/>
>     <COL cod="3Y" lit="Azul Lucia" ord="1"/>
>     <COL cod="5K" lit="Azul Mauritius" ord="1"/>
>     <COL cod="5U" lit="Azul Oriental" ord="1"/>
>     <COL cod="J4" lit="Beig" ord="1"/>
>     <COL cod="WP" lit="Blanco Banquise" ord="1"/>
>     <COL cod="4A" lit="Grilyne" ord="1"/>
>     <COL cod="ZR" lit="Gris Aluminio" ord="1"/>
>     <COL cod="YT" lit="Gris Orageux" ord="1"/>
>     <COL cod="W7" lit="Naranja" ord="1"/>
>     <COL cod="XY" lit="Negro Onyx" ord="1"/>
>     <COL cod="X9" lit="Rojo Ardent" ord="1"/>
>     <COL cod="KQ" lit="Rojo Lucifer" ord="1"/>
>     <COL cod="JH" lit="Rojo Postes " ord="1"/>
>     <COL cod="7Z" lit="Verde Hurlevent" ord="1"/>
>     <COL cod="8Y" lit="Verde Lenz" ord="1"/>
>   </COLORES>
>   <VERSIONES>
>     <V14 cod="1CA8A5J6P5..A0" lit="11i Sx Plus" ord="9800009">
>       <V16 cod="1CA8A5J6P501A031" as="31">
>         <VEH codcol="3H" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="XY" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="ZR" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="ZR" codtap="Z2FT" tap="Z2FT" opt="58H8"/>
>         <VEH codcol="YT" codtap="Z2FT" tap="Z2FT" opt="58H8"/>
>         <VEH codcol="XY" codtap="Z2FT" tap="Z2FT" opt="58H8"/>
>         <VEH codcol="3Y" codtap="Z2FT" tap="Z2FT" opt="58H8"/>
>         <VEH codcol="8Y" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="KQ" codtap="Z2FT" tap="Z2FT" opt="58H8"/>
>         <VEH codcol="KQ" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="3Y" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>       </V16>
>     </V14>
>     <V14 cod="1CA8A5J7P5..A0" lit="14 Hdi 70cv Sx Plus" ord="9800080">
>       <V16 cod="1CA8A5J7P501A031" as="31">
>         <VEH codcol="3H" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="5U" codtap="Z2FT" tap="Z2FT" opt="58J0"/>
>         <VEH codcol="7Z" codtap="Z2FT" tap="Z2FT" opt="58J0"/>
>         <VEH codcol="8Y" codtap="Z2FT" tap="Z2FT" opt="58J0"/>
>         <VEH codcol="8Y" codtap="Z2FT" tap="Z2FT" opt="95HC"/>
>         <VEH codcol="J4" codtap="Z2FT" tap="Z2FT" opt="58H9"/>
>         <VEH codcol="J4" codtap="Z2FT" tap="Z2FT" opt="58J0"/>
>         <VEH codcol="J4" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="KQ" codtap="Z2FT" tap="Z2FT" opt="95HC"/>
>         <VEH codcol="WP" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="X9" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="XY" codtap="Z2FT" tap="Z2FT" opt="58H9"/>
>         <VEH codcol="XY" codtap="Z2FT" tap="Z2FT" opt="95HC"/>
>         <VEH codcol="XY" codtap="Z2FZ" tap="Z2FZ" opt="58H9"/>
>         <VEH codcol="XY" codtap="Z2FZ" tap="Z2FZ" opt="95HC"/>
>         <VEH codcol="YT" codtap="Z2FT" tap="Z2FT" opt="58H9"/>
>         <VEH codcol="ZR" codtap="Z2FT" tap="Z2FT" opt="58J0"/>
>         <VEH codcol="ZR" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="ZR" codtap="Z2FZ" tap="Z2FZ" opt="WL45"/>
>       </V16>
>       <V16 cod="1CA8A5J7P501A030" as="30">
>         <VEH codcol="3H" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="5U" codtap="Z2FT" tap="Z2FT" opt="58J0"/>
>         <VEH codcol="7Z" codtap="Z2FT" tap="Z2FT" opt="58J0"/>
>         <VEH codcol="8Y" codtap="Z2FT" tap="Z2FT" opt="58J0"/>
>         <VEH codcol="8Y" codtap="Z2FT" tap="Z2FT" opt="95HC"/>
>         <VEH codcol="J4" codtap="Z2FZ" tap="Z2FZ" opt="58H9"/>
>         <VEH codcol="J4" codtap="Z2FT" tap="Z2FT" opt="58J0"/>
>         <VEH codcol="J4" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="KQ" codtap="Z2FT" tap="Z2FT" opt="95HC"/>
>         <VEH codcol="WP" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="X9" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="XY" codtap="Z2FT" tap="Z2FT" opt="58H9"/>
>         <VEH codcol="XY" codtap="Z2FT" tap="Z2FT" opt="95HC"/>
>         <VEH codcol="XY" codtap="Z2FZ" tap="Z2FZ" opt="58H9"/>
>         <VEH codcol="XY" codtap="Z2FZ" tap="Z2FZ" opt="95HC"/>
>         <VEH codcol="YT" codtap="Z2FT" tap="Z2FT" opt="58H9"/>
>         <VEH codcol="ZR" codtap="Z2FT" tap="Z2FT" opt="58J0"/>
>         <VEH codcol="ZR" codtap="Z2FT" tap="Z2FT" opt="WL45"/>
>         <VEH codcol="ZR" codtap="Z2FZ" tap="Z2FZ" opt="WL45"/>
>       </V16>
>     </V14>
>   </VERSIONES>
> </DATOS>
> 
> 
> 
> And with this xsl I obtain the 'selects' that i need:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>   <xsl:output method="html" version="1.0" encoding="UTF-8"
indent="yes"/>
> 
>   <xsl:param name="v14" select="0"/><!--  1CA8A5J6P5..A0
1CA8A5J7P5..A0
> -->
>   <xsl:param name="as" select="0"/><!--  30  31  -->
>   <xsl:param name="color" select="0"/> <!--  J4  -->
>   <xsl:param name="tap" select="0"/> <!--  Z2FT  Z2FZ  -->
> 
>   <xsl:key name="a" match="V16" use="@as"/>
>   <xsl:key name="a1" match="V16" use="concat(../@cod,'+',@as)"/>
> 
>   <xsl:key name="c" match="VEH"
> use="concat(../../@cod,'+',../@as,'+',@codcol)"/>
>   <xsl:key name="c1" match="VEH"
use="concat(../../@cod,'+',@codcol)"/>
>   <xsl:key name="c2" match="VEH" use="concat(../@as,'+',@codcol)"/>
>   <xsl:key name="c3" match="VEH" use="@codcol"/>
> 
>   <xsl:key name="t8" match="VEH"
> use="concat(../../@cod,'+',../@as,'+',@codcol,'+',@tap)"/>
>   <xsl:key name="t7" match="VEH"
> use="concat(../../@cod,'+',../@as,'+',@tap)"/>
>   <xsl:key name="t6" match="VEH"
> use="concat(../../@cod,'+',@codcol,'+',@tap)"/>
>   <xsl:key name="t5" match="VEH" use="concat(../../@cod,'+',@tap)"/>
>   <xsl:key name="t4" match="VEH"
> use="concat(../@as,'+',@codcol,'+',@tap)"/>
>   <xsl:key name="t3" match="VEH" use="concat(../@as,'+',@tap)"/>
>   <xsl:key name="t2" match="VEH" use="concat(@codcol,'+',@tap)"/>
>   <xsl:key name="t1" match="VEH" use="@tap"/>
> 
>   <xsl:key name="colores" match="COL" use="@cod"/>
> 
>   <xsl:template match="/DATOS">
>     <table border="0">
>       <xsl:variable name="clase" select="//LIT/@MARCA"/>
>       <tr>
>         <td>
>           <xsl:attribute name="class"><xsl:value-of
> select="$clase"/></xsl:attribute>
>           <xsl:value-of select="//FILTRO/VER/@lit"/>
>         </td>
>         <td>
>           <xsl:attribute name="class"><xsl:value-of
> select="$clase"/></xsl:attribute>
>           <select onchange="doCargarVersiones()">
>             <xsl:attribute name="name"><xsl:value-of
> select="//FILTRO/VER/@nombre"/></xsl:attribute>
>             <option value="0">
>               <xsl:value-of select="//LIT/@SELECCIONE"/>
>             </option>
>             <xsl:for-each select="//V14">
>               <xsl:sort select="@ord" data-type="number"
> order="ascending"/>
>               <xsl:sort select="@lit" data-type="text"
order="ascending"/>
>               <OPTION>
>                 <xsl:if test="@cod=$v14">
>                   <xsl:attribute name="selected"/>
>                 </xsl:if>
>                 <xsl:attribute name="value"><xsl:value-of
> select="@cod"/></xsl:attribute>
>                 <xsl:attribute name="orden"><xsl:value-of
> select="@ord"/></xsl:attribute>
>                 <xsl:value-of select="@lit"/>
>               </OPTION>
>             </xsl:for-each>
>           </select>
>         </td>
>         <td>
>           <xsl:attribute name="class"><xsl:value-of
> select="$clase"/></xsl:attribute>
>           <xsl:value-of select="//FILTRO/AS/@lit"/>
>         </td>
>         <td>
>           <xsl:attribute name="class"><xsl:value-of
> select="$clase"/></xsl:attribute>
>           <select onchange="doCargarASalon()">
>             <xsl:attribute name="name"><xsl:value-of
> select="//FILTRO/AS/@nombre"/></xsl:attribute>
>             <option value="0">
>               <xsl:value-of select="//LIT/@SELECCIONE"/>
>             </option>
>             <xsl:if test="$v14='0'">
>               <xsl:apply-templates
> select="//V14/V16[generate-id()=generate-id(key('a',@as)[1])]/@as">
>                 <xsl:sort select="." order="ascending" data-
> type="number"/>
>               </xsl:apply-templates>
>             </xsl:if>
>             <xsl:if test="$v14!='0'">
>               <xsl:apply-templates
> select="//V14[@cod=$v14]/V16[generate-id()=generate-
> id(key('a1',concat($v14,'+',@as))[1])]/@as">
>                 <xsl:sort select="." order="ascending" data-
> type="number"/>
>               </xsl:apply-templates>
>             </xsl:if>
>           </select>
>         </td>
>       </tr>
>       <tr>
>         <td>
>           <xsl:attribute name="class"><xsl:value-of
> select="$clase"/></xsl:attribute>
>           <xsl:value-of select="//FILTRO/COL/@lit"/>
>         </td>
>         <td>
>           <xsl:attribute name="class"><xsl:value-of
> select="$clase"/></xsl:attribute>
>           <select onchange="doCargarColores()">
>             <xsl:attribute name="name"><xsl:value-of
> select="//FILTRO/COL/@nombre"/></xsl:attribute>
>             <option value="0">
>               <xsl:value-of select="//LIT/@SELECCIONE"/>
>             </option>
>             <xsl:choose>
>               <xsl:when test="$v14='0' and $as='0'">
>                 <xsl:apply-templates select="//COL/@cod">
>                   <xsl:sort select="../@lit" data-type="text"
> order="ascending"/>
>                 </xsl:apply-templates>
>               </xsl:when>
>               <xsl:when test="$v14='0' and $as!='0'">
>                 <xsl:apply-templates select="//COL[@cod =
> //V14/V16[@as=$as]/VEH[generate-id()=generate-
> id(key('c2',concat($as,'+',@codcol))[1])]/@codcol]/
>   @cod">
>                   <xsl:sort select="../@lit" data-type="text"
> order="ascending"/>
>                 </xsl:apply-templates>
>               </xsl:when>
>               <xsl:when test="$v14!='0' and $as='0'">
>                 <xsl:apply-templates select="//COL[@cod =
> //V14[@cod=$v14]//V16/VEH[generate-id()=generate-
> id(key('c1',concat($v14,'+',@codcol))[1])]/@codcol]/@cod">
>                   <xsl:sort select="../@lit" data-type="text"
> order="ascending"/>
>                 </xsl:apply-templates>
>               </xsl:when>
>               <xsl:otherwise>
>                 <xsl:apply-templates select="//COL[@cod =
> //V14[@cod=$v14]/V16[@as=$as]/VEH[generate-id()=generate-
> id(key('c',concat($v14,'+',$as,'+',@codcol))[1])]/@codcol]/@cod">
>                   <xsl:sort select="../@lit" data-type="text"
> order="ascending"/>
>                 </xsl:apply-templates>
>               </xsl:otherwise>
>             </xsl:choose>
>           </select>
>         </td>
>         <td>
>           <xsl:attribute name="class"><xsl:value-of
> select="$clase"/></xsl:attribute>
>           <xsl:value-of select="//FILTRO/TAP/@lit"/>
>         </td>
>         <td>
>           <xsl:attribute name="class"><xsl:value-of
> select="$clase"/></xsl:attribute>
>           <select>
>             <xsl:attribute name="name"><xsl:value-of
> select="//FILTRO/TAP/@nombre"/></xsl:attribute>
>             <option value="0">
>               <xsl:value-of select="//LIT/@SELECCIONE"/>
>             </option>
>             <xsl:if test="$v14='0'">
>               <xsl:if test="$as='0'">
>                 <xsl:if test="$color='0'">
>                   <xsl:apply-templates
> select="//VEH[generate-id()=generate-id(key('t1',@tap)[1])]/@tap">
>                     <xsl:sort select="." data-type="text"
> order="ascending"/>
>                   </xsl:apply-templates>
>                 </xsl:if>
>                 <xsl:if test="$color!='0'">
>                   <xsl:apply-templates
> select="//VEH[generate-id()=generate-
> id(key('t2',concat($color,'+',@tap))[1])]/@tap">
>                     <xsl:sort select="." data-type="text"
> order="ascending"/>
>                   </xsl:apply-templates>
>                 </xsl:if>
>               </xsl:if>
>               <xsl:if test="$as!='0'">
>                 <xsl:if test="$color='0'">
>                   <xsl:apply-templates
> select="//VEH[generate-id()=generate-
> id(key('t3',concat($as,'+',@tap))[1])]/@tap">
>                     <xsl:sort select="." data-type="text"
> order="ascending"/>
>                   </xsl:apply-templates>
>                 </xsl:if>
>                 <xsl:if test="$color!='0'">
>                   <xsl:apply-templates
> select="//VEH[generate-id()=generate-
> id(key('t4',concat($as,'+',$color,'+',@tap))[1])]/@tap">
>                     <xsl:sort select="." data-type="text"
> order="ascending"/>
>                   </xsl:apply-templates>
>                 </xsl:if>
>               </xsl:if>
>             </xsl:if>
>             <xsl:if test="$v14!='0'">
>               <xsl:if test="$as='0'">
>                 <xsl:if test="$color='0'">
>                   <xsl:apply-templates
> select="//VEH[generate-id()=generate-
> id(key('t5',concat($v14,'+',@tap))[1])]/@tap">
>                     <xsl:sort select="." data-type="text"
> order="ascending"/>
>                   </xsl:apply-templates>
>                 </xsl:if>
>                 <xsl:if test="$color!='0'">
>                   <xsl:apply-templates
> select="//VEH[generate-id()=generate-
> id(key('t6',concat($v14,'+',$color,'+',@tap))[1])]/@tap">
>                     <xsl:sort select="." data-type="text"
> order="ascending"/>
>                   </xsl:apply-templates>
>                 </xsl:if>
>               </xsl:if>
>               <xsl:if test="$as!='0'">
>                 <xsl:if test="$color='0'">
>                   <xsl:apply-templates
> select="//VEH[generate-id()=generate-
> id(key('t7',concat($v14,'+',$as,'+',@tap))[1])]/@tap">
>                     <xsl:sort select="." data-type="text"
> order="ascending"/>
>                   </xsl:apply-templates>
>                 </xsl:if>
>                 <xsl:if test="$color!='0'">
>                   <xsl:apply-templates
> select="//VEH[generate-id()=generate-
> id(key('t8',concat($v14,'+',$as,'+',$color,'+',@tap))[1])]/@tap">
>                     <xsl:sort select="." data-type="text"
> order="ascending"/>
>                   </xsl:apply-templates>
>                 </xsl:if>
>               </xsl:if>
>             </xsl:if>
>           </select>
>         </td>
>       </tr>
>     </table>
>   </xsl:template>
> 
>   <xsl:template match="@as">
>     <OPTION>
>       <xsl:if test=".=$as">
>         <xsl:attribute name="selected"/>
>       </xsl:if>
>       <xsl:attribute name="value"><xsl:value-of
> select="."/></xsl:attribute>
>       <xsl:value-of select="."/>
>     </OPTION>
>   </xsl:template>
> 
>   <xsl:template match="//COL/@cod">
>     <OPTION>
>       <xsl:if test=".=$color">
>         <xsl:attribute name="selected"/>
>       </xsl:if>
>       <xsl:attribute name="value"><xsl:value-of
> select="."/></xsl:attribute>
>       <xsl:value-of select="../@lit"/>
>     </OPTION>
>   </xsl:template>
> 
>   <xsl:template match="@tap">
>     <OPTION>
>       <xsl:attribute name="value"><xsl:value-of
> select="../@codtap"/></xsl:attribute>
>       <xsl:value-of select="."/>
>     </OPTION>
>   </xsl:template>
> 
> </xsl:stylesheet>
> 
> 
> Now I want to add another 'select', ('opciones'), if I use the same
form
> to
> refill it, the number of different combinations it turns almost
> impossible.
> There is another form to do it?
> 
> I tried with something like this:
> 
>   <xsl:key name="o4" match="VEH"
use="concat(@codcol,'+',@tap,'+',@opt)"/>
>   <xsl:key name="o3" match="VEH" use="concat(@codcol,'+',@opt)"/>
>   <xsl:key name="o2" match="VEH" use="concat(@tap,'+',@opt)"/>
>   <xsl:key name="o1" match="VEH" use="@opt"/>
> <!-- ... -->
> <td>
>   <xsl:attribute name="class"><xsl:value-of
> select="$clase"/></xsl:attribute>
>   <select>
>     <xsl:attribute name="name"><xsl:value-of
> select="//FILTRO/OPT/@nombre"/></xsl:attribute>
>     <option value="0">
>       <xsl:value-of select="//LIT/@SELECCIONE"/>
>     </option>
>     <!--xsl:apply-templates
>       select="//V14[@cod=$v14 or $v14='0']/V16[@as=$as or
> $as='0']/VEH[generate-id()=generate-id(key('o1',@opt)[1])]/@opt">
>       <xsl:sort select="." data-type="text" order="ascending"/>
>     </xsl:apply-templates-->
>     <xsl:choose>
>       <xsl:when test="$color!='0' and $tap!='0'">
>         <xsl:apply-templates
>         select="//V14[@cod=$v14 or $v14='0']/V16[@as=$as or
> $as='0']/VEH[generate-id()=generate-
> id(key('o4',concat($color,'+',$tap,'+',@opt))[1])]/@opt">
>           <xsl:sort select="." data-type="text" order="ascending"/>
>         </xsl:apply-templates>
>       </xsl:when>
>       <xsl:when test="$color!='0' and $tap='0'">
>         <xsl:apply-templates
>           select="//V14[@cod=$v14 or $v14='0']/V16[@as=$as or
> $as='0']/VEH[generate-id()=generate-
> id(key('o3',concat($color,'+',@opt))[1])]/@opt">
>           <xsl:sort select="." data-type="text" order="ascending"/>
>         </xsl:apply-templates>
>       </xsl:when>
>       <xsl:when test="$color='0' and $tap!='0'">
>         <xsl:apply-templates
>           select="//V14[@cod=$v14 or $v14='0']/V16[@as=$as or
> $as='0']/VEH[generate-id()=generate-
> id(key('o2',concat($tap,'+',@opt))[1])]/@opt">
>           <xsl:sort select="." data-type="text" order="ascending"/>
>         </xsl:apply-templates>
>       </xsl:when>
>       <xsl:when test="$color='0' and $tap='0'">
>         <xsl:apply-templates
>           select="//V14[@cod=$v14 or $v14='0']/V16[@as=$as or
> $as='0']/VEH[generate-id()=generate-id(key('o1',@opt)[1])]/@opt">
>           <xsl:sort select="." data-type="text" order="ascending"/>
>         </xsl:apply-templates>
>       </xsl:when>
>     </xsl:choose>
>   </select>
> </td>
> <!-- ... -->
>   <xsl:template match="@opt">
>     <OPTION>
>       <xsl:attribute name="value"><xsl:value-of
> select="."/></xsl:attribute>
>       <xsl:value-of select="."/>
>     </OPTION>
>   </xsl:template>
> 
> But it doesn't work in all the cases, some options are absent in the
> 'select' that they should be there.
> 
> For example, if i put:
> 
> <xsl:param name="v14" select="'1CA8A5J7P5..A0'"/><!-- 1CA8A5J6P5..A0
> 1CA8A5J7P5..A0    -->
> <xsl:param name="as" select="'31'"/>
> <xsl:param name="color" select="0"/> <!-- J4 -->
> <xsl:param name="tap" select="0"/> <!-- Z2FT Z2FZ  -->
> 
> the options in the select must be: 'WL45, 58J0, 95HC, 58H9' but there
are
> only '58J0, 95HC, 58H9'.
> 
> I hope that someone can help me, and say how to optimize this xsl.
> 
> 
> Thanks for all.
> 
> _________________________________________________________________
> Latinos en EE.UU: noticias y artmculos de interis para ti
> http://latino.msn.com/noticias/latinoseneeuu

Current Thread