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 Adam Kovacs <a....@i-docs.com> on 2010/07/13 11:19:56 UTC

FOP Intermediate Format placeholder

Hi there,

 I would need an XML element from any namespace which is not interpreted by FOP and goes into the Intermediate Format output as it is.
I want to use this element as placeholder in the FOP_IF, and in a second step I can modify the FOP Intermediate File for my needs.

Is there an element I could use?
If not how can I make a new FOP Extension which does this?

Any other suggestion how to do this are very welcome!!!

Thanks in advance!

Greetings,

Adam

Using FOP Trunk


Re: AW: FOP Intermediate Format placeholder

Posted by Chris Bowditch <bo...@hotmail.com>.
Georg Datterl wrote:
> Hi Adam,
> 

Hi Admin/Georg,

>  
> 
> I’d use a block with id. Either your replacement occupies visible space, 
> then you need the area generated by the block anyway, or your 
> replacement doesn’t, then I guess it can be a child of the block.

I agree with Georg's suggestion. Specify the id attribute on fo:block 
and then you can look for prod-id attribute in the IF XML.

<snip/>

Chris

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


AW: AW: AW: FOP Intermediate Format placeholder

Posted by Georg Datterl <ge...@geneon.de>.
Hi Adam,

I have no further ideas. Either use AT or wait for Jeremias. Posting on dev will not speed up that process, I'm afraid.

Mit freundlichen Grüßen

Georg Datterl

------ Kontakt ------

Georg Datterl

Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg

HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20

www.geneon.de<http://www.geneon.de>

Weitere Mitglieder der Willmy MediaGroup:

IRS Integrated Realization Services GmbH:    www.irs-nbg.de<http://www.irs-nbg.de>
Willmy PrintMedia GmbH:                            www.willmy.de<http://www.willmy.de>
Willmy Consult & Content GmbH:                 www.willmycc.de<http://www.willmycc.de>

Von: Adam Kovacs [mailto:a.kovacs@i-docs.com]
Gesendet: Dienstag, 13. Juli 2010 12:56
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: AW: FOP Intermediate Format placeholder

Again thanks Georg!

Thats exactly my problem nothing is preserved (except pure text)...
Do you know how the FOP Extensions are working...
I have implemented an Extensions which should preserve the element in IF as it is but nothing seems to work...

any other idea?

Thanks,

Adam

On 13.07.2010, at 12:17, Georg Datterl wrote:


Hi Adam,

You can find your
<fo:block id="placeholder">...</fo:block>

in AT as

<block ipd="235276" bpd="27800" ipda="235276" bpda="25249" bap="0 0 0 0" prod-id="placeholder" space-after="-2551">...</block>

I don't know how that works with IF,  a short test confirmed that id is not preserved. Probably to increase speed. Maybe Jeremias can tell you more.

Mit freundlichen Grüßen

Georg Datterl

------ Kontakt ------

Georg Datterl

Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg

HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20

www.geneon.de<http://www.geneon.de>

Weitere Mitglieder der Willmy MediaGroup:

IRS Integrated Realization Services GmbH:    www.irs-nbg.de<http://www.irs-nbg.de>
Willmy PrintMedia GmbH:                            www.willmy.de<http://www.willmy.de>
Willmy Consult & Content GmbH:                 www.willmycc.de<http://www.willmycc.de>

Von: Adam Kovacs [mailto:a.kovacs@i-docs.com]
Gesendet: Dienstag, 13. Juli 2010 12:01
An: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Betreff: Re: AW: FOP Intermediate Format placeholder

Hi Georg,

 thanks for the answer!!!

Unfortunately I did not got the solution completely...

If I use something like this in my stylesheet:
<fo:block id="placeholder" value="test"/>

I got nothing into the FOP Intermediate file

Did you mean something else?
How would your "placeholder" look like?

Thanks a lot!

Adam

On 13.07.2010, at 11:26, Georg Datterl wrote:



Hi Adam,

I'd use a block with id. Either your replacement occupies visible space, then you need the area generated by the block anyway, or your replacement doesn't, then I guess it can be a child of the block.

Regards,

Georg Datterl

------ Kontakt ------

Georg Datterl

Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg

HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20

www.geneon.de<http://www.geneon.de>

Weitere Mitglieder der Willmy MediaGroup:

IRS Integrated Realization Services GmbH:    www.irs-nbg.de<http://www.irs-nbg.de>
Willmy PrintMedia GmbH:                            www.willmy.de<http://www.willmy.de>
Willmy Consult & Content GmbH:                 www.willmycc.de<http://www.willmycc.de>

