Re: [docbook-apps] db 4.5, table cell widths.

2007-09-05 Thread Dave Pawson

Bob Stayton wrote:

Hi Dave,
I'm not sure that special feature of colgroup is supported in the 
stylesheets.  I had not heard of it.


Can you clarify what your intentions are for minimizing column widths? 
Does minimum mean the width of the cell's content without line breaks, 
or do you want to force line breaks for longer entries to reduce the 
column width?  When it says ...


this attribute allows the special form 0* (zero asterisk) which means 
that the width of the each column in the group should be the minimum 
width necessary to hold the column's contents.


... I interpret this to mean the text width without forced line breaks.



No line breaks. Balanced columns means I have wasted space and I want to
float the table left to fit an image into the space on the right?
Minimised to 'just' fit the text does that.

regards





- Original Message - From: Dave Pawson [EMAIL PROTECTED]
To: Docbook-Apps docbook-apps@lists.oasis-open.org
Sent: Monday, September 03, 2007 6:09 AM
Subject: [docbook-apps] db 4.5, table cell widths.



Using db 4.5 I'm trying to generate smaller widths in the columns

db5 says colgroup width=0* will minimise columns.
colgroup isn't getting me far with 4.5

Using $Revision: 7119 $ $Date: 2007-07-23 02:07:18 +0900 (Mon, 23 Jul 
2007)


How can I specify the column widths, for html output, using the html 
table model please.




regards

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]











regards

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] Noob: Python DocBook to PDF

2007-09-05 Thread Dave Pawson

Michael Hipp wrote:

Anyway, I need to display and print reports as requested by the user and 
also do program-driven printouts with no user intervention. And not make 
a career of it. Simple, right?


So my constraints are:
- Printouts are mostly defined outside of program code (e.g. template 
files)
- Changing data can be inserted into the template processing stream with 
minimal fuss
- Standards-based; some degree of future-proof; minimal dependence on 
single vendor

- Options for various output types (i.e. PDF, web, etc.)
- Mostly written by someone other than me (I've enough to do)
- Without the hood welded shut
- Callable from Python
- Multi-platform (Win  Lin)
- As lightweight and resource stingy as possible
- A visual report designer would be nice, but not a necessity

Mostly I've come down to these options:
1. DocBooks using xsltproc and apache-fop
2. RML using Tiny rml2pdf
3. OpenRpt
4. PythonReports

All of those solutions fail on one constraint or another. Numbers 3  4 
would likely be last resort for various reasons. RML is appealing but 
isn't any kind of standard. DocBooks is a real standard but coupled with 
fop weighing in at 68M it doesn't seem lightweight and the complexity is 
intimidating.



Yes. My view on your compromises needed.

1. If they want it laid out 'just so' then they will kick at docbook.
Docbook has a standard layout with some configuration.
2. Your multi-media requirement should mandate an XML source (suggest 
for templates and source). Need to check that the 'other person' is OK

generating XML.
3. Curious about the 'lightweight' issue. Is the chequeue signer 
ancient? Not normally something people worry about these days unless

it will be running n threads on a laden server.
4. Callable from Python is doable, but don't forget Jython if you need Java.
5. Visual report designer is getting into silly space for this workflow.
There are such tools, but I've no experience of them. 'Paint' the PDF 
you want and map the XML into it.


** Can anyone think of any? 

I can't see Oleg's suggestion of Latex fitting into this mix very 
comfortably, especially the templating side.


I think you could be into some negotiating. Try and find out where
their priorities are?


HTH


regards

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] Adding a PDF bookmark for List of Figures

2007-09-05 Thread Dave Pawson

Bob Stayton wrote:


fo:bookmark internal-destination=toc...{$id}
  fo:bookmark-title
xsl:call-template name=gentext
  xsl:with-param name=key select='TableofContents'/
/xsl:call-template
  /fo:bookmark-title
/fo:bookmark


http://www.w3.org/TR/2004/WD-xsl11-20041216/#fo_bookmark

Just wondering if it is an extension or something from 1.1?


regards

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[docbook-apps] olink generated text question

2007-09-05 Thread Oliver Becker

Hello there,

I've recently started using DocBook and the XSL stylesheets (1.73.1).

To create links between single documents I'm using the olink element. 
Everything works fine except for the link text that is generated.


Since I just want a link to the document as a whole (not to a specific 
element within the document), I don't specify a targetptr attribute, 
i.e. my olink elements look like this:


   olink targetdoc=OtherDoc /.

However, the rendered link (both HTML and FO/PDF) has the text

   Document TitleSection 1Section 2Figure aTable I...

