Subject: MacroArgRef From: Mats Johnson <Mats.Johnson@xxxxxxxxx> Date: Fri, 16 Apr 1999 13:11:51 +0200 |
I would like to be able to use a macro argument inside a pattern. Trying to find out how to do that, I've convinced myself that it is not possible, since MacroArgRef is only allowed inside StringExpr which in turn is only used in xsl:value-of and inside {}. Wouldn't it be a good idea to replace all uses of Literal with StringExpr? Second, I wonder if there is another way to achieve the effect I wanted. Given a source document <doc> <part name="foo"> ... </part> <part name="bar"> ... </part> ... </doc> I'd like to be able to format one part with links to the other parts, something like this: <xsl:template match="part"> <xsl:for-each select="//part"> <a href="{@name}.html"> <xsl:value-of select="@name"/> </a> </xsl:for-each> <xsl:apply-templates /> </xsl:template> This works fine, only I'd like to special case the part which is the same as the one I'm formatting and leave out the link, make it bold or whatever. I thought I could do that by making the for-each a macro, passing it the name of the "current" part, and then use xsl:choose to test for the part to be linked having the same name, but that didn't work. Is there some other way? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: To give line breaks in the XSL , Keith Visco | Thread | Formatting Objects considered harmf, Håkon Wium Lie |
Re: Python & XML, Lars Marius Garshol | Date | Re: To give line breaks in the XSL , Matthew MacKenzie |
Month |