Subject: Re: Creating Hyperlinks using XSL and XML From: "John E. Simpson" <simpson@xxxxxxxxxxx> Date: Mon, 05 Apr 1999 10:35:22 -0400 |
At 09:46 AM 4/5/1999 -0400, Douglas Nehring wrote: >...what would the XSL look like to >handle the following such that the produced HTML would create a hyperlink on >"XSL List": >... ><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> The URL in your example looks a little bogus, so the link might not actually *work* in this specific case. But that's a separate issue. :) ============================================================= John E. Simpson | It's no disgrace t'be poor, simpson@xxxxxxxxxxx | but it might as well be. | -- "Kin" Hubbard XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Creating Hyperlinks using XSL and X, Douglas Nehring | Thread | Re: Creating Hyperlinks using XSL a, Duane Nickull |
extracting element-names, Ben Jung | Date | Use of variables, Ushanas Shastri |
Month |