[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Assign if-test result value to a variable

Subject: RE: Assign if-test result value to a variable
From: "Levesque, Gary R" <gary.r.levesque@xxxxxxxxxx>
Date: Wed, 27 Jul 2005 13:14:42 -0700
r if
 Thanks for the responses... Still having problems getting this to work

I put the suggested code in place but when I process my xml file using
FOP or XSL Formatter I get the following error:

C:\FOP>fop.bat -xml revc.xml -xsl main.xsl -pdf revc-1.pdf
[INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser
[ERROR] javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException: javax.xml.transform.Transfo
rmerException: xsl:with-param is not allowed in this position in the
stylesheet!

Here is the code from my main template..

......

<xsl:for-each
select="//ApplicationData/Revision_Record[./RevisionLetter!='NEW']">
	<xsl:sort select="./RevisionLetter" order="ascending"/>
		<xsl:if test="position()=last()">

<!-- This grabs the block of data with the highest associated revision
letter and applies it to the template listed below. What I am attempting
to do is to "bank or store" the value of the highest revision letter in
a variable or param.  I further need to make the value of the variable
available within the "RevisionRecord" template that is being called
below.  -->

			<xsl:call-template name="RevisionRecord"/>
				<xsl:with-param name="revcache"
select="RevisionLetter" />
		</xsl:if>
</xsl:for-each>

.......

The following bit of code is from the template I am calling in
(RevisionRecord). I need to use the value of the variable or param
"revcache" as you can see below.


<xsl:template name="RevisionRecord">
	<xsl:with-param name="revcache" />

......

<fo:table-cell>
<fo:block keep-together="always" orphans="2" space-after="0.0pt"
space-before="45.0pt" display-align="center" text-indent="20.0pt"
white-space-collapse="false" widows="2">
<fo:inline font-family="Arial, sans-serif" font-size="18.0pt"
font-weight="bold">
	<xsl:value-of select="$dataSetNumberLabel"/>
	<xsl:value-of select="$dataSetNumber"/>
	<xsl:value-of select="$revcache"/>
</fo:inline>
</fo:block>

Thanks,
Gary

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.