Subject: Re: [xsl] XSL Contextual formatting of links From: "cking" <cking@xxxxxxxxxx> Date: Mon, 9 Aug 2004 17:47:28 +0200 |
Hi Paul, in your content.xsl (line 63, inside <xsl:for-each select="description/list/item">): <p style="margin:0px;"><xsl:value-of select="node()"/><xsl:apply-templates select="link"/></p> This will add a <p> paragraph, with (first) the value of the node, and (then) the link. Regardless of the order in which they appear. I would try something like: <p style="margin:0px;"> <xsl:apply-templates select="link | text()"/> </p> with an extra template for "text()": <xsl:template match="text()"> <xsl:value-of select="."/> </xsl:template> (maybe you'll need some similar modifications in some other places, too: there are many select="node()" in the stylesheet) HTH? Anton Triest From: "Paul Hiles" > I've been struggling to add hyperlinks into a particular area > (related-items) > on a page. If you check out the following page: > http://www.erimus.com/temp/xml/003_page_sample.xml > you'll see that the "description/list/items" now contain hyperlinks. > > Just one niggly bug remains.. I'm trying to prevent duplication of the link > and its text value! At the moment, if I start the list item with a link then > you will see the plain text from the link, as well as the link itself > immediately to its right. I'm sure there's a conditional statement I can add > to the XSL stylesheet to ensure these instances are correctly rendered, but > I'm not sure what they are. Can anyone help me out with this?
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL Contextual formatting of , Paul Hiles | Thread | Re: [xsl] XSL Contextual formatting, cking |
Re: [xsl] Substring a Value, Jeni Tennison | Date | Re: [xsl] splittingNode-set2, Mukul Gandhi |
Month |