[thelist] XML XSLT and url outputting

Warden, Matt mwarden at mattwarden.com
Thu Jan 17 11:05:34 CST 2002


On Jan 17, Nicole Parrot had something to say about [thelist] XML XSLT and...

>I'm fighting with my first ever from scratch XML project here so this is
>probably a beginner question, even though it's stopped me for the last 2
>days. I got most of it working so far, except transforming some XML data
>into a standard URL.
>
>I have
><xsl:template match="event">
>   <a href=".">
>   <xsl:value-of select="@url"/>
>   <xsl:value-of select="."/>
>   </a>
></xsl:template>
>
>to display the proper values if not the proper form, but of course what I
>would really want is
>
><xsl:template match="event">
>   <a href="<xsl:value-of select="@url"/>">
>   <xsl:value-of select="."/>
>   </a>
></xsl:template>

looks like you want <xsl:attribute>

http://www.w3.org/TR/xslt#creating-attributes

--
mattwarden
mattwarden.com





More information about the thelist mailing list