[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] saxon:assign and xsl:result-document
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|