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

RE: Xref numbering test

Subject: RE: Xref numbering test
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 16 Dec 2003 14:34:51 -0500
RE:  Xref numbering test
Norma,

At 07:14 AM 12/16/2003, you wrote:
Thanks for reply but maybe I didn't make want I want clear.
The xref has a xidtype of step but my elements are step1 step2 step3.
I need to know whether the step is a step1 or step2 etc. in order to
number it correctly.

If you have distinct templates for each type of step:


<xsl:template match="step1" mode="xref">
  Numbering for step1...</xsl:template>

<xsl:template match="step2" mode="xref">
  other numbering for step2...</xsl:template>

all you need to do is select the target node of your xref (using id() or key(), the same way you would do if there were only one type of target) and apply templates to it in this mode. The templates will sort out which one is which, without having to test explicitly (the template matching does the testing) -- all you need is the correspondence between @xrefid in the xref and @id (or whatever) on the target node.

I'm sorry this was not made clearer in my post.

Also, xsl:number provides support directly for hierarchical numbering a la "1.4.2": you might want to look into this further if you aren't aware of it already (why reimplement it?).

Cheers,
Wendell

<xref xrefid="step1-10" xidtype="step"></xref>

The xrefid includes the step level a dash and increments
If I could test the id or test the element being referenced then I could
proceed.


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

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.