RE: [xsl] can I give xsl:number a starting position?

Subject: RE: [xsl] can I give xsl:number a starting position?
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 04 Sep 2002 14:01:21 -0400
Jeff,

At 04:33 AM 9/4/2002, you wrote:
> Basically, my problem is that I have an XML document that's
> been chunked up into smaller pieces. I need to convert each
> of those pieces to HTML separately, with the correct section
> numbers.

Since you're starting with files that have already been chunked, you can't effectively use xsl:number to get your numbers, so you have to manage it some other way. (Neither will position() or counting certain kinds of ancestors be much use, since the document being transformed is not the "document" the numbering needs to be in reference to.)


An alternative, if this is thinkable, is to run the transform over the unchunked document, parameterizing which chunk is to be processed for each run. Since the entire document is available to the transform, the numbering can be in reference to the whole.

An alternative, if your chunking routine is also XSLT (or sometimes even if not) is to provide the numbering in that transformation, and then just pass it through the second step.

Cheers,
Wendell



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