xsl-list
[Top] [All Lists]

Other about to get a comma delimited string

2003-04-08 06:35:04
Hi
I have an xml file like this:

<?xml version="1.0" ?>
<Registro>
<TipoDescriptor>Invitados permanentes
     <Descriptor>050-Dario Bastardo, Auditor Interno</Descriptor>
     <Descriptor>051-Edelmira Hernández de Gamboa, Auditora Interna
(E)</Descriptor>
     <Descriptor>070-Héctor Griffin, Consultor Jurídico</Descriptor>
     <Descriptor>090-José Luis Marcos, Gerente General de Casa de la
Moneda</Descriptor>
     <Descriptor>101-Iván Giner, Vicepresidente de Estudios (E)</Descriptor>
     <Descriptor>110-Carlos Tinoco, Vicepresidente de Operaciones
Nacionales</Descriptor>
     <Descriptor>120-Maximir Álvarez, Gerente de la Unidad de Análisis del
Mercado Financiero</Descriptor>
     <Descriptor>130-Jesús Arvelo, Gerente de Obligaciones
Internacionales</Descriptor>
     <Descriptor>150-María Belén Batista, Gerente de Comunicaciones
Institucionales</Descriptor>
     <Descriptor>170-Egidio Coelho, Gerente de Tesorería</Descriptor>
     <Descriptor>180-Víctor Fajardo, Gerente de Subsede
Maracaibo</Descriptor>
     <Descriptor>190-Iván Giner, Gerente de Programación y Análisis
Macroeconómico</Descriptor>
     <Descriptor>210-Ana Silva Trujillo, Gerente de Recursos
Humanos</Descriptor>
     <Descriptor>220-Jesus Enrique López, Gerente Oficina de
Planificación</Descriptor>
     <Descriptor>300-José Guerra Brito, Gerente de Investigaciones
Económicas</Descriptor>
     <Descriptor>400-Juan Llorens, Gerente de Sistemas</Descriptor>
     <Descriptor>500-Dionisio Molina, Gerente de Seguridad</Descriptor>
</TipoDescriptor>
<Registro>

I have tried to use the recommendation raised previously in this forum
to produce a separated by commas list, but I do not obtain the awaited
results.

I have used something as this

<xsl:template match="Registro/TipoDescriptor">
    <xsl:if test="contains(.,'Invitados permanentes')">
         Asistieron: <xsl:for-each select="./Descriptor">
         <xsl:sort select="." order="ascending" data-type="text"/>
           <xsl:value-of select="substring-after(.,'-')"/>
              <xsl:if test="not(position() = last())">
                <xsl:text>; </xsl:text>
              </xsl:if>
              <xsl:text>. </xsl:text>
           </xsl:for-each>
     </xsl:if >
</xsl:template

but does not work

You could give me some tip that allows me to obtain the list?

Any help will be appreciated

David Pacheco


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>