thanks for your suggestion, but I have already found a solution to this issue.
Peter On 23 Mar 2004, at 06:11, Derek Hohls wrote:
Peter
Your question is not altogether clear; it seems you are already creating an SVG tag that has a dynamic height and width in this part:
<xsp:element name="svg"> <xsp:attribute name="width"><xsp:expr>svgWidth</xsp:expr></xsp:attribute> <xsp:attribute name="height"><xsp:expr>svgHeight</xsp:expr></xsp:attribute>
Can you not use the same approach for the first SVG tag; simply move the <xsp:logic> block to before this first tag...
Derek
[EMAIL PROTECTED] 2004/03/22 09:56:14 AM >>>Hi, I have been trying to resolve an issue with how to make an opening svg
tag dynamic, in terms of the width and height, and wondered if you have
an suggestions. I have an xsp page which spits out an svg as so:
<xsp:structure> <xsp:include>test.ArtistImages</xsp:include> </xsp:structure>
<svg width="x" height="x" x="0" y="0"> <xsp:logic> ........... Code .................... int svgWidth = Integer.parseInt(<util:get-sitemap-parameter name="svgWidth"/>); int svgHeight = Integer.parseInt(<util:get-sitemap-parameter name="svgHeight"/>); </xsp:logic> <!-- spit the image back to the browser requester --> <xsp:element name="svg"> <xsp:attribute name="width"><xsp:expr>svgWidth</xsp:expr></xsp:attribute> <xsp:attribute name="height"><xsp:expr>svgHeight</xsp:expr></xsp:attribute> <xsp:attribute name="viewBox">0 0 <xsp:expr>svgWidth</xsp:expr> <xsp:expr>svgHeight</xsp:expr></xsp:attribute> <xsp:element name="image"> <xsp:attribute name="x">0</xsp:attribute> <xsp:attribute name="y">0</xsp:attribute> <xsp:attribute name="border">0</xsp:attribute> <xsp:attribute name="width"><xsp:expr>imgWidth</xsp:expr></xsp:attribute> <xsp:attribute name="height"><xsp:expr>imgHeight</xsp:expr></xsp:attribute> <xsp:attribute name="xlink:href">data:image/jpeg;base64,<xsp:expr>base64</xsp:expr></
xsp:attribute> </xsp:element> </xsp:element> </svg>
What I need to be able to do is to construct the opening svg tag by pulling in the values of svgWidth and svgHeight. So for example:
<svg width="svgWidth" height="svgHeight">
How would I go about doing this in this instance?
Peter
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
