Subject: Re: Creating Hyperlinks using XSL and XML
From: Duane Nickull <webmaster@xxxxxxxxxxxxxxxxx>
Date: Mon, 05 Apr 1999 18:44:29 -0700
|
Hello John:
A colleague and I are trying to get this example to work, however, we
keep getting the message
"Keyword xsl:template may not be used here."
After reading all the other people complaining because their browser
does not validate, I feel like I got the NAZI Browser - it picks
everything apart, including stuff that displays on other people fine.
(it is the final beta/release version)
Any suggestions?
Duane Nickull (just curious)
John E. Simpson wrote:
> >...
> ><brown_nose>
> > The <link url="http://www.mulberrytech.com/xsl/xsl-list/
> ><http://www.mulberrytech.com/xsl/xsl-list/> "> XSL List </link> is a great
> >place to ask questions about XSL.
> ></brown_nose>
>
> I don't have my XSL docs here at work, but I think something like the
> following does it:
>
> <xsl:template match="brown_nose">
> <p><xml:apply-templates/></p>
> </xsl:template>
>
> <xsl:template match="brown_nose/link">
> <a href="{@url}"><xsl:apply-templates/></a>
> </xsl:template>
>
> (Note "curly braces," not parentheses, enclosing the @url.)
>
> If I've got this right, it ought to generate HTML that looks like this:
> <p>The <a href="http://www.mulberrytech.com/xsl/xsl-list/
> <http://www.mulberrytech.com/xsl/xsl-list/> "> XSL List </a> is a great
> place to ask questions about XSL.</p>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|