basically the story is this..
im working with an xml code fragment as follows
(This is just a brief segment of the code I have in xml file.)
I am using an xsl file to apply templates to the xml file.
I want to add a label to my tables i.e. Table 1.1 based on the chapter number and the associated table number.
Basically what I need to know is how I can access the attribute "number" in the chapter element using xpath?
My template file will be something like
I tried it as something like //chapter/@number but this kept returning the value "1" to me even though the figure I was studying was actually located in chapter "2"
Any help on this would be great!
Cheers
im working with an xml code fragment as follows
Code:
<chapter number="1">
<section>
<table number="1">
...
<chapter number="2">
<section>
<table number="1">
...
<
(This is just a brief segment of the code I have in xml file.)
I am using an xsl file to apply templates to the xml file.
I want to add a label to my tables i.e. Table 1.1 based on the chapter number and the associated table number.
Basically what I need to know is how I can access the attribute "number" in the chapter element using xpath?
My template file will be something like
Code:
<xsl:text>Table</xsl:text>
<xsl:value-of select"xpath_expression1_goes_here" />
<xsl:text>.</xsl:text>
<xsl:value-of select"xpath_expression2_goes_here" />
I tried it as something like //chapter/@number but this kept returning the value "1" to me even though the figure I was studying was actually located in chapter "2"
Any help on this would be great!
Cheers