Philip Nye wrote: > This is a question about how to use CSS for XXE - it might be just a matter > of standard CSS but I am not sure. > > I have a highly recursive structure in my XML documents using an element > called "property" which can nest to many levels. > > My stylesheet for "property:before" has a large and complex "content:" > declaration (36 lines) based on the values of quite a few attributes. > Included in this content is a hierarchical counter which I want to reflect > the level of nesting. e.g: > > Property 1 > Property 1.1 > Property 1.2 > Property 1.2.1 > Property 2 > > etc. > > At present I have simply copied the entire content declaration multiple times > for "property", "property>property", "property>property>property" and so on > and then just changed the counter declaration within each one. This is > desperately inefficient and gives rise to all sorts of errors. > > Is there a way to declare the content just once and then modify just the > counter part according to the nesting depth?
Currently no, but we are really aware of this problem. Generated content should be modular and reusable. We'll almost certainly solve this problem in one of the future releases. Currently, the only elegant way to solve the problem would be to write your own flavour of ``smart counter'' in Java[tm]. See http://www.xmlmind.com/xmleditor/_distrib/docs/dev/ar01s08.html If you are a XPath wizard, you can also play with label(). See http://www.xmlmind.com/xmleditor/_distrib/docs/csssupport/ch05s23.html (Not sure that this can be done with an XPath expression.)

