[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

MacroArgRef

Subject: MacroArgRef
From: Mats Johnson <Mats.Johnson@xxxxxxxxx>
Date: Fri, 16 Apr 1999 13:11:51 +0200
mats johnson
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
  • MacroArgRef
    • Mats Johnson - Fri, 16 Apr 1999 13:11:51 +0200 <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.