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 hk...@yore.com.tr on 2002/07/18 20:53:39 UTC

default value for fo:marker

Is it possible to assign a default value for the <fo:marker> so that it is 
displayed if there are no marker's assigned for a specific page?

Hakan


Re: default value for fo:marker

Posted by "J.Pietschmann" <j3...@yahoo.de>.
hk@yore.com.tr wrote:
> I have XML data with revision attributes (initially 0) in all XML
> elements where if any element is modified during the lifetime of
> the document its corresponding revision attribute is incremented by 1.
> 
> Within the "after" region of each page I want to put (display) a notice
> which is equal to:
>   - "UNMODIFIED", if all of the XML elements within the page have
>     a revision attribute with value "0" put a notice "UNMODIFIED"
>   - "MODIFIED: #" otherwise, where # is the maximum of the revision values
>     of all elements within the page.
> 
> Unfortunately I could not find a way to display this info using fop.

Take a look at docs/examples/markers/hide.fo, which
shows a neat trick.
If you really need to count the changes per page, perhaps
you can mak a two pass approach work, look here
  http://marc.theaimsgroup.com/?l=fop-user&m=102684633409102&w=2

J.Pietschmann


Re: default value for fo:marker

Posted by hk...@yore.com.tr.
Thanks for the reply.

Actually, what I am trying to achive is the following:

I have XML data with revision attributes (initially 0) in all XML
elements where if any element is modified during the lifetime of
the document its corresponding revision attribute is incremented by 1.

Within the "after" region of each page I want to put (display) a notice
which is equal to:
   - "UNMODIFIED", if all of the XML elements within the page have
     a revision attribute with value "0" put a notice "UNMODIFIED"
   - "MODIFIED: #" otherwise, where # is the maximum of the revision values
     of all elements within the page.

Unfortunately I could not find a way to display this info using fop.

Regards,

Hakan


J.Pietschmann wrote:

> hk@yore.com.tr wrote:
> 
>>
>> Is it possible to assign a default value for the <fo:marker> so that 
>> it is displayed if there are no marker's assigned for a specific page?
> 
> 
> The interesting FO appears to be fo:retrieve-marker, not
> fo:marker. According to the spec, if no markers are found,
> a fo:retrieve-marker renders empty.
>  http://www.w3.org/TR/xsl/slice6.html#fo_retrieve-marker
> 
> In theory, you could define a scope larger than a page
> and put a fo:marker providing a default in an apropriate
> place, unfortunately, this is not yet properly implemented
> in FOP.
> 
> J.Pietschmann
> 
> 
> 



Re: default value for fo:marker

Posted by "J.Pietschmann" <j3...@yahoo.de>.
J.Pietschmann wrote:
> In theory, you could define a scope larger than a page
> and put a fo:marker providing a default in an apropriate
> place, unfortunately, this is not yet properly implemented
> in FOP.

Correction: there is something implemented, so experiment.

J.Pietschmann




Re: default value for fo:marker

Posted by "J.Pietschmann" <j3...@yahoo.de>.
hk@yore.com.tr wrote:
> 
> Is it possible to assign a default value for the <fo:marker> so that it 
> is displayed if there are no marker's assigned for a specific page?

The interesting FO appears to be fo:retrieve-marker, not
fo:marker. According to the spec, if no markers are found,
a fo:retrieve-marker renders empty.
  http://www.w3.org/TR/xsl/slice6.html#fo_retrieve-marker

In theory, you could define a scope larger than a page
and put a fo:marker providing a default in an apropriate
place, unfortunately, this is not yet properly implemented
in FOP.

J.Pietschmann