Subject: Numbered Elements
From: "Jack Cane" <jwcane@xxxxxxxxxxx>
Date: Fri, 2 May 2003 21:52:43 -0400
|
Still new to XML/XSLT, I am trying to get my arms around the numbering
methods in XML. Believe I have succeeded in auto-numbering figures,
equations, tables, etc. Now I need to refer to an element by number. From
textbooks and online reading I have the following:
An element Equation of type EquationType:
<xs:complexType name="EquationType">
<xs:element name="Expression" type="xs:string"/>
<xs:element name="Target" type="xs:ID" use="required" />
</xs:complexType>
An element xRef of type xRefType:
<xs:complexType name="xRefType">
<xs:sequence>
<xs:element name="RefElemType" type="xs:string"/>
<xs:element name="RefElemID" type="xs:IDREF"/>
</xs:sequence>
</xs:complexType>
The Transform template of xRef is
<xsl:template match="etd:xRef">
<xsl:apply-templates select="number[@Target='etd:RefElemID']" />
</xsl:template>
Instead of the number of the equation having the indicated target value, the
result is a blank. There are no error messages.
Any help appreciated.
jwc
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- Numbered Elements
- Jack Cane - Fri, 2 May 2003 21:52:16 -0400 (EDT) <=
- <Possible follow-ups>
- cknell - Sat, 3 May 2003 09:43:19 -0400 (EDT)
- Jack Cane - Sat, 3 May 2003 12:01:04 -0400 (EDT)
|
|