Von: Adam Kovacs [mailto:a.kovacs@i-docs.com]
Gesendet: Dienstag, 13. Juli 2010 11:20
An: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Betreff: FOP Intermediate Format placeholder

Hi there,

 I would need an XML element from any namespace which is not interpreted by FOP and goes into the Intermediate Format output as it is.
I want to use this element as placeholder in the FOP_IF, and in a second step I can modify the FOP Intermediate File for my needs.

Is there an element I could use?
If not how can I make a new FOP Extension which does this?

Any other suggestion how to do this are very welcome!!!

Thanks in advance!

Greetings,

Adam

Using FOP Trunk




Re: AW: AW: FOP Intermediate Format placeholder

Posted by Adam Kovacs <a....@i-docs.com>.
Again thanks Georg!

Thats exactly my problem nothing is preserved (except pure text)...
Do you know how the FOP Extensions are working...
I have implemented an Extensions which should preserve the element in IF as it is but nothing seems to work...

any other idea?

Thanks,

Adam 

On 13.07.2010, at 12:17, Georg Datterl wrote:

> Hi Adam,
>  
> You can find your  
> <fo:block id=“placeholder“>…</fo:block>
>  
> in AT as
>  
> <block ipd="235276" bpd="27800" ipda="235276" bpda="25249" bap="0 0 0 0" prod-id="placeholder" space-after="-2551">…</block>
>  
> I don’t know how that works with IF,  a short test confirmed that id is not preserved. Probably to increase speed. Maybe Jeremias can tell you more.
>  
> Mit freundlichen Grüßen
>  
> Georg Datterl
>  
> ------ Kontakt ------
>  
> Georg Datterl
>  
> Geneon media solutions gmbh
> Gutenstetter Straße 8a
> 90449 Nürnberg
>  
> HRB Nürnberg: 17193
> Geschäftsführer: Yong-Harry Steiert
>  
> Tel.: 0911/36 78 88 - 26
> Fax: 0911/36 78 88 - 20
>  
> www.geneon.de
>  
> Weitere Mitglieder der Willmy MediaGroup:
>  
> IRS Integrated Realization Services GmbH:    www.irs-nbg.de
> Willmy PrintMedia GmbH:                            www.willmy.de
> Willmy Consult & Content GmbH:                 www.willmycc.de
>  
> Von: Adam Kovacs [mailto:a.kovacs@i-docs.com] 
> Gesendet: Dienstag, 13. Juli 2010 12:01
> An: fop-users@xmlgraphics.apache.org
> Betreff: Re: AW: FOP Intermediate Format placeholder
>  
> Hi Georg,
>  
>  thanks for the answer!!!
>  
> Unfortunately I did not got the solution completely...
>  
> If I use something like this in my stylesheet:
> <fo:block id="placeholder" value="test"/>
>  
> I got nothing into the FOP Intermediate file
>  
> Did you mean something else?
> How would your "placeholder" look like?
>  
> Thanks a lot!
>  
> Adam 
>  
> On 13.07.2010, at 11:26, Georg Datterl wrote:
> 
> 
> Hi Adam,
>  
> I’d use a block with id. Either your replacement occupies visible space, then you need the area generated by the block anyway, or your replacement doesn’t, then I guess it can be a child of the block.
>  
> Regards,
>  
> Georg Datterl
>  
> ------ Kontakt ------
>  
> Georg Datterl
>  
> Geneon media solutions gmbh
> Gutenstetter Straße 8a
> 90449 Nürnberg
>  
> HRB Nürnberg: 17193
> Geschäftsführer: Yong-Harry Steiert
>  
> Tel.: 0911/36 78 88 - 26
> Fax: 0911/36 78 88 - 20
>  
> www.geneon.de
>  
> Weitere Mitglieder der Willmy MediaGroup:
>  
> IRS Integrated Realization Services GmbH:    www.irs-nbg.de
> Willmy PrintMedia GmbH:                            www.willmy.de
> Willmy Consult & Content GmbH:                 www.willmycc.de
>  
> Von: Adam Kovacs [mailto:a.kovacs@i-docs.com] 
> Gesendet: Dienstag, 13. Juli 2010 11:20
> An: fop-users@xmlgraphics.apache.org
> Betreff: FOP Intermediate Format placeholder
>  
> Hi there,
>  
>  I would need an XML element from any namespace which is not interpreted by FOP and goes into the Intermediate Format output as it is.
> I want to use this element as placeholder in the FOP_IF, and in a second step I can modify the FOP Intermediate File for my needs.
>  
> Is there an element I could use?
> If not how can I make a new FOP Extension which does this?
>  
> Any other suggestion how to do this are very welcome!!!
>  
> Thanks in advance!
>  
> Greetings,
>  
> Adam
>  
> Using FOP Trunk
>  
>  


