Re: [XSL-FO] Xalan problem with xsl:param
- At 2002-09-10 08:29 +0000, splifke wrote:
>"javax.xml.transform.TransformerException: xsl:param is not allowedI suspect you have a basic misunderstanding about parameters. They only
>in this position in the stylesheet!
> at org.apache.xalan.processor.StylesheetHandler.error
>This error is produced on code like this (the xsl:param definition in
>the templates is the problem):
> <xsl:if test="caption">
> <fo:table-caption xsl:use-attribute-sets="table.data.caption">
> <fo:block start-indent="0em">
> <xsl:apply-templates select="caption"/>
> <fo:table xsl:use-attribute-sets="table.data" >
> <xsl:param name="frame">
parameterize either template rules or the entire stylesheet ... they cannot
parameterize a portion of the stylesheet.
If you are just trying to set $frame and $rule, then use <xsl:variable>
which is allowed pretty well anywhere in a template rule.
><xsl:template name="table.frame_rules">These are improperly named XSLT instructions ... they should be <xsl:param>.
> <xsl:param-variable name="frame"/>
> <xsl:param-variable name="rule"/>
>What I do not understand is how to pass parameters if the previousUnfortunately, your example isn't valid.
>example is not valid.
>I found similar examples on several sites (forI could not find your use of these instructions on that page ... I think
Bob has it all right on that page, and knowing Bob he would get it right as
he is good at what he does.
> On theI feel you have been misinformed.
>contrary I found out that the xsl:param tag is only allowed within
>xsl:stylesheet and xsl:transform.
>Does anybody know how I can pass parameters from templates to otherCheck again what Bob has to say ... it looks fine to me.
>templates without producing an invalid xsl-file?
I hope this helps.
Upcoming hands-on in-depth Europe: Sep 18-Sep 20,2002
XSLT/XPath and XSL-FO North America: Sep 30-Oct 4,2002
G. Ken Holman mailto:gkholman@...
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6 Definitive XSLT and XPath
ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1 Practical Formatting Using XSL-FO
XSL/XML/DSSSL/SGML/OmniMark services, books (electronic, printed),
articles, training (instructor-live,Internet-live,web/CD,licensed)
Next public training: 2002-09-11,13,18,19,30,10-03,12-08