|
[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








