Subject: RE: The DSSSList Digest V3 #125 From: "Weininger, Nicholas (MN65)" <weininger_nicholas@xxxxxxxxxxxxxxxxx> Date: Thu, 29 Jul 1999 08:13:04 -0500 |
Date: Thu, 29 Jul 1999 09:41:33 +0300 From: "joseph, Gershon" <Gershon_joseph@xxxxxxxxxxxxx> Subject: RE: Changing the value of a variable My problem occurs with table and figure numbering. These can occur inside <chap>, <sect1>, <sect2>, or <sect3> elements. If I use either child-number or ancestor-child-number, I get the number of elements inside the current parent element. This means that the first table in every <sect1>, <sect2>, and <sect3> is numbered 1-1, instead of running continuously until the next <chap> (1-1, 1-2, 1-3, etc.). I need the number of elements inside the <chap> element. Perhaps I could use the element-number-list procedure, though it is not clear to me how to use it. How do people generally generate numbering when the numbering has to be reset when a particular element is encountered? Gershon DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist ------------------------------ The Modular DocBook Stylesheets' (component-number) routine solves a somewhat similar problem; perhaps the scheme (pun intended :-)) used there could apply to your situation. Basically, in order to find the correct number for an element, it walks up the ancestor tree until it finds the appropriate "restart element" (in your case, <chapter>), then expands the children of that restart element, ignoring elements on an "ignore list." Then the element you want to number should be in that child list. So if you put sect1, sect2, sect3, etc. on the "ignore list", got an expand-children list of your chapter element, and filtered out the table elements with select-elements, that should give you proper table numbering. I've used this method to make some of my extensions to DocBook get numbered the way I want them to be. The above explanation is perhaps a bit confusing; the actual code is clearer. Get the stylesheets and look for (component-number) in /docbook/common/dbcommon.dsl. Hope this helps, Nick Weininger weininger_nicholas@xxxxxxxxxxxxxxxxx DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: Embedded graphic in RTF, Tony Graham | Thread | DSSSL SGML declaration, joseph, Gershon |
RE: Embedded graphic in RTF, joseph, Gershon | Date | Re: Appending path to a filename re, Thomas Lockhart |
Month |