Subject: RE: RE: [xsl] Numbered Elements From: cknell@xxxxxxxxxx Date: Sat, 03 May 2003 20:12:34 -0500 |
Sorry, Jack. I see two templates here, but not an actual example of an "etd:xRef" element. -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: "Jack Cane" <jwcane@xxxxxxxxxxx> Sent: Sat, 3 May 2003 12:01:27 -0400 To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: [xsl] Numbered Elements See >>> below. -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of cknell@xxxxxxxxxx Sent: Saturday, May 03, 2003 10:43 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Numbered Elements > -----Original Message----- > From: "Jack Cane" <jwcane@xxxxxxxxxxx> > > Now I need to refer to an element by number. > > The Transform template of xRef is > <xsl:template match="etd:xRef"> > <xsl:apply-templates select="number[@Target='etd:RefElemID']" /> > </xsl:template> > >Please show us the namespace declarations from your stylesheet and provide an example of an "etd:xRef" element. >>>Stylesheet namespace declarations are: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:etd="http://enw-ltd.com/namespace" xmlns:xi="http://www.w3.org/2001/xinclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >It appears from your template for this element that you are trying to select those "number" elements (which doesn't appear to be in the "etd" namespace), >>> Auto-numbering is applied to the Equation template: <xsl:template match="etd:Equation"> <p> <table> <tr> <td width="557"> <xsl:apply-templates select="etd:Expression" /> </td> <td width="63" align="right"> (<xsl:number level="any" format="1" /> <xsl:apply-templates select="xsl:Number" />) </td> </tr> </table> </p> <p></p> </xsl:template> I added the xsl: prefix to the Number reference in the template for xRef, thus: <xsl:template match="etd:xRef"> <xsl:apply-templates select="xsl:Number[@Target='etd:RefElemID']" /> </xsl:template> but it does not return the number. >which have a "Target" attribute whose value is the string 'etd:RefElemID'. Is this correct? >>> Yes, correct. "Target" is of type ID, and RefElemID is of type IDREF. -- Charles Knell cknell@xxxxxxxxxx - email XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list tks, jwc XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Numbered Elements, Jack Cane | Thread | RE: [xsl] Numbered Elements, Jack Cane |
[xsl] Comparing comma seperated str, Girish Savadatti | Date | RE: RE: [xsl] interactive XSLT, cknell |
Month |