[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: problem with one xml for buildin links using xslt

Subject: Re: problem with one xml for buildin links using xslt
From: Steve Fitzpatrick <stevef@xxxxxxxxx>
Date: Tue, 18 May 2004 16:21:11 -0700
steve fitzpatrick
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.