Wes Isberg wrote:
Hi -
Adrian, I will integrate (I wrote the bug to capture this).
Kev, this is great, thank you very much. This stuff is very pertinant
now because we have a lot of doc revisions to do for the AspectJ 5 release,
and I appreciate your following my off-list suggestion. But I can't tell
if you got further than I did when I mentioned that after updating the
XSL per http://xml.apache.org/fop/faq.html#no-page-master, I was getting
the error "'master-name' () must be unique..." I'd like to leave the
XSL as per the docbook release until everything is working.
Yeah I came across that 'master-name' problem, and the bug is resident
in the docbook xsl code. The docbook code uses master-name in some
places where it should (according to the updated XSL spec) use
master-reference, but the 'master-name' () must be unique is caused by
the page-sequence-masters not having a masetr-name attribute eg
original pagesetup.xsl
-------
<page-sequence-master master-name="oneside1">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference
master-name="simple1"/> <-- incorrect according to new spec
</fo:repeatable-page-master-alternatives>
</page-sequence-master>
after my first changes (reading FOP FAQ) - still incorrect
--------
<page-sequence-master master-reference="oneside1"> <-- should
be master-name
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference
master-reference="simple1"/>
</fo:repeatable-page-master-alternatives>
</page-sequence-master>
after reading the XSL spec - correct
-------
<page-sequence-master master-name="oneside1">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference
master-reference="simple1"/>
</fo:repeatable-page-master-alternatives>
</page-sequence-master>
the advice in the FOP faq is slightly misleading and of course I
followed it to the letter and replaced master-name with
master-reference. But looking at the XSL spec made it much, much
clearer. The error message is also incredibly bad, it should be
changed to something like:
"master-name attribute of simple-page-master or page-sequence-master in
master-layout-set, is not unique. First occurence line:X, second
occurence line:Y"
Basically without the master-name attribute the page-sequence-master
tag will take the master-name () (null), then the next one without the
atribute will take the same master-name () and there's your non-unique
rule broken.
Also, does anyone know of free XSL/FOP transform plugins that would work
here, so a writer wouldn't have to drop down into Ant to check things?
I've tried XMLBuddy and FOP Bridge...
It's a hack, but I simply set the file association of .xml to be opened
with the ant editor. Ok it doesn't validate and the plugin complains
about the structure, but it allows you to format the xml and does the
raw syntax highlighting taht I needed to be able to tell what was going
on with the files. As for checking things without writing out a file:
<path-to-fop>fop-20.0.5/fop <path-to-.fo> -awt will render
using AWT for a quick check without cluttering file-system
Here's my setup - it will break if there's a problem, you still have to
have the generated .fo file with I suppose means that you need to run
ant each time to generate that file :(

|