Re: [xsl] markup of number next to character

Subject: Re: [xsl] markup of number next to character
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 06 Aug 2001 15:32:36 -0400
Hi Jim,

At 12:09 PM 8/6/01, you wrote:
I have notes with some missing markup (accented letters added back for
clarity)

<fn><fnref>1.1-3</fnref> Ou Quando Deus come?ou a criar os c?us e a
terra 2sendo a terra ..., 3disse Deus: ...</fn>

I to transform to:
<fn><fnref>1.1-3</fnref> Ou Quando Deus come?ou a criar os c?us e a
terra <verseNumber>2</verseNumber>sendo a terra ...,
<verseNumber>3</verseNumber>disse Deus: ...</fn>

Is this problem easily fixed by XSLT?

In a word, no. It is fixed by XSLT, but only with difficulty.


It is easily fixed with older tools but I am trying to see where the
limits are to XSLT.

The "older tools" you speak of -- may they be very long-lived! -- are probably working with a data model that includes such notions as "string" and "character", and almost certainly have at their disposal such techniques as regular expressions for string matching. Although XSLT can work with strings, it is fairly limited in that regard, having no notion of "character" except insofar as that is implicit in strings, string indexing, such functions as translate(), and so forth. XSLT processors are happiest working with sets of (element, attribute and text) nodes.


Another way of looking at it is that you have to parse your input according to a set of rules unique to this data set. XSLT is very strong once the parsing of markup has already happened and it has structured data (in its own data model) ready to hand. It's not very good for writing parsers.

Regards,
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