AW: AW: FOP Intermediate Format placeholder

Posted by Georg Datterl <ge...@geneon.de>.
Hi Adam,

You can find your
<fo:block id="placeholder">...</fo:block>

in AT as

<block ipd="235276" bpd="27800" ipda="235276" bpda="25249" bap="0 0 0 0" prod-id="placeholder" space-after="-2551">...</block>

I don't know how that works with IF,  a short test confirmed that id is not preserved. Probably to increase speed. Maybe Jeremias can tell you more.

Mit freundlichen Grüßen

Georg Datterl

------ Kontakt ------

Georg Datterl

Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg

HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20

www.geneon.de<http://www.geneon.de>

Weitere Mitglieder der Willmy MediaGroup:

IRS Integrated Realization Services GmbH:    www.irs-nbg.de<http://www.irs-nbg.de>
Willmy PrintMedia GmbH:                            www.willmy.de<http://www.willmy.de>
Willmy Consult & Content GmbH:                 www.willmycc.de<http://www.willmycc.de>

Von: Adam Kovacs [mailto:a.kovacs@i-docs.com]
Gesendet: Dienstag, 13. Juli 2010 12:01
An: fop-users@xmlgraphics.apache.org
Betreff: Re: AW: FOP Intermediate Format placeholder

Hi Georg,

 thanks for the answer!!!

Unfortunately I did not got the solution completely...

If I use something like this in my stylesheet:
<fo:block id="placeholder" value="test"/>

I got nothing into the FOP Intermediate file

Did you mean something else?
How would your "placeholder" look like?

Thanks a lot!

Adam

On 13.07.2010, at 11:26, Georg Datterl wrote:


Hi Adam,

I'd use a block with id. Either your replacement occupies visible space, then you need the area generated by the block anyway, or your replacement doesn't, then I guess it can be a child of the block.

Regards,

Georg Datterl

------ Kontakt ------

Georg Datterl

Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg

HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20

www.geneon.de<http://www.geneon.de>

Weitere Mitglieder der Willmy MediaGroup:

IRS Integrated Realization Services GmbH:    www.irs-nbg.de<http://www.irs-nbg.de>
Willmy PrintMedia GmbH:                            www.willmy.de<http://www.willmy.de>
Willmy Consult & Content GmbH:                 www.willmycc.de<http://www.willmycc.de>

Von: Adam Kovacs [mailto:a.kovacs@i-docs.com]
Gesendet: Dienstag, 13. Juli 2010 11:20
An: fop-users@xmlgraphics.apache.org<ma...@xmlgraphics.apache.org>
Betreff: FOP Intermediate Format placeholder

Hi there,

 I would need an XML element from any namespace which is not interpreted by FOP and goes into the Intermediate Format output as it is.
I want to use this element as placeholder in the FOP_IF, and in a second step I can modify the FOP Intermediate File for my needs.

Is there an element I could use?
If not how can I make a new FOP Extension which does this?

Any other suggestion how to do this are very welcome!!!

Thanks in advance!

Greetings,

Adam

Using FOP Trunk



Re: AW: FOP Intermediate Format placeholder

Posted by Adam Kovacs <a....@i-docs.com>.
Hi Georg,

 thanks for the answer!!!

Unfortunately I did not got the solution completely...

If I use something like this in my stylesheet:
<fo:block id="placeholder" value="test"/>

I got nothing into the FOP Intermediate file

Did you mean something else?
How would your "placeholder" look like?

Thanks a lot!

Adam 

On 13.07.2010, at 11:26, Georg Datterl wrote:

