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

Re: More XSL Discussion

Subject: Re: More XSL Discussion
From: Norman Walsh <norm@xxxxxxxxxxxxx>
Date: Thu, 26 Feb 1998 07:39:39 -0500
xsl display more text output
/ Sean Mc Grath <digitome@xxxxxx> was heard to say:
[...]
| Real World Example:
[...]
| Part : Introduction
|  Chapter : The Foo Manual 
|   Section : Introduction
|    1. The Foo Manual is a work of epic proportions...in the future.
| 
| The report contains all title information for the major structural
| elements along with the first 10 and last 10 words of each numbered
| paragraph. This report is used by the client to ensure that
| their (Lotus Notes) database version of the data has all right bits
| in all the right places.
[...]
| I would like to use XSL for that. I do not mind, if, to achieve
| it, I need to consider the output as "wrapped" is a single
| output flow object called PlainText or something but I would
| sure like to be able to do it!

This seems to be a perfectly reasonable problem to tackle with a
stylesheet, but I don't see why you need to do it with
"println()" statements to output the titles.

<rule>
  <element type="chapter">
    <target-element type="title">
  </element>

  <paragraph start-indent="1pi">
    <text>Chapter : </text>
    <children/>
  </paragraph>
</rule>

The only wrinkle at the moment is grabbing the first and last
ten words out of the paragraphs.  XSL needs to be able to do
this, but I don't think we've figured out how yet.

| Please don't tell me that report writing to plain text
| in XSL will only be possible using proprietary XSL
| extensions:-(

Ah, plain text.  Well, there are two ways of looking at that.
One way is that the actual creation of the plain text output,
just like the creation of pixels on a display or ink on paper,
is the job of an XSL processing application.  The other way is
that XSL ought to natively support plain text output.

In the former view, the stylesheet fragment above is perfectly
acceptable.  The application should turn that paragraph into

    Chapter : the title

From the other view, we'd need to have something in XSL to do this.
I think that

  <text>  Chapter : <children/></text>

might do it, except that I don't see how to conveniently include
the linebreak that is desired after the line of text.  I guess

  <text>  Chapter : <children/>
</text>

would do it, but I'm not a big fan of semantically significant
whitespace.

| I want to generate *plain text*. I want to ditch my proprietary
| ad hoc apparatus for achieving traversal and specifiying context
| with the lovely stuff XSL provides.
| 
| Unreasonable?

Nope.

                                        Cheers,
                                          norm
-- 
Norman Walsh <nwalsh@xxxxxxxxxxxxx> | When they took the fourth
Senior Application Analyst          | amendment, I was quiet because I
ArborText, Inc. (www.arbortext.com) | don't deal drugs. When they took
413.549.3868 Voice/FAX              | the sixth amendment, I was quiet
                                    | because I'm innocent. When they
                                    | took the second amendment, I was
                                    | quiet because I don't own a gun.
                                    | Now they've taken the first
                                    | amendment and I can't say
                                    | anything at all.


 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.