|
Subject: [xsl] Param with namespace problem! From: "Qinghui Zeng" <zengqh@xxxxxxx> Date: Thu, 20 Jun 2002 14:45:54 +0200 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] XSLT Table defination Que, Braumuller, Hans | Thread | Re: [xsl] Param with namespace prob, David Carlisle |
| [xsl] XSLT Table defination Questio, Mehul Kishor Mehta | Date | Re: [xsl] Param with namespace prob, David Carlisle |
| Month |