(it seems all titles of the target document have been concatenated)

Is this a bug or a feature?
What is the simplest way to get only the document title rendered as the 
text of the link?


(In case it matters: my documents have lang=de in the root element,
the root element is article, the XSLT processor is Saxon 6.5.5)

Best regards,
Oliver

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] olink generated text question

2007-09-05 Thread Dave Pawson

Oliver Becker wrote:

Hello there,

I've recently started using DocBook and the XSL stylesheets (1.73.1).

To create links between single documents I'm using the olink element. 
Everything works fine except for the link text that is generated.


Since I just want a link to the document as a whole (not to a specific 
element within the document), 


You could use an id for the root element as the target?





regards

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] olink generated text question

2007-09-05 Thread Oliver Becker

Dave Pawson schrieb:

Oliver Becker wrote:

Hello there,

I've recently started using DocBook and the XSL stylesheets (1.73.1).

To create links between single documents I'm using the olink element. 
Everything works fine except for the link text that is generated.


Since I just want a link to the document as a whole (not to a specific 
element within the document), 


You could use an id for the root element as the target?



That works, thanks Dave!

So I suppose using olink without targetptr is not really supported by 
the stylesheets (or it is a droll feature).


Cheers,
Oliver

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [docbook-apps] Styling PDF output

2007-09-05 Thread Johnson, Eric
Bob,
Thanks for point me in the right direction. The body.start.indent will
do most of what I want. I would like the simplesect titles and
bridgeheads to float in the gap between the margin and the start of the
text. From reading your book, it looks like I need to add a template for
simplesect.titlepage to the customization layer to make that happen. Is
this correct?
Cheers,
Eric




From: Bob Stayton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 04, 2007 7:52 PM
To: Johnson, Eric; docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] Styling PDF output


Hi Eric,
I think the DocBook XSL stylesheets do that by default.  The
body.start.indent parameter indents everything, except those elements
with a start-indent=0pt property.  All section heads, including
simplesect and bridgeheads get that property, so they are not indented
along with everything else.
 
Or perhaps I'm not understanding your requirements.
 
Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]
 
 

- Original Message - 
From: Johnson, Eric mailto:[EMAIL PROTECTED]  
To: docbook-apps@lists.oasis-open.org 
Sent: Friday, August 31, 2007 6:51 AM
Subject: [docbook-apps] Styling PDF output

I want to style the pages in my PDF output so that the
paragraph text has a left side gap. I also want simplesect tiles and
bridge heads to appear in the gap. I'm not sure what I need to modify to
make that happen. Any help would be greatly appreciated.
Cheers,
Eric J.



Re: [docbook-apps] olink generated text question

2007-09-05 Thread Dave Pawson

Oliver Becker wrote:


You could use an id for the root element as the target?



That works, thanks Dave!

So I suppose using olink without targetptr is not really supported by 
the stylesheets (or it is a droll feature).



Sorry, don't know Oliver.
But it seems to meet your need and the stylesheets... so.
Anyway it works :-)

Glad to see you using db!


regards

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [docbook-apps] ulink doesn't show as footnote when using XSL-NS Stylesheets

2007-09-05 Thread Ken Morse
I figured out what was happening and attached a patch to the issue in the
bugtracker. When the XSL stylesheets detect a 5.0 document (using
namespace), the stripns.xsl stylesheet converts a link to a ulink if the
link points to an external reference. The XSL-NS stylesheets have no such
conversion so link (in fo/xref.xsl) has been patched to call the ulink
template if the link points to an external reference.

Although I built a patch for the xref.xsl file, I'm not sure this is helpful
since I don't know how the XSL-NS Stylesheets are currently built. If they
are still built by transforming the XSL stylesheets then a special
transformation for link in fo/xref.xsl would need to be added.

Ken


On 8/31/07, Michael(tm) Smith [EMAIL PROTECTED] wrote:

 Ken Morse [EMAIL PROTECTED], 2007-08-31 07:33 -0400:

  Bug is checked in,
 https://sourceforge.net/support/tracker.php?aid=1785519.
  If I learn anything more, or determine a fix, I'll post an update.

 Thanks

  Is there anyway to add XSL-NS as a category in the bug tracker?

 There is a way, but I'm reluctant to do that at this point,
 because it will mean that when we search or run reports for open
 bugs for the stylesheets, we need to run the report against two
 categories instead of just one. For now at least, I think it's
 probably better to just have the XSL and XSL-NS stylesheets
 treated in the same category as far as SF bug tracking goes.

   --Mike




RE: [docbook-apps] Adding a PDF bookmark for List of Figures

