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

XSLT/SVG variables question

Subject: XSLT/SVG variables question
From: "Harry J. Foxwell" <hfoxwell@xxxxxxxxxx>
Date: Sun, 30 Jun 2002 17:31:00 -0400 (EDT)
svg variables
I'm not quite convinced of 'Assignment Considered
Harmful' (Kay, Chap 9) since I can't figure out how to solve my
XSLT/SVG problem without good ol' x=x+y constructs.

My general problem is to create SVG rectangles with text
inside (line numbers included for reference) using XML data and XSLT:

01
02   RectA1                  RectA2
03   +--------------+        +--------------+
04   | string-A1a   |        | string-A2a   |
05   | string-A1b   +--------+ string-A2b   |
06   | ...          |        | string-A2c   |
07   +------+-------+        | ...          |
08          |                +--------------+
09          |
10          |
11          |
12   RectB1 |
13   +------+-------+
14   | string-B1a   |
15   | string-B1b   |
16   | ...          |
17   +--------------+

My XML data generically look something like this:

        <BlockA>
        <string>string-A1a</string>
        <string>string-A1b</string>
        ...
        </BlockA>
        <BlockA>
        <string>string-A2a</string>
        <string>string-A2b</string>
        <string>string-A2c</string>
        ...
        </BlockA>
        <BlockB>
        <string>string-B1a</string>
        <string>string-B1b</string>
        ...
        </BlockB>
        ...

As the block chart is built, I need to account for arbitrary
number of strings per block and number of blocks.  "Normal"
variables would let me compute and increment SVG coordinates
for the rectangles and text.  But XSLT variables aren't normal!

If you have any suggestions about how I should track the
coordinates, or better yet an example, that would be helpful.

Thanks!
Harry Foxwell


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.