> Hi Adam,
>  
> I’d use a block with id. Either your replacement occupies visible space, then you need the area generated by the block anyway, or your replacement doesn’t, then I guess it can be a child of the block.
>  
> Regards,
>  
> Georg Datterl
>  
> ------ Kontakt ------
>  
> Georg Datterl
>  
> Geneon media solutions gmbh
> Gutenstetter Straße 8a
> 90449 Nürnberg
>  
> HRB Nürnberg: 17193
> Geschäftsführer: Yong-Harry Steiert
>  
> Tel.: 0911/36 78 88 - 26
> Fax: 0911/36 78 88 - 20
>  
> www.geneon.de
>  
> Weitere Mitglieder der Willmy MediaGroup:
>  
> IRS Integrated Realization Services GmbH:    www.irs-nbg.de
> Willmy PrintMedia GmbH:                            www.willmy.de
> Willmy Consult & Content GmbH:                 www.willmycc.de
>  
> Von: Adam Kovacs [mailto:a.kovacs@i-docs.com] 
> Gesendet: Dienstag, 13. Juli 2010 11:20
> An: fop-users@xmlgraphics.apache.org
> Betreff: FOP Intermediate Format placeholder
>  
> Hi there,
>  
>  I would need an XML element from any namespace which is not interpreted by FOP and goes into the Intermediate Format output as it is.
> I want to use this element as placeholder in the FOP_IF, and in a second step I can modify the FOP Intermediate File for my needs.
>  
> Is there an element I could use?
> If not how can I make a new FOP Extension which does this?
>  
> Any other suggestion how to do this are very welcome!!!
>  
> Thanks in advance!
>  
> Greetings,
>  
> Adam
>  
> Using FOP Trunk
>  


AW: FOP Intermediate Format placeholder

Posted by Georg Datterl <ge...@geneon.de>.
Hi Adam,

I'd use a block with id. Either your replacement occupies visible space, then you need the area generated by the block anyway, or your replacement doesn't, then I guess it can be a child of the block.

Regards,

Georg Datterl

------ Kontakt ------

Georg Datterl

Geneon media solutions gmbh
Gutenstetter Straße 8a
90449 Nürnberg

HRB Nürnberg: 17193
Geschäftsführer: Yong-Harry Steiert

Tel.: 0911/36 78 88 - 26
Fax: 0911/36 78 88 - 20

www.geneon.de<http://www.geneon.de>

Weitere Mitglieder der Willmy MediaGroup:

IRS Integrated Realization Services GmbH:    www.irs-nbg.de<http://www.irs-nbg.de>
Willmy PrintMedia GmbH:                            www.willmy.de<http://www.willmy.de>
Willmy Consult & Content GmbH:                 www.willmycc.de<http://www.willmycc.de>

Von: Adam Kovacs [mailto:a.kovacs@i-docs.com]
Gesendet: Dienstag, 13. Juli 2010 11:20
An: fop-users@xmlgraphics.apache.org
Betreff: FOP Intermediate Format placeholder

Hi there,

 I would need an XML element from any namespace which is not interpreted by FOP and goes into the Intermediate Format output as it is.
I want to use this element as placeholder in the FOP_IF, and in a second step I can modify the FOP Intermediate File for my needs.

Is there an element I could use?
If not how can I make a new FOP Extension which does this?

Any other suggestion how to do this are very welcome!!!

Thanks in advance!

Greetings,

Adam

Using FOP Trunk


Re: FOP Intermediate Format placeholder

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 14.07.2010 09:11:28 Adam Kovacs wrote:
> Dear Jeremias, Georg, Chris, Craig,
> 
> thanks a lot for your answers!!!
> 
> I already thought about the "simple text marker" idea.
> I really would prefer a marker on element or attribute level because I have an already implemented XMLFilter which would handle my placeholders.
> A text parsing would be less performant in my opinion...

I don't think it will be noticably slower than looking for an attribute
or an element.

> @Jeremias: when you say that a new extension would be difficult, do you mean impossible?
> If its possible could you give me some hints how to do this...

Difficult meaning that there are no real extension points in the current
code for this and that I don't have time right now to think about it and
to explain how to create such an extension.

