W3C home > Mailing lists > Public > www-xsl-fo@w3.org > August 2003

Re: fop - titled border

From: David Tolpin <dvd@davidashen.net>
Date: Mon, 4 Aug 2003 11:06:57 +0500 (AMST)
Message-Id: <200308040606.h7466vg8036228@adat.davidashen.net>
To: sneedham@chicagojava.com (Shawn Needham)
Cc: www-xsl-fo@w3.org
Shawn,

if your question is about Apache FOP, as the subject suggests, then
it is an implementation specific question and should be asked on FOP
lists.

If you are asking about XSL Formatting Objects (http://www.w3.org/TR/xsl), 
then it is easy.

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:layout-master-set>
    <fo:simple-page-master master-name="my-page">
      <fo:region-body border="thin solid blue" margin-left="1in" margin-right="1in" margin-top="1in"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="my-page">
    <fo:flow flow-name="xsl-region-body">
      <fo:block space-before="48pt" start-indent="24pt" end-indent="24pt" space-before.conditionality="retain" border="thick solid black"> 
	<fo:block padding-before="-24pt" font-size="32pt" font-weight="bold" text-indent="48pt">
	  <fo:inline background-color="white">Border Title</fo:inline>
	</fo:block>
	<fo:block font-size="24pt">This text has a title, and the title is placed on the border of the framed block
	 that surrounds the text.
        </fo:block>
      </fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Tested with RenderX XEP (http://xep.xattic.com/). Formatting result is attached.

David Tolpin

> I am trying to create a Titled Border, which displays text inset within the border,
> such as:
> 
> --- Border Title --------------
> |                             |
> -------------------------------
> 
> I was unable to find this border style when searching around. Does anyone know of a
> way to accomplish this type of border?


Received on Monday, 4 August 2003 02:11:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:11 GMT