2007-09-05 Thread Jeff Powanda
That pretty much did the trick. The only thing I changed was the ID for
List of Figures, which is lot...figure...{$id} instead of
toc...figure...{$id}. Thanks once again for your help.

 

Regards,

Jeff Powanda

 



From: Bob Stayton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 04, 2007 8:35 PM
To: Jeff Powanda; docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] Adding a PDF bookmark for List of Figures

 

Hi Jeff,

Well, you aren't selecting the List of Figures, because it isn't an
element because it is generated.  In fo/fop1.xsl, the template that
matches on book and other elements has these lines that generate the
bookmark for the TOC:

 

  xsl:variable name=toc.params
xsl:call-template name=find.path.params
  xsl:with-param name=table
select=normalize-space($generate.toc)/
/xsl:call-template
  /xsl:variable

 

  xsl:if test=contains($toc.params, 'toc')
and
(book|part|reference|preface|chapter|appendix|article
 |glossary|bibliography|index|setindex
 |refentry
 |sect1|sect2|sect3|sect4|sect5|section)
fo:bookmark internal-destination=toc...{$id}
  fo:bookmark-title
xsl:call-template name=gentext
  xsl:with-param name=key select='TableofContents'/
/xsl:call-template
  /fo:bookmark-title
/fo:bookmark
  /xsl:if

Copy the xsl:if block and change a few things for a list of figures:

 

  xsl:if test=contains($toc.params, 'figure')
and (//figure)
fo:bookmark internal-destination=toc...figure...{$id}
  fo:bookmark-title
xsl:call-template name=gentext
  xsl:with-param name=key select='ListofFigures'/
/xsl:call-template
  /fo:bookmark-title
/fo:bookmark
  /xsl:if

I got the $toc.params value from the $generate.toc parameter in
fo/param.xsl, and changed it to check for the existance of any figure in
the document.  I got the figure list id from the list.of.titles
template in fo/autotoc.xsl.  That template generates all of the List of
... lists.  I got the gentext key from common/en.xml.

 

Hope this works.  I didn't actually test it, so let me know if it does
or does not.  8^)

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]

 

 

- Original Message - 

From: Jeff Powanda mailto:[EMAIL PROTECTED]  

To: Bob Stayton mailto:[EMAIL PROTECTED]  ;
docbook-apps@lists.oasis-open.org 

Sent: Tuesday, September 04, 2007 5:48 PM

Subject: RE: [docbook-apps] Adding a PDF bookmark for List of
Figures

 

I'm using FOP 0.93, so I have to match=book and
mode=fop1.outline. However, I need help on how to select the List of
Figures and add a bookmark for it.

 

Regards,

Jeff Powanda

 





From: Bob Stayton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 04, 2007 3:15 PM
To: Jeff Powanda; docbook-apps@lists.oasis-open.org
Subject: Re: [docbook-apps] Adding a PDF bookmark for List of
Figures

 

Hi Jeff,

The PDF bookmark syntax is specific to each FO processor.  What
FO processor are you using?

 

In general, you need to find the code that generates the
bookmark for the TOC, and do something like it.  For example, for XEP,
the code is in the template with match=book and mode=xep.outline in
fo/xep.xsl.

 

Bob Stayton
Sagehill Enterprises
DocBook Consulting
[EMAIL PROTECTED]

 

 

- Original Message - 

From: Jeff Powanda mailto:[EMAIL PROTECTED]  

To: docbook-apps@lists.oasis-open.org 

Sent: Tuesday, September 04, 2007 2:39 PM

Subject: [docbook-apps] Adding a PDF bookmark for List
of Figures

 

I'd like a bookmark for the List of Figures to appear in
the list of PDF bookmarks. Does anyone know how I can add that bookmark?

 

Regards,

Jeff Powanda



[docbook-apps] White space in fo question

2007-09-05 Thread Dick Hamilton
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.

By setting the attribute white-space-collapse to false in the
root.properties attribute set, I get everything I need, except
the spaces used to indent the source aren't ignored, which gives
output that looks like:

Now^is^the^time.^^Here^is
the^place.^^There^is^the
problem.^^Way^out^there^is
the^solution.

I've tried various values of white-space-treatment to no avail,
including ignore-if-after-linefeed, which on paper would seem
to be the right choice.

I've tried this with FOP 0.93 and XEP 4.4 with the same results,
so I think the fop processor is irrelevant.  And, I'm using saxon8
with the 1.73.1 stylesheets.

Any ideas?

Thanks,
Dick Hamilton

P.S.  I know, with proportional fonts, no one puts two spaces
after a sentence any more, but I'm using Courier and need that
typewriter effect:).



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]