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

Re: Variable in template atrribute "match" with Xalan

Subject: Re: Variable in template atrribute "match" with Xalan and MSXML
From: "David N Bertoni/Cambridge/IBM" <david_n_bertoni@xxxxxxxxxx>
Date: Thu, 14 Mar 2002 14:24:24 -0800
xalan template match variable
I don't know what version of Xalan you're using, but Xalan-C++ 1.3 reports
an error:

   V:\test\Astakhov>Xalan -v

   Xalan version 1.3
   Usage: Xalan [options] source stylesheet
     -a                    Use xml-stylesheet PI, not the 'stylesheet'
     -o filename           Write output to the specified file.
     -p name expression    Sets a stylesheet parameter.
     -v                    Validates source documents.
     -?                    Display this message.

   V:\test\Astakhov>Xalan test1.xml test1.xsl
   A literal argument is required!
   pattern = 'id($pMenuItemID)'(test1.xsl, 6, 41)
   Remaining tokens: ( '$' 'pMenuItemID' ')')

Perhaps you should upgrade the version of Xalan you're using.  The
arguments to the id() or key() functions in a match pattern must be
literals, so the Microsoft processor is correct in rejecting your


|         |           "Andrey Astakhov"         |
|         |           <paranorm@xxxxxxxxx>      |
|         |           Sent by:                  |
|         |           owner-xsl-list@xxxxxxxxxxx|
|         |           rrytech.com               |
|         |                                     |
|         |                                     |
|         |           03/14/2002 01:42 PM       |
|         |           Please respond to xsl-list|
|         |                                     |
  |                                                                                                          |
  |        To:      xsl-list@xxxxxxxxxxxxxxxxxxxxxx                                                          |
  |        cc:      (bcc: David N Bertoni/Cambridge/IBM)                                                     |
  |        Subject:  Variable in template atrribute "match" with Xalan and MSXML                        |

Hallo, All!

I have to work with Xalan and MSXML4.

I have such xsl style:

<xsl:param name="pMenuItemID"/>
<xsl:template match="id($pMenuItemID)">
  <xsl:value-of select="@caption"/>

It works excelent with Xalan but it doesn't work with MSXML4. I get: "id
($pMenuItemID)' is an invalid XPath expression."

Why so?

Best regards,

 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


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.
First Name
Last Name
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.