As referred to in our paper at SVG Open 2004 (Adaptive layout using one-way constraints in SVG), below are links to the full implementations of the widget example from section 6 in both SVG+RCC/script and CSVG+RCC/XSLT.
Note that in the RCC/script version, there are a number of workarounds for bugs in ASV6pr1, notably the getBBox() method not working at shadow tree generation time.