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

saxon:assign and xsl:result-document

Subject: saxon:assign and xsl:result-document
From: "Richard Lewis" <richardlewis@xxxxxxxxxxxxxx>
Date: Fri, 28 Jan 2005 11:19:39 +0000
saxon assign
Hello XSL list,

I'm doing some transformations with Saxon (8.2B) from XML to SVG.

My stylesheets produce two output documents: one is a small HTML file
which includes a link to the (rendered) SVG and the SVG result (which is
the bulk) is generated through a named template and the
xsl:result-document element.

Because my SVG file includes quite a bit of variable text (i.e. the text
layout is dependent of the quantity of text) and because SVG has no
automatic 'wrapping' facility, I'm trying to use a global variable
called 'currentY' to keep track of the current position in the Y axis
while the SVG is being produced.

I'm using the saxon:assign instruction to alter the currentY variable as
necessary but it doesn't seem to be working: the <saxon:assign
name="currentY" select="$currentY+20" /> 'element' just appears in the
resultant SVG file but the variable is not altered.

I've got this:
<xsl:stylesheet xmlns:xsl="..." xmlns:saxon="http://saxon.sf.net"
version="2.0">
<xsl:output name="svg" method="xml" doctype-public="..."
doctype-system="..." />
<xsl:variable name="currentY" select="0" saxon:assignable="yes" />
....
<xsl:template name="generate-svg">
<xsl:result-document href="...svg" format="svg">
<svg x=".." ... extension-element-prefixes="saxon">
....
<saxon:assign name="currentY" select="$currentY+20" />
....

Any ideas what might be wrong?

Cheers,
Richard
-- 
  Richard Lewis
  richardlewis@xxxxxxxxxxxxxx

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.