[xep-support] Re: [error] Attribute 'background-image' cannot occur at element 'fo:simple-page-master'.

From: Nathan Stenzel <nathanstenzel@sebis.com>
Date: Thu May 26 2011 - 08:25:32 PDT

Thanks all. I got this figured out yesterday. There surely have been
improvements to the handling of regions since the version of XEP that I am
using. Any further discussion will merely be for others with up to date XEP
versions.

On Wednesday 25 May 2011 04:58:55 pm Karl Stubsjoen wrote:
> I've provide an additional sample. In this sample search for the words:
> Head, Handle.
>
> -----Original Message-----
> From: xep-support-bounces@renderx.com
> [mailto:xep-support-bounces@renderx.com] On Behalf Of Kevin Brown
> Sent: Wednesday, May 25, 2011 2:51 PM
> To: kevin@renderx.com; 'RenderX Community Support List'
> Subject: [xep-support] Re: [error] Attribute 'background-image' cannot
> occur at element 'fo:simple-page-master'.
>
> With a quick example using this FO:
>
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
> xmlns:rx="http://www.renderx.com/XSL/Extensions"
> font-family="Helvetica" font-size="11pt">
> <fo:layout-master-set>
> <fo:simple-page-master margin="0in" page-width="8.5in"
> page-height="11in" master-name="first">
> <fo:region-body background-image="hammer.jpg"/>
> <fo:region-before extent="2in"
> background-image="hammer-before.jpg"/>
> <fo:region-after extent="2in"
> background-image="hammer-after.jpg"/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="first">
> <fo:static-content flow-name="xsl-region-before">
> <fo:block>Content Before</fo:block>
> </fo:static-content>
> <fo:static-content flow-name="xsl-region-after">
> <fo:block>Content After</fo:block>
> </fo:static-content>
> <fo:flow flow-name="xsl-region-body">
> <fo:block>Content Flow</fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
>
> In examining the XEPOUT, I can say these things:
>
> 1) backgrounds are first and can appear in any order. It is
> non-deterministic in the engine, but backgrounds are always first.
> 2) the body text is placed next
> 3) The after text is placed next
> 4) The before text is placed last
>
> So, if you are using background-image on only one region to over the page,
> it is safe to do so in any one of the regions. It will be rendered first
> into XEPOUT and hence, it is drawn first into the output.
>
> Kevin
>
> -----Original Message-----
> From: xep-support-bounces@renderx.com
> [mailto:xep-support-bounces@renderx.com] On Behalf Of Kevin Brown
> Sent: Wednesday, May 25, 2011 2:22 PM
> To: 'RenderX Community Support List'
> Subject: [xep-support] Re: [error] Attribute 'background-image' cannot
> occur at element 'fo:simple-page-master'.
>
> > Using what I believe was XEP version 4.3, the fo:region-before will
> > have
>
> its
> background overwrite the foreground of the body.
>
> I had this discussion with developer's at a recent product planning
> sessions and I believe that you would be safe using fo:region-before
> background image (not necessarily in the static content, but in the
> background -- this may have been the difference). As I said, this is the
> way it is inserted into FO using the XSL from VisualXSL and I have seen
> 1000s of documents done with background images, never with a problem of the
> region-before background image overlaying anything in the body. However,
> the region before "area" can.
>
> I or our tech team can crack the code and examine, but I think what happens
> is that backgrounds are first, then content in the order of definition
> within the template -- meaning likely body, before then after.
>
> A good way to do it is to create a simple example and format to XEP
> Intermediate Format -- the order of the objects in this would be the order
> in which they are drawn to the page.
>
> Also to note, we do many projects from VisualXSL where we run a bookfold,
> like taking the XEP Intermediate format and edit it in XSL to say combine
> pages like 4,1 and 2,3 into two pages for bookfold print. As part of that
> process, we inject backgrounds that are 11x17 for instance, covering both
> pages. In our bookfoled XSL, we inject the image into XEP Intermediate
> format at the beginning of the page to ensure it is rendered "first" and
> hence in the background. If I look at a page in XEP with fo:region-before
> as an image, I see one of the first things in the XEP Intermediate Format.
> (this is actually another way to do it if you like)
>
> Kevin
> RenderX
>
>
>
> -----Original Message-----
> From: xep-support-bounces@renderx.com
> [mailto:xep-support-bounces@renderx.com] On Behalf Of Nathan Stenzel
> Sent: Wednesday, May 25, 2011 12:39 PM
> To: xep-support@renderx.com
> Subject: [xep-support] Re: [error] Attribute 'background-image' cannot
> occur at element 'fo:simple-page-master'.
>
> Using what I believe was XEP version 4.3, the fo:region-before will have
> its
>
> background overwrite the foreground of the body. I had tried that a few
> times and had no luck. There could have been other factors too, I suppose,
> since absolute positioning vs relative positioning seems to affect the
> apparent z-index. I also played with z-index and had no luck or affect
> there.
>
> On Wednesday 25 May 2011 01:28:50 pm Kevin Brown wrote:
> > We find it better to use fo:region-before if possible. This way, you
> > don't have to play with all margins. This is exactly the way our
> > VisualXSL product works when you insert a background PDF into the design.
> >
> > It will set a background image on fo:region-before with extent =
> > page-height ... as in:
> >
> > <fo:region-before extent="792pt" region-name="header-any"
> > background-image="url(&quot;Master.pdf&quot;)"/>
> >
> > Kevin Brown
> > RenderX
> >
> > -----Original Message-----
> > From: xep-support-bounces@renderx.com
> > [mailto:xep-support-bounces@renderx.com] On Behalf Of Nathan Stenzel
> > Sent: Wednesday, May 25, 2011 11:11 AM
> > To: xep-support@renderx.com
> > Subject: [xep-support] Re: [error] Attribute 'background-image' cannot
> > occur at element 'fo:simple-page-master'.
> >
> > On Wednesday 25 May 2011 10:50:32 am G. Ken Holman wrote:
> > > At 2011-05-25 10:16 -0500, you wrote:
> > > >Why can't we do this? It would make sense to be able to say what
> > > >the background image is for the sake of saying "this goes on this
>
> paper".
>
> > > According to the XSL-FO specification, the background image is a
> > > property of each of the regions on the page, not a property of the
> > > page geometry.
> > >
> > > If you set your page margins to 0pt, then the region-body is the
> > > same size as your paper, and then you would get your full-page
> > > background
> >
> > image.
> >
> > > I hope this helps.
> > >
> > > . . . . . . . . Ken
> > >
> > > --
> > > Contact us for world-wide XML consulting & instructor-led training
> > > Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
> > > G. Ken Holman mailto:gkholman@CraneSoftwrights.com
> > > Legal business disclaimers: http://www.CraneSoftwrights.com/legal
> > >
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > (*) To unsubscribe, please visit
> > > http://lists.renderx.com/mailman/options/xep-support (*) By using
> > > the Service, you expressly agree to these Terms of Service http://w
> > > ww.renderx.com/terms-of-service.html
> >
> > Thanks much for the reply. I think a number of people have had trouble
>
> with
>
> > this in the past.
> >
> > I did the following...
> > -set background-image for the fo:region-body -set the margins to 0in
> > and the padding to the top and bottom borders of the
> >
> > flowing space for the fo:region-body
> > -set the block-containers to be relatively postioned (not absolute)
> >
> > Now, I finally have it working.
> >
> >
> >
> >
> > _______________________________________________
> > (*) To unsubscribe, please visit
> > http://lists.renderx.com/mailman/options/xep-support
> > (*) By using the Service, you expressly agree to these Terms of
> > Service http://w ww.renderx.com/terms-of-service.html
> >
> > _______________________________________________
> > (*) To unsubscribe, please visit
> > http://lists.renderx.com/mailman/options/xep-support (*) By using the
> > Service, you expressly agree to these Terms of Service http://w
> > ww.renderx.com/terms-of-service.html
>
>
>
>
> _______________________________________________
> (*) To unsubscribe, please visit
> http://lists.renderx.com/mailman/options/xep-support
> (*) By using the Service, you expressly agree to these Terms of Service
> http://w ww.renderx.com/terms-of-service.html
>
> _______________________________________________
> (*) To unsubscribe, please visit
> http://lists.renderx.com/mailman/options/xep-support
> (*) By using the Service, you expressly agree to these Terms of Service
> http://w ww.renderx.com/terms-of-service.html
>
> _______________________________________________
> (*) To unsubscribe, please visit
> http://lists.renderx.com/mailman/options/xep-support
> (*) By using the Service, you expressly agree to these Terms of Service
> http://w ww.renderx.com/terms-of-service.html

!DSPAM:87,4dde70f763731906812503!

_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Thu May 26 08:26:04 2011

This archive was generated by hypermail 2.1.8 : Thu May 26 2011 - 08:26:12 PDT