|
next
|
Subject: Re: Passing Parameter to Templates Author: Minollo I. Date: 16 Jul 2002 02:16 AM
|
The problem is tricky, and in short it's a bug in the Stylus Studio processor.
In your stylesheet you are doing this:
{xsl:apply-templates select="$FormFieldTop"}
....where $FormFieldTop is a document fragment defined as:
{xsl:variable name="FormFieldTop"
select="document('CapFormField.xml')/Form/TableId/Fields"/}
So,the root element in $FormFieldTop is Fields.
You don't have a template rule which matches Fields; so the processor hits
the built-in template rule for "*", which does an apply-templates; which
means that it looks for template rules defined for Fields' children, Field
elements in your case.
You do have a template rule which matches Field elements, it's the one
declared as match="Fields/Field", and you are back into your code.
So, what's the problem? The problem is that built-in template rules are not
supposed to propagate parameters... and even if the Stylus Studio processor
does that, and even if it would probably be a cool feature, it's not part
of the XSLT 1.0 specs... This is the bug in our processor, that we will fix
in the next public update.
In the meanwhile, you can make all processors happy by changing:
{xsl:apply-templates select="$FormFieldTop"}
....into...
{xsl:apply-templates select="$FormFieldTop/Field"}
This way you won't go through the built-in template rule, and things will
work as expected.
Thanks for reporting this,
Minollo
|
|
|