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

RE: Output a link in a transformation to html

Subject: RE: Output a link in a transformation to html
From: Nate Austin <naustin@xxxxxxxxxx>
Date: Thu, 31 May 2001 18:07:58 -0500
RE:  Output a link in a transformation to html
Luare-

XSLT needs to be well-formed XML.  I'd suggest doing some reading on exactly
what that means.  http://www.w3.org/XML/ should provide you with a few links
for starters.  The reason that is not well-formed is because <xsl:value-of/>
is an element.  Since HREF is an attribute, it cannot have complex (element)
content.  It also must enclose its content in " or '.  The solution to your
problem would look something like this:
    <h3>Web: <a><xsl:attribute name="href" select="."/><xsl:value-of
select="."/></a></h3>

or (using an Attribute Value Template):

    <h3>Web: <a href="{.}"><xsl:value-of select="."/></a></h3>

Hope that helps,
Nate
naustin@xxxxxxxxxx

>Date: Wed, 31 May 2000 21:37:07 +0200
>From: "Luare" <luare@xxxxxxxxxx>
>Subject:  Output a link in a transformation to html
>
>    Hi,
>
>I am doing a transformation from xml to html.
>This example is not well-formed, why?
>
>    <H3>Web: <A HREF= <xsl:value-of select="."/>> <xsl:value-of
select="."/>
></A></H3>
>
>The expresion <xsl:value-of select="."/> return a string, doesn't it?
>
>If I put    "<xsl:value-of select="."/>"
>or     string(<xsl:value-of select="."/>)
>the error is the same.
>
>It seem a tipical error, but I am a beginner.
>
>Thanks

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


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.