[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Numbered Elements

Subject: RE: Numbered Elements
From: "Jack Cane" <jwcane@xxxxxxxxxxx>
Date: Sat, 3 May 2003 23:56:32 -0400
jack cane
Please note, in the xRefType declaration the second line should read:
<xs:attribute name="RefElemID" thpe="xs:IDREF"/>

jwc

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Jack Cane
Sent: Saturday, May 03, 2003 9:22 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Numbered Elements

Charles,

I may be missing something important here. Let me try again.

First, the schema declaration:

<xs:complexType name="xRefType">
<xs:element name="RefElemID" type="xs:IDREF"/>
</xs:complexType>

Next, the invocation in xml source:

as shown in Equation <xRef>
<RefElemID> FirstSum </RefElemID>
</xRef>,

Finally, what I think is the xRef template. In the meantime, I added the
"key" definition suggested by Michael Kay in his reply in this thread:

        <xsl:key name="kEqn" match="Equation" use="Target" />
        <xsl:template match="etd:xRef">
                <xsl:apply-templates select="key('kEqn', etd:RefElemID)"/>
        </xsl:template>

This is still not working correctly. I do not see the equation number, using
this template.

in place of (my earlier template for xRef)

<xsl:template match="etd:xRef">
     <xsl:apply-templates select="number[@Target='etd:RefElemID']" />
</xsl:template>]

tks,

jwc


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of cknell@xxxxxxxxxx
Sent: Saturday, May 03, 2003 9:13 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: RE:  Numbered Elements

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:  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:  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



 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
  • RE: Numbered Elements, (continued)
    • cknell - Sat, 3 May 2003 09:43:19 -0400 (EDT)
      • Jack Cane - Sat, 3 May 2003 12:01:04 -0400 (EDT)
    • cknell - Sat, 3 May 2003 20:12:58 -0400 (EDT)
      • Jack Cane - Sat, 3 May 2003 21:22:00 -0400 (EDT)
        • Jack Cane - Sat, 3 May 2003 23:56:08 -0400 (EDT) <=
    • cknell - Sun, 4 May 2003 09:25:11 -0400 (EDT)
      • Jack Cane - Sun, 4 May 2003 15:56:47 -0400 (EDT)
    • cknell - Sun, 4 May 2003 22:27:00 -0400 (EDT)
      • Jack Cane - Sun, 4 May 2003 22:54:13 -0400 (EDT)

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.