Michael,
when I am trying to use <xsl:for-each
select="xsl:node-set($employeeList)/*">
..... </xsl:for-each>
it gives Function not in Namaspace error. And my
namespace declaration is <xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
Can you please suggest which namespace supports this
function.
regards,
Ranjan
--- "Ranjan K. Baisak" <ranjanbaisak(_at_)yahoo(_dot_)com> wrote:
Michael,
You are right. I just went through w3c.org
which states clearly that you cannot use /,// and []
with RTF. I am using XSLT1.0 and as per your
suggestion to use xsl:node-set() and it works fine
with XMLSpy but when I am trying to run in Stylus
Studio, it gives bunch of exception.
Exception calling Java extension: ;
java.lang.ClassNotFoundException:
http://www.w3.org/1999/XSL/Transform; at
com.exln.stylus.CXClassLoader.findClass(CXClassLoader.java:192);
at java.lang.ClassLoader.loadClass(Unknown Source);
at
com.exln.stylus.CXClassLoader.loadClass(CXClassLoader.java:234);
at java.lang.ClassLoader.loadClass(Unknown Source);
-----
But anyway it works
Thanks a lot.
regards,
Ranjan
--- Michael Kay <mhk(_at_)mhk(_dot_)me(_dot_)uk> wrote:
Your variable $employeeList is a result tree
fragment and XSLT 1.0 does not
allow you to use an RTF in a path expression. You
need the xx:node-set()
extension function, or an XSLT 2.0 processor, or
an
XSLT 1.0 processor that
relaxes this rule.
Michael Kay
http://www.saxonica.com/
P.S. You might not be able to make sense of the
error message, but there are
many people on this list who can, and who would be
able to answer your
question more quickly if you quoted it.
-----Original Message-----
From: Ranjan K. Baisak
[mailto:ranjanbaisak(_at_)yahoo(_dot_)com]
Sent: 02 September 2004 14:35
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] for-each loop in node set
variable
gives error
Hello List,
My stylesheet contains following
declarations
declaration 1:
<xsl:variable name="employeeList">
<xsl:for-each
select="//employee/*[name()!='max']">
<xsl:if test="count(key('employee', @id))=0">
<xsl:copy>
<xsl:copy-of
select="property[(_at_)name='cast']/@val"/>
<xsl:copy-of select="@name"/>
<xsl:copy-of
select="property[(_at_)name='language']"/>
</xsl:copy>
</xsl:if>
</xsl:for-each>
</xsl:variable>
declaration 2:
<xsl:variable name="generatedEmployees">
<xsl:for-each select="$employeeList/*">
<xsl:sort select="@val"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:variable>
for-each loop for $employeeList/* in declaration
2
gives error. I don't understand why it gives
error.
Any clue?
regards,
Ranjan
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo!
Enter
now.
http://promotions.yahoo.com/goldrush
--+------------------------------------------------------------------
XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--
--+------------------------------------------------------------------
XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter
now.
http://promotions.yahoo.com/goldrush
--+------------------------------------------------------------------
XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com