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

Param with namespace problem!

Subject: Param with namespace problem!
From: "Qinghui Zeng" <zengqh@xxxxxxx>
Date: Thu, 20 Jun 2002 14:45:54 +0200
select namespace problem
Hi, List

There is a problem when I pass the value with namespace prefix
to xsl:param,  the structure of xml is:
------------------
<Temsis>
    <WebPages>
        <Home>...</Home>
        <Report>...</Report>
        ...
    </WebPages>
</Temsis>
------------------

the xsl file I used is:
------------------------------------------------
<xsl:stylesheet version="1.0" xmlns:t="http://www.dfki.de/Temsis"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/TR/xlink">

 <xsl:param name="target" select="t:Home"/>

 <xsl:template match="/">
  <html><head/>
   <body >
     <xsl:apply-templates select="t:Temsis"/>
   </body>
  </html>
 </xsl:template>

 <xsl:template match="t:Temsis">
  <xsl:apply-templates select="t:WebPages" />
 </xsl:template>

 <xsl:template match="t:WebPages">
  <xsl:apply-templates select="$target"/>         <!-- I want to select the
node "t:Home"  -->
 </xsl:template>

 other templates...
----------------------------------------------

1, With this stylesheet, I can't get the page "Home".  of course,
It's no problem if I change the select in the template to be:
select="t:Home"

2, If I change the value of 'target' to be: "'t:Home'",
it failed to transform for "Reference to parameter 'target' must evaluate to
a
node list".

3, If I change the value of 'target' to be: "'Home'", and write the select
as:
select="t:$target" , it came a expression error( expected token 'eof' found
':') .

I don't know how to solve it.

Regards,

Qinghui





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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.