|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] MacroArgRef
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






