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

Re: Using saxon:assign and testing content of variable

Subject: Re: Using saxon:assign and testing content of variable
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 20 Sep 2005 22:43:35 +0100
saxon assign
> First what is the proper way to reset the variable to be empty and 
> hopefully no nodes in the node-set? Does a simple <saxon:assign 
> name="pageNumber"/> do it?

ther's no "proper" way to reset a variable in a functional
language saxon:assign really cuts across the whole declarative language
paradigm and really once you use something like that you aren't really
using XSLT at all.

However I don't understand your comment

> What I'm at a loss for is the proper test in the <choice> to see if there 
> is content in $pageNumber.

You don't need to test this you know exactly the content of the variable
                               <fo:leader leader-pattern="dots" 
leader-length="1in" />
                               <fo:basic-link 
internal-destination="{generate-id()}">
                                     <fo:page-number-citation 
ref-id="{generate-id()}" />
                                </fo:basic-link>

so it is a result tree fragment corresponding to those elements.

I can't really tell from the small fragment that you posted but I
suspect that you are trying to get XSLT to process page numbers and
other values calculated by an FO engine. That never works,the XSLT
process does not know _anything_ about XSLFO and XSLFO does not know
_anything_ about XSLT. As far as the xslt is concerned there is nothing
special about  <fo:page-number-citation>  it could just as well be
<jhgifgi> it's just an element node in a result tree. XSLT has to
construct the entire FO document to be processed and teh XSLT
transformation finishes before the FO engine starts.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.