List Info

Thread: RE: White space in fo question




RE: White space in fo question
user name
2007-09-06 10:08:09
Dave,

Thanks; yes, I have been using XSL 1.0 in this case, though
the code you pointed me to using XSL 2.0 is a neat example.

But, actually, I may have been unclear in my description
of what I'm trying to do.  I'm trying to take a docbook
document and use the docbook fo stylesheets and fop to
generate a pdf, not text, that has the characteristics
described below (re-reading my post, I can see that's
not clear).

Since I'm willing to have the author insert the two spaces
between sentences, I think the main question is whether
there is a combination of parameters/attributes that would
preserve all spaces except those at the beginning of the
line in wrapped contexts (like para).

Thanks very much,
Dick

> -----Original Message-----
> From: Dave Pawson [mailto:davepdpawson.co.uk] 
> Sent: Thursday, September 06, 2007 12:53 AM
> To: Dick Hamilton
> Cc: docbook-appslists.oasis-open.org
> Subject: Re: [docbook-apps] White space in fo question
> 
> 
> Dick Hamilton wrote:
> > I've been playing around with the various white
space attributes
> > trying, with no success so far, to achieve the
following with fo:
> > 
> > Given the following input text (I've replace the
space character
> > with '^' to make things clearer):
> > 
> > <para>
> > ^^^^Now^is^the^time.^^Here^is^the^place.^^
> > ^^^^There^is^the^problem.^^Way^out^there
> > ^^^^is^the^solution.
> > <para>
> > 
> > I'd like to get the following output using a
monospace font 
> (Courier):
> > 
> > Now^is^the^time.^^Here^is
> > the^place.^^There^is^the
> > problem.^^Way^out^there^is
> > the^solution.
> > 
> > Note that the two spaces between each sentence
have been preserved,
> > the text has been wrapped, and the indentation in
the 
> source has been
> > ignored.
> 
> For once CSS has this feature!
> Guessing you mean in earlier processing?
> 
> 1. http://www.dpawson.co.uk/xsl/rev2/regex2.html#d17364e181

> Convert to isolated lines.
> Normalize each line
> Replace .^ with .^^ within each line.
>   (or perhaps one of the other 'spaces', probably
&#xa0; easiest)
> Merge together.
> 
> 
> 
> 
> 
> 
> regards
> 
> -- 
> Dave Pawson
> XSLT XSL-FO FAQ.
> http://www.dpawson.co.uk

> 



------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: White space in fo question
user name
2007-09-06 11:00:36
Dick Hamilton wrote:

> But, actually, I may have been unclear in my
description
> of what I'm trying to do.  I'm trying to take a
docbook
> document and use the docbook fo stylesheets and fop to
> generate a pdf, not text, that has the characteristics
> described below (re-reading my post, I can see that's
> not clear).

I gathered the end product was pdf... just that the
processing is needed first? Either one or many para
elements.
The rest can go through on the identity transform,
unchanged?



> 
> Since I'm willing to have the author insert the two
spaces
> between sentences, I think the main question is
whether
> there is a combination of parameters/attributes that
would
> preserve all spaces except those at the beginning of
the
> line in wrapped contexts (like para).

No, but I wouldn't expect it to be a param issue?
It's a minor tweak on the way through to print (IMHO).

source->xslt2->docbook Source
->stylesheets->fop->pdf



regards

-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk


------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )