xsl-list
[Top] [All Lists]

RE: RE: Numbered Elements

2003-05-05 07:31:13
-----Original Message-----
From:     "Jack Cane" <jwcane(_at_)enw-ltd(_dot_)com>
Sent:     Sun, 4 May 2003 22:54:11 -0400
To:       <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject:  RE: [xsl] Numbered Elements

I anticipate at least three numbered elements: equations, figures, > and 
tables. I believe that I will want to refer to one of them at
a time, or (in a front-matter table) to all of those of one kind,
in order of their numbers.

Both cases will require the values of two attributes: that of 
the etd:RefElemType, and of the element number (in this case, 
the equation number). In the second case the caption of the 
figure or equation, or the table title will also be required.


I understand you to say that you will want three templates for these three 
elements: equations, figures, and tables. With each of these three you will 
want to do something with the "etd:RefElemType" and the "number" attributes 
(note that "number" is in the document's default namespace). It isn't clear 
what you ultimately want to do with the value of these attributes. All of your 
template examples get to a point where they "apply-templates" and we never see 
what those templates are supposed to output.

I think you are also saying that you will want to process these elements twice, 
once for a "front-matter table" and a second time which you haven't described. 
In order to do this you will have to have two templates for each element you 
want to process twice. Each template will have a "mode" attribute which is how 
the processor can distinguish between them. Then when you "apply-templates" you 
will add a "mode" attribute that will tell the processor which template you 
want to use for the match. So, for example, you will use an attribute like this 
"mode='front-matter'":

<xsl:template match="etd:xRef" mode="front-matter">
 ...
</xsl:template>

will be processed when you "apply-templates" like this:

<xsl:apply-templates select="..." mode="front-matter" />


-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>