-
XSL and HTML attributes
I am trying to write the following tranformation:
<p><img src="<xsl:value-of select="Filename"/>.gif"></p>
When I load the xsl into IE5.5 to check if it is well formed the following
error occurs:
The character '<' cannot be used in an attribute value. Line 11, Position 17
<p><img src="<xsl:value-of select="Filename"/>.gif"></p>
----------------^
Any ideas on how to solve this gratefully received.
Thanks
Pat Long
-
Re: XSL and HTML attributes
Either of these will work:
Try this: <p><img src="{Filename}.gif"/></p>
Or this:
<p><img><xsl:attribute name="src"><xsl:value-of
select="Filename"/>.gif"</xsl:attribute></img></p>
Russell Jones
Sr. Web Development Editor,
DevX.com
"Patrick Long" <Patrick_long@csi.com> wrote in message
news:3b1f4127$1@news.devx.com...
> I am trying to write the following tranformation:
>
> <p><img src="<xsl:value-of select="Filename"/>.gif"></p>
>
> When I load the xsl into IE5.5 to check if it is well formed the following
> error occurs:
> The character '<' cannot be used in an attribute value. Line 11, Position
17
>
> <p><img src="<xsl:value-of select="Filename"/>.gif"></p>
> ----------------^
>
> Any ideas on how to solve this gratefully received.
>
> Thanks
>
> Pat Long
>
>
-
Re: XSL and HTML attributes
I always do as follows:
<xsl:element name="IMG">
<xsl:attribute name="src"><xsl:value-of select="Filename"/>.gif
</xsl:attribute>
</xsl:element>
cu.
David
"Patrick Long" <Patrick_long@csi.com> wrote:
>I am trying to write the following tranformation:
>
><p><img src="<xsl:value-of select="Filename"/>.gif"></p>
>
>When I load the xsl into IE5.5 to check if it is well formed the following
>error occurs:
>The character '<' cannot be used in an attribute value. Line 11, Position
17
>
> <p><img src="<xsl:value-of select="Filename"/>.gif"></p>
>----------------^
>
>Any ideas on how to solve this gratefully received.
>
>Thanks
>
>Pat Long
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks