You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Tom Browder <to...@gmail.com> on 2010/07/02 20:45:45 UTC

How to Get Borders to Work

I notice there is an open bug about borders not fully working on some objects.

I can't get them to work on blocks or block containers (using trunk).

Has anyone got it to work on either block or block container?

If so, can you show the exact syntax that worked for you?

Thanks.

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to Get Borders to Work

Posted by Tom Browder <to...@gmail.com>.
On Wed, Jul 7, 2010 at 07:10, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> Tom,
>
> I've just checked with 0.95 and trunk:
>
>      <fo:block border-before-style="double" space-before="1em">bla</fo:block>
>      <fo:block border="double" space-before="1em">Bla</fo:block>
>
> Just setting the border style is enough to get a border, be that on one
> side or all around with the shorthand.

My bad, I thought I had checked out setting one attribute.  I had, but
only the border-width one.

Forget all.

Thanks.

-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to Get Borders to Work

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Tom,

I've just checked with 0.95 and trunk:

      <fo:block border-before-style="double" space-before="1em">bla</fo:block>
      <fo:block border="double" space-before="1em">Bla</fo:block>

Just setting the border style is enough to get a border, be that on one
side or all around with the shorthand.

I'm just not really getting why you want to customize these defaults.
Styling this in XSLT is as simple as defining an xsl:attribute-set with
the values you expect and use that where applicable. IMO, that's easier
than writing a proprietary extension that tries to interfere with the
property subsystem.

On 07.07.2010 13:54:41 Tom Browder wrote:
> On Wed, Jul 7, 2010 at 04:25, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> > Hi Tom
> >
> > Why? What should that extension do?
> >
> > IMO, Craig and Eric are right. It's basically your job in XSLT to make
> > sure that the right properties are set, that defaults from the XSL-FO
> > spec and from the user agent (i.e. FOP) are overridden.
> >
> > The default in XSL-FO is to have no border and you explicitely have to
> > enable borders by setting the border style to something other than "none".
> > We're implementing a standard here. Not much freedom is available there.
> 
> Well, apparently you have to set all three attributes to get anything.
>  All I'm suggesting is that setting  one implies the user wants a
> border and that there be a default value then for the other two
> attributes.  I don't think that's an unreasonable extension.
> 
> -Tom
> 



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to Get Borders to Work

Posted by Tom Browder <to...@gmail.com>.
On Wed, Jul 7, 2010 at 04:25, Jeremias Maerki <de...@jeremias-maerki.ch> wrote:
> Hi Tom
>
> Why? What should that extension do?
>
> IMO, Craig and Eric are right. It's basically your job in XSLT to make
> sure that the right properties are set, that defaults from the XSL-FO
> spec and from the user agent (i.e. FOP) are overridden.
>
> The default in XSL-FO is to have no border and you explicitely have to
> enable borders by setting the border style to something other than "none".
> We're implementing a standard here. Not much freedom is available there.

Well, apparently you have to set all three attributes to get anything.
 All I'm suggesting is that setting  one implies the user wants a
border and that there be a default value then for the other two
attributes.  I don't think that's an unreasonable extension.

-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to Get Borders to Work

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hi Tom

Why? What should that extension do?

IMO, Craig and Eric are right. It's basically your job in XSLT to make
sure that the right properties are set, that defaults from the XSL-FO
spec and from the user agent (i.e. FOP) are overridden.

The default in XSL-FO is to have no border and you explicitely have to
enable borders by setting the border style to something other than "none".
We're implementing a standard here. Not much freedom is available there.

On 06.07.2010 19:18:06 Tom Browder wrote:
> On Tue, Jul 6, 2010 at 09:47, Amick, Eric <Er...@mail.house.gov> wrote:
> > The standard has width defaulting to medium and style to none; it leaves
> > the color up to the user agent. You could have FOP default color to
> > black, I suppose, but some user will inevitably run into problems when
> > porting the stuff to another FO processor.
> 
> How about an fop extension then?
> 
> -Tom



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to Get Borders to Work

Posted by Tom Browder <to...@gmail.com>.
On Tue, Jul 6, 2010 at 09:47, Amick, Eric <Er...@mail.house.gov> wrote:
> The standard has width defaulting to medium and style to none; it leaves
> the color up to the user agent. You could have FOP default color to
> black, I suppose, but some user will inevitably run into problems when
> porting the stuff to another FO processor.

How about an fop extension then?

-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: How to Get Borders to Work

Posted by "Amick, Eric" <Er...@mail.house.gov>.
The standard has width defaulting to medium and style to none; it leaves
the color up to the user agent. You could have FOP default color to
black, I suppose, but some user will inevitably run into problems when
porting the stuff to another FO processor.

Eric Amick   Systems Engineer II
Legislative Computer Systems

> -----Original Message-----
> From: Tom Browder [mailto:tom.browder@gmail.com]
> Sent: Saturday, July 3, 2010 9:19
> To: Craig Ringer
> Cc: fop-users@xmlgraphics.apache.org
> Subject: Re: How to Get Borders to Work
> 
> On Sat, Jul 3, 2010 at 07:20, Craig Ringer
> <cr...@postnewspapers.com.au> wrote:
> ...
> > If fop "helped" users by (say) assuming border color = foreground
> color
> > if no color was given, and the standard specifies that no color =
> > transparent if not specified, then the same XSL-FO would render with
> > missing borders in other processors.
> 
> True but I think assuming thin, black, solid would be a reasonable set
> of assumptions.
> 
> -Tom
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to Get Borders to Work

Posted by Tom Browder <to...@gmail.com>.
On Sat, Jul 3, 2010 at 07:20, Craig Ringer <cr...@postnewspapers.com.au> wrote:
...
> If fop "helped" users by (say) assuming border color = foreground color
> if no color was given, and the standard specifies that no color =
> transparent if not specified, then the same XSL-FO would render with
> missing borders in other processors.

True but I think assuming thin, black, solid would be a reasonable set
of assumptions.

-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to Get Borders to Work

Posted by Craig Ringer <cr...@postnewspapers.com.au>.
On 03/07/10 18:52, Tom Browder wrote:

> Does that sound like a good extension of feature request?

IMO only if the current behavior differs from that required by the standard.

If fop "helped" users by (say) assuming border color = foreground color
if no color was given, and the standard specifies that no color =
transparent if not specified, then the same XSL-FO would render with
missing borders in other processors.

--
Craig Ringer

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to Get Borders to Work

Posted by Tom Browder <to...@gmail.com>.
On Fri, Jul 2, 2010 at 22:07, Craig Ringer <cr...@postnewspapers.com.au> wrote:
> On 3/07/2010 2:45 AM, Tom Browder wrote:
>>
>> I notice there is an open bug about borders not fully working on some
>> objects.
>
> URL?

https://issues.apache.org/bugzilla/show_bug.cgi?id=36395

>> I can't get them to work on blocks or block containers (using trunk).
...
> Have a look at the test cases in fop for some examples.

Thanks, Craig, that helped.

My problem was that I had not been using all three attributes (color,
style, width).  For some reason I had assumed that there would be a
default for the missing ones if only one or two were entered.

Does that sound like a good extension of feature request?

Regards,

-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: How to Get Borders to Work

Posted by Craig Ringer <cr...@postnewspapers.com.au>.
On 3/07/2010 2:45 AM, Tom Browder wrote:
> I notice there is an open bug about borders not fully working on some objects.

URL?

> I can't get them to work on blocks or block containers (using trunk).

Border work fine for me on blocks in 0.95 and trunk.

Have a look at the test cases in fop for some examples.

> If so, can you show the exact syntax that worked for you?

I just set a border style, width and color. I don't have an example 
immediately to hand, but will post one later if you still have problems.

--
Craig Ringer

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org