RE: RE: [xsl] Numbered Elements

Subject: RE: RE: [xsl] Numbered Elements
From: cknell@xxxxxxxxxx
Date: Mon, 05 May 2003 09:31:13 -0500
> -----Original Message-----
> From:     "Jack Cane" <jwcane@xxxxxxxxxxx>
> Sent:     Sun, 4 May 2003 22:54:11 -0400
> To:       <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> 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">

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

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

Charles Knell
cknell@xxxxxxxxxx - email

 XSL-List info and archive:

Current Thread