> I dont want to lose the great performance of the IF just because some text parsing...
>    
> Thanks in advance!
> 
> Adam 
> 
> 
> On 13.07.2010, at 14:10, Jeremias Maerki wrote:
> 
> > Adam,
> > 
> > the IF was designed to be fast and is therefore not very verbose. If you
> > need to refer to an ID, you have to use the Area Tree XML (AT) like
> > Georg said.
> > 
> > On page, page-sequence and image, the IFSerializer writes out any
> > foreign attributes (non-fo namespace) that exist in the XSL-FO. But that
> > doesn't work on blocks and such because the semantics of XSL-FO don't
> > exist in IF anymore.
> > 
> > Implementing a FOP extension on this level is going to be rather difficult.
> > 
> > As another work-around, you could do something like this:
> > 
> > <fo:block space-after="-1.2em">HERE!</fo:block>
> > 
> > You can then look for and extract the <text> element with "HERE!". The
> > -1.2em compensates for the size of the block.
> > 
> > On 13.07.2010 11:19:56 Adam Kovacs wrote:
> >> Hi there,
> >> 
> >> I would need an XML element from any namespace which is not interpreted by FOP and goes into the Intermediate Format output as it is.
> >> I want to use this element as placeholder in the FOP_IF, and in a second step I can modify the FOP Intermediate File for my needs.
> >> 
> >> Is there an element I could use?
> >> If not how can I make a new FOP Extension which does this?
> >> 
> >> Any other suggestion how to do this are very welcome!!!
> >> 
> >> Thanks in advance!
> >> 
> >> Greetings,
> >> 
> >> Adam
> >> 
> >> Using FOP Trunk
> >> 
> > 
> > 
> > 
> > 
> > Jeremias Maerki
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> > 
> 




Jeremias Maerki


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


Re: FOP Intermediate Format placeholder

Posted by Adam Kovacs <a....@i-docs.com>.
Dear Jeremias, Georg, Chris, Craig,

thanks a lot for your answers!!!

I already thought about the "simple text marker" idea.
I really would prefer a marker on element or attribute level because I have an already implemented XMLFilter which would handle my placeholders.
A text parsing would be less performant in my opinion...

@Jeremias: when you say that a new extension would be difficult, do you mean impossible?
If its possible could you give me some hints how to do this...

I dont want to lose the great performance of the IF just because some text parsing...
   
Thanks in advance!

Adam 


On 13.07.2010, at 14:10, Jeremias Maerki wrote:

> Adam,
> 
> the IF was designed to be fast and is therefore not very verbose. If you
> need to refer to an ID, you have to use the Area Tree XML (AT) like
> Georg said.
> 
> On page, page-sequence and image, the IFSerializer writes out any
> foreign attributes (non-fo namespace) that exist in the XSL-FO. But that
> doesn't work on blocks and such because the semantics of XSL-FO don't
> exist in IF anymore.
> 
> Implementing a FOP extension on this level is going to be rather difficult.
> 
> As another work-around, you could do something like this:
> 
> <fo:block space-after="-1.2em">HERE!</fo:block>
> 
> You can then look for and extract the <text> element with "HERE!". The
> -1.2em compensates for the size of the block.
> 
> On 13.07.2010 11:19:56 Adam Kovacs wrote:
>> Hi there,
>> 
>> I would need an XML element from any namespace which is not interpreted by FOP and goes into the Intermediate Format output as it is.
>> I want to use this element as placeholder in the FOP_IF, and in a second step I can modify the FOP Intermediate File for my needs.
>> 
>> Is there an element I could use?
>> If not how can I make a new FOP Extension which does this?
>> 
>> Any other suggestion how to do this are very welcome!!!
>> 
>> Thanks in advance!
>> 
>> Greetings,
>> 
>> Adam
>> 
>> Using FOP Trunk
>> 
> 
> 
> 
> 
> Jeremias Maerki
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 


Re: FOP Intermediate Format placeholder

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

the IF was designed to be fast and is therefore not very verbose. If you
need to refer to an ID, you have to use the Area Tree XML (AT) like
Georg said.

On page, page-sequence and image, the IFSerializer writes out any
foreign attributes (non-fo namespace) that exist in the XSL-FO. But that
doesn't work on blocks and such because the semantics of XSL-FO don't
exist in IF anymore.

Implementing a FOP extension on this level is going to be rather difficult.

As another work-around, you could do something like this:

<fo:block space-after="-1.2em">HERE!</fo:block>

You can then look for and extract the <text> element with "HERE!". The
-1.2em compensates for the size of the block.

On 13.07.2010 11:19:56 Adam Kovacs wrote:
> Hi there,
> 
>  I would need an XML element from any namespace which is not interpreted by FOP and goes into the Intermediate Format output as it is.
> I want to use this element as placeholder in the FOP_IF, and in a second step I can modify the FOP Intermediate File for my needs.
> 
> Is there an element I could use?
> If not how can I make a new FOP Extension which does this?
> 
> Any other suggestion how to do this are very welcome!!!
> 
> Thanks in advance!
> 
> Greetings,
> 
> Adam
> 
> Using FOP Trunk
> 




Jeremias Maerki


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