Subject: Re: [xsl] problem with one xml for buildin links using xslt From: Steve Fitzpatrick <stevef@xxxxxxxxx> Date: Tue, 18 May 2004 16:21:11 -0700 |
Hi, Assuming I correctly interpreted what you are looking for, this should help. Note that the XML you posted didn't have a root element, which might be part of your problem. At any rate, the following template will, for each composicioninformacion node, create an HTML link, where the "href" comes from the 'Link' sn_composicioninformacion node, and the clickable text comes from the 'Titulo' sn_composicioninformacion node. -- Steve Fitzpatrick <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html"/> <xsl:template match="/"> <html> <body> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="composicioninformacion"> <a> <xsl:attribute name="href"> <xsl:value-of select="sn_composicioninformacion/metadatosinformacion_texto[../composicioninformacion_aliascliente = 'Link']"/> </xsl:attribute> <xsl:value-of select="sn_composicioninformacion/metadatosinformacion_texto[../composicioninformacion_aliascliente = 'Titulo']"/> </a> </xsl:template> </xsl:stylesheet> On Wed, 19 May 2004 00:40:42 +0200, Dionisio Ruiz de Zarate <dionisio@xxxxxxxxxxxxx> wrote: > > each composicioninformacion node has all the information for building one > html link: > <a href="link">Titulo</a> > from each composicion informaicon node imusto to read the > composicioninformacion_aliascliente, to see if is equals to Titulo, this is > the Titulo. > if the composicioninformacion_aliascliente is equals to Link, the metadatos > inforamcion_texto y the link > fro example for the first composicioninformacion node i must to compose > this: > > <a href="http://www.xxx.com">this is the title</a> > > how can imake for the all composicioninformacion nodes?
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] problem with one xml for buil, Dionisio Ruiz de Zár | Thread | [xsl] Walking through text with emb, Bruce Kyle \(Volt\) |
[xsl] Walking through text with emb, Bruce Kyle \(Volt\) | Date | Re: [xsl] Walking through text with, G. Ken Holman |
Month |