[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dssslist] Page borders with DSSSL
At 2012-03-22 12:24 +0000, Ian Kent wrote:
I've got a one page document which is created using DocBook (4.5)
SGML and DSSSL using docbook2ps (openjade back-end) to convert to
postscript, which is then converted to a PDF using ps2pdf13. This is
all working fine, but I'd like to add a border around the entire page.
I've managed to do it using 'make box' by overriding '(element book'
and that works ok, but now I've added content to the page footer
(using $center-footer$, and generated entirely via DSSSL) the border
only appears around the page content. I'd like to have the border go
around the footer content too if possible. I can get a border to
appear around the footer (again using 'make box'), but then the
border is separate from the actual page border, effectively leaving
me with two separated boxes on the page.
Is there any way to enclose the page header, content and page footer
inside a single border using DSSSL?
Not that I can think of, as there are no box properties on the page itself.
I then thought you could box each of the three but leave the before
and after edges of the body "open", the after edge of the header
"open" and the before edge of the footer "open" in order to mimic a
box around the entire content, but it seems that isn't possible
because "open" acts on only the before edge.
Have you tried putting each of the header, body and footer into its
own table and then selectively turning off the borders so that the
only borders that are showing appear to box the entire content?
Actually, since it is only a one-page document, can you put the
header into a top-float in a table with an open bottom, the footer
into a bottom-float in a table with an open top and then the body in
a table? Perhaps not, because I can't think of how to stretch the
height of the table.
In XSL-FO I would suggest creating a background image that is a box
and putting that image on the page, but I don't see a background
image property for a page in DSSSL.
I think you may be out of luck. Hopefully something I've said above
will trigger an idea for someone else.
On a related note, my original idea was to have the footer defined
as a <section condition="footer"> element in the source SGML which
then gets filtered out of the main page content by checking the
condition attribute. When it came to retrieving the <section>
element from inside the $center-footer$ function I couldn't get it
to work - whatever combination of functions and nodes I tried I kept
getting 'node out of context' or 'not a node-list' errors - what
would be the best way to begin normal processing of an element from
within a DSSSL function, or is it not possible to begin normal node
processing in the headers/footers?
I can't think of any intrinsic barriers to what you want to do ...
the error messages imply the solution may simply be an error in how
you are accessing the content. If you try to address something that
isn't there and you don't have a node list for something that is
expecting content, that could simply be a problem with an address ...
something as simple as a typo.
Good luck! I hope this helps, though it doesn't give you anything definitive.
. . . . . . . . . . Ken
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/uoui9h
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
G. Ken Holman mailto:gkholman@CraneSoftwrights.com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers: http://www.CraneSoftwrights.com/legal