Re: [xsl] Adding structure to text nodes

Subject: Re: [xsl] Adding structure to text nodes
From: "Simon Kelly" <kelly@xxxxxxxxxx>
Date: Thu, 20 Mar 2003 08:21:27 +0100
Ok Cams,  I see your problem a bit clearer now.  Let me just run quickly
through your problem as I see it.

You will have within your xml documents, sections of "un-formatted" text of
the varity LONG.  You wish to do a transformation on the whole of the xml
doc, but when you reach the long tags, you want to format that raw text in a
specific manner.

If this is the case, none of the solutions posted are going to be of any use
to you. The options open to you are:

The raw text in the LONG is formatted (by hand or by pre-processing using
the next option) during the construction of the xml page and you use the
xml:space="preserve" to keep it as it is. But I don't think that's what your
looking for, and will restrict the way you can create you original xml file
anyway.

You run the xslt output through a post-process using a text formatter.  Now
on unix I'd tell you to use the troff/groff formatters, they are v.powerfull
and have quite a few formatting addons for specific tasks.  The problem is
that a text formatter will format the whole file, so everything outside of
the LONG sections get the treatment as well.  There may be a tag in the
formatter for blocking, but this would then mean the inclusion of formatter
tags in your xslt output.
This also means you will be tying the xslt to another process, making the
whole thing very unportable.

As Wendell said xslt1.0 is not designed for this sort of task, and xsl is
really for processing information and data *not* specifically for formatting
text.

Sorry there is no ready solution for you, but there are some things you
could consider,

If you need more help, just post!

Cheers

Simon


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


Current Thread