Subject: AW: [xsl] Other about to get a comma delimited string From: Delaney Robin <Robin.Delaney@xxxxxxx> Date: Tue, 8 Apr 2003 16:20:38 +0200 |
Hello David, Try something along these lines. It produces a semi-colon-seperated list. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="Registro/TipoDescriptor"> <xsl:for-each select="*"> <xsl:value-of select="node()"/> <xsl:if test="position()!=last()">;</xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> Cheers, Robin Robin Delaney FJA Feilmeier & Junker GmbH Elsenheimerstraße 65, 80687 München. * +49 (0) 89 - 76 901-7058 Fax +49 (0) 89 - 76 901-9502 web http://www.fja.com * Mailto:Robin.Delaney@xxxxxxx > -----Ursprüngliche Nachricht----- > Von: David Pacheco [SMTP:dpacheco@xxxxxxxxxxxx] > Gesendet am: Dienstag, 8. April 2003 15:35 > An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Betreff: [xsl] Other about to get a comma delimited string > > 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] RE: XSL-FO: reset fo:page, David Carlisle | Thread | Re: [xsl] Other about to get a comm, David Pacheco |
Re: [xsl] RE: XSL-FO: reset fo:page, David Carlisle | Date | RE: [xsl] RE: XSL-FO: reset fo:page, David . Pawson |
Month |