- From: Cameron McCormack <cam-www-svg@aka.mcc.id.au>
- Date: Tue, 9 Mar 2004 09:54:38 +1100
- To: www-svg@w3.org
Hi Jan. Jan-Klaas Kollhof: > I really would like to see XPath in attributes. > > <rect x="id('someElem')/@width + 10" ...> > > I implemented some workaround in JS wich works > similar: > > <rect x="10" constrNS:x="id('theOtherRect')/@width - > 50" width="40" height="30" y="10" /> > > It is a quite simple impl. and only tries to show > the concept and how it could be managed with JS. > > http://jan.kollhof.net/projects/svg/examples/constr.svg > > It works in ASV6 and Batik, it should work in all > viewers which support DOMAttrModified events. Nice work! I'm just starting work on a full CSVG implementation in SVG 1.1 + script. I think some things won't be possible (for example, there's no way of getting at animation events except maybe by having a timer that continually checks SVGAnimated*.animVal for changes) but it should be possible to do most things. How slow an XPath evaluator in script would be is another question I'm interested to find the answer to. :-) Cameron -- Cameron McCormack | Web: http://mcc.id.au/ | ICQ: 26955922
Received on Monday, 8 March 2004 17:54:51 UTC