2010/9/22 Ricardo Espírito Santo <[email protected]>:
> Hello there,
>
> I have been asked to develop something on top of the pdf export facilities
> on the xwiki. But I run into a small problem:
>
> When *generating a pdf with multiple pages*, say all the pages from one
> space, the ids of elements within the pages get duplicated and the *pdf
> exportation fails*.
>
> i.e.:
>
> *Page A* with a title *TheQuickBrownFox...* some text under it and then *page
> B* with the same title: *TheQuickBrownFox...* with some other text under
> this. Both will get an auto ID of *TheQuickBrownFox...
>
> *Now this doesn't happen for items on the same page since the ID generation
> mechanism counts all items of the same name and increments it if necessary.

It's still not perfect, see
http://jira.xwiki.org/jira/browse/XWIKI-3780 and
http://jira.xwiki.org/jira/browse/XWIKI-3649

> But this mechanism does not contemplate cross page duplicated items.
>
> To avoid the following error:
>
> Property ID "lipsum" (found on "fo:block") previously used; ID values
> must be unique within a document! (See position 12:39)
>
> We thought some changes to the ID generation mechanism could be made:
> We could* prefix the ID* with the space and page name and this would
> be a simple elegant solution.
>
> Now:
> Is this the best solution?

It's not that simple, the problem is that the ids are currently
generated in the parser which has no idea what is the document.

> Will someone point out the best place to do this?

There should be a protection in XHTML renderer for sure anyway since
it's supposed to produce valid XHTML whatever the cost even if it
means changing ids that are expected by some link. Then depending of
the issue there should be improvement where possible like some
refactoring in the include macro to fix XWIKI-3649.

> If I post a patch with this fix will it be included on the trunk?
>
> Thank you in advance,
>
> » Ricardo Espírito Santo
> » Linkare TI - Tecnologias de Informação, Lda
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Thomas Mortagne
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to