Hi Maya,
As I said, on the surface, it appears to be a bug. However, there is no
way anyone can verify this without a minimal, complete stylesheet and set
of inputs files. Why do you think the definition of the variable "RuleSet"
is an issue? It looks fine to me. Is there an error from Xalan regarding
that variable?
Dave
|---------+--------------------------->
| | "Maya Widyasari"|
| | <Maya.Widyasari@|
| | Siebel.com> |
| | |
| | 03/25/2004 01:13|
| | PM |
| | Please respond |
| | to xalan-c-users|
|---------+--------------------------->
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: [email protected]
|
| cc: (bcc: David N Bertoni/Cambridge/IBM)
|
| Subject: RE: Question on syntax error on Xalan that works on MSXML
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
Thank you for the input.
I forget to point out that RuleSet is retrieved from xml doc. Is this a
valid thing to do? Or is there a way around this?
Just to recap, it is working fine with MSMXL but I keep getting this error
in XalanC: XSLT
error: The variable 'ActiveBO' is not defined, source tree node: FIELD (
file:///D:\OnDemandXSLT\Step1.xsl, line 178, column 174).
<xsl:variable name="RuleSet" select="document('D:\Rule2.xml')"/>
<!-- Main Template Rules -->
<xsl:template match="/TXNS">
<xsl:variable name="ActiveBO">Test</xsl:variable>
<xsl:element name="TXNS">
<xsl:apply-templates
select="$RuleSet//[EMAIL PROTECTED] = $ActiveBO]" mode="GetSrcField">
</xsl:apply-templates>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
Thank you
Maya
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 11:49 AM
To: [email protected]
Subject: Re: Question on syntax error on Xalan that works on MSXML
Hi Maya,
On the surface, that would appear to be a bug. Can you reduce it to a
simple test case and create a Bugzilla report? That's the best way to get
a problem resolved.
By the way, since you are just starting out with XSLT, let me point out
something you are doing that's not necessary. This definition of
xsl:with-param creates a result tree fragment:
<xsl:with-param name="Field"><xsl:value-of
select="@Name"/></xsl:with-param>
This defintion creates only a string, which is far more efficient:
<xsl:with-param name="Field" select="@Name"/>
You should avoid creating an instance of xsl:variable, xsl:with-param, or
xsl:param with xsl:value-of as the only child, because it's usually more
expensive than the corresponding string version.
Thanks!
|---------+--------------------------->
| | "Maya Widyasari"|
| | <Maya.Widyasari@|
| | Siebel.com> |
| | |
| | 03/25/2004 11:30|
| | AM |
| | Please respond |
| | to xalan-c-users|
|---------+--------------------------->
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: [email protected]
|
| cc: (bcc: David N Bertoni/Cambridge/IBM)
|
| Subject: Question on syntax error on Xalan that works on MSXML
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
Hi,
I am trying to run this code in Xalan 1.7, but I keep getting error: XSLT
error: The variable 'ActiveBO' is not defined, source tree node: FIELD (
file:///D:\OnDemandXSLT\Step1.xsl, line 178, column 174). However, this is
working fine in MSXML.
Any tips or pointer?
<xsl:template match="TEST/OPERATION/FIELDS/FIELD" mode="GetErrorFieldRule">
<xsl:param name="ActiveBO"/>
<xsl:param name="ActiveBC"/>
<xsl:variable name="ErrorField">
<xsl:apply-templates select="$RuleSet//[EMAIL PROTECTED] =
'CreateErrorNotification']/[EMAIL PROTECTED] = $ActiveBO]/[EMAIL PROTECTED] =
$ActiveBC]/SRCFIELDS/SRCFIELD" mode="GetSrcField">
<xsl:with-param name="Field"><xsl:value-of
select="@Name"/></xsl:with-param>
</xsl:apply-templates>
</xsl:variable>
<xsl:value-of select="count(msxsl:node-set($ErrorField)//SRCFIELD)"/>
</xsl:template>
Any help will be appreaciated, this is my first day learning XSLT.
Thank you
Maya