Subject: Re: Linking to other queries. From: "Richard Lander" <rlander@xxxxxxxxxxxxxxxxxxx> Date: Tue, 27 Jul 1999 19:56:22 -0400 |
Kara, Oh, I see. Try: <xsl:template match='Author'> <A class="special" href="{@href}">Author: <xsl:apply-templates/></A> </xsl:template> The { and } are a short-form for <xsl:value-of select="node"/>. Note: If you want to write a stylesheet for IE5, you won't be able to use the shortcut. You'll have to use: <xsl:template match='Author'> <A class="special"> <xsl:attribute name="href"><xsl:value-of select="@href"/></xsl:attribute> Author: <xsl:apply-templates/></A> </xsl:template> Good luck, Richard. Richard Lander relander at uwaterloo.ca http://pdbeam.uwaterloo.ca/~rlander/ Professional XML Authoring http://www.on-line-learning.com/ ----- Original Message ----- From: Kara Lee <karal@xxxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxx> Sent: Tuesday, July 27, 1999 5:44 PM Subject: RE: Linking to other queries. > Thanks for the feedback Richard. > > <xsl:template match='Author'> > <A class="special" href="placetogo.html">Author: <xsl:apply-templates/></A> > </xsl:template> > > That is pretty much the code I have right now. But I'm trying to find a way > to read the href from my XML file as well. > Maybe like this in my XSL: > <xsl:template match='Author'> > <A class="special" href="value-of @HREF"> Author: <xsl:applytemplates/></A> > </xsl:template> > Having my XML look like this: (with a special URL encoding scheme) > <Author HREF=" placetogo.html ">Smith J</Author> > > But that doesn't work. > > I want to create the link in my XSL, without telling my ahead of time what > the link should be. > Any suggestions. > Thanks in advance. > -------------------------------------- > Kara Lee > Applied Technical Systems > karal@xxxxxxxxxxxxxx > http://www.apptechsys.com > CCM Technology Demo: > http://www.apptechsys.com/ccm > --------------------------------------- > > > -----Original Message----- > From: Richard Lander [mailto:rlander@xxxxxxxxxxxxxxxxxxx] > Sent: Tuesday, July 27, 1999 1:36 PM > To: xsl-list@xxxxxxxxxxxxxxxx > Subject: Re: Linking to other queries. > > Kara, > > How about the following: > > <xsl:template match='Author'> > <A class="special" href="placetogo.html">Author: <xsl:apply-templates/></A> > </xsl:template> > > In your CSS, include: > > A.special {text-decoration:none;color:black} > A.special:hover {text-decoration:underline;color:blue} > > If you want a non-fixed href attribute, you'll have to provide further > processing. That CSS and XSL should do much of what you want. If you are not > currently using CSS, you'll have to add a STYLE element inside your HEAD > element. > > Good luck, > > Richard. > > Richard Lander > relander at uwaterloo.ca > http://pdbeam.uwaterloo.ca/~rlander/ > > Professional XML Authoring > http://www.on-line-learning.com/ > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Linking to other queries., Kara Lee | Thread | DocBook XSL Stylesheets V0.08, Norman Walsh |
DocBook XSL Stylesheets V0.08, Norman Walsh | Date | How to access Javascript variables , Manikandan |
Month |