Hello!
I want to have the position of an svg element calculated by the
rendering application (Batik). E.g. consider the following document
<svg id="svg-root" width="100%" height="100%" viewBox="0 0 80 60">
<g transform="translate(10,30)">
<text x="0" y="0">one</text>
<text x="number(../text[1]/@textLength())" y="0">two</text>
</g>
</svg>
Batik (Squiggle) gives me the following error: "The attribute 'x' of the
element <text> is invalid"
Now my questions are:
A) Is the above document a legal SVG document? I.e. does SVG 1.1 allow
functions (which are defined by XPath) to be evaluated to yield the
actual value of an attribute or do all attribute values have to be given
as explicit, literal numbers?
B) If this is a legal document, is this a bug in Batik?
C) If this is not a legal document, is there some way to accomplish what
I want? I.e. is there some way to determine the length of one text
element and have the position of another text element depend on it?
Please do not tell me that I could use
<text><tspan>one</tspan><tspan>two</tspan></text> to place the two
strings after each other - I know that.
All documentation on "scripting" I could find was connected with
animation or event-handling. Note, that I am trying to do neither here.
Thanks for any advice,
Felix Breuer
--
Felix Breuer <[EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]