xsl-list
[Top] [All Lists]

saxon:assign and xsl:result-document

2005-01-28 04:19:39
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(_at_)fastmail(_dot_)co(_dot_)uk


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>