>First thing I would suggest is to generate the fo file. Then search the
>file to see if the id is repeated twice (or more).

Good idea. How can I do this? AFAIK fop doesn't have this output option.
(I think it's a silly newbie question for the one's, who are familiar with
xalan, xerces, ... but I think I only need a sample commandline)

> Then use the fo file as the input to fop. Note where the error occurs,
> id, page.
> Then delete everything (keeping valid xml) after that id.
> If possible delete everything on pages before the page where the problem
> occurs so that the page starts in the same position.
> You should now have a minimal example if the problem still occurs you
> could post it to the list or figure out what is causing the problem.

I just located the responsible TT element in my XML-file. I tried to delete
the whole chapter and the error still exist. At nearly the same position
(in lines), so I assume, that not that specific TT element is responsible, 
but the n-th TT element. And as I told before my stylesheet works really
fine 
on small xml-files.
For that reason it is impossible to give a "minimum" example (with less than
500KB).

But I try my best to find the error in another way:

I've made a new test with this modified template, because I wanted to see
what "generate-id()" really does:

<xsl:template match="TT">
     <xsl:message><xsl:value-of select="generate-id()" /></xsl:message>
     <fo:wrapper id="{generate-id(.)}" xsl:use-attribute-sets="tt">
    </fo:wrapper>
</xsl:template>


Here are the last lines of my fop-output:

...
file:///C:/fop-test/converter.xsl; Line 1913; Column 19; N40BE05
file:///C:/fop-test/converter.xsl; Line 1913; Column 19; N40BE11
file:///C:/fop-test/converter.xsl; Line 1913; Column 19; N40BE26
file:///C:/fop-test/converter.xsl; Line 1913; Column 19; N40C0FF
file:///C:/fop-test/converter.xsl; Line 1913; Column 19; N40C142
file:///C:/fop-test/converter.xsl; Line 1913; Column 19; N40C185
file:///C:/fop-test/converter.xsl; Line 1913; Column 19; N40C189
file:///C:/fop-test/converter.xsl; Line 1913; Column 19; N40C1CC

org.apache.fop.apps.FOPException: org.apache.fop.apps.FOPException: The id
"N402100" already exists in this document
        at org.apache.fop.apps.CommandLineStarter.run(Unknown Source)
        at org.apache.fop.apps.Fop.main(Unknown Source)

---------

java.lang.RuntimeException: org.apache.fop.apps.FOPException: The id
"N402100" already exists in this document
        at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3170)
        at
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerH
andlerImpl.java:433)
        at
org.apache.xerces.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.ja
va:715)
        at
org.apache.xerces.impl.XMLNamespaceBinder.endDocument(XMLNamespaceBinder.jav
a:704)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.endDocument(XMLDTDValidator.java:
985)
        at
org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerIm
pl.java:437)
        at
org.apache.xerces.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1159
)
        at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityManager.
java:3204)
        at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(XMLEntityMa
nager.java:2861)
        at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatc
h(XMLDocumentScannerImpl.java:987
)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:333)
        at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:529)
        at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:585)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
        at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:114
8)
        at
org.apache.xalan.transformer.TrAXFilter.parse(TrAXFilter.java:134)
        at org.apache.fop.apps.Driver.render(Unknown Source)
        at org.apache.fop.apps.CommandLineStarter.run(Unknown Source)
        at org.apache.fop.apps.Fop.main(Unknown Source)

At the beginning the generate-id() function started with N40000C and
increased continuously
with a variable step between 3 and 12. It looks like the last 4 letters are
a 16-bit hexadecimal 
counter. But as u can c the last generated id "N402100" is out of this
order. And indeed this id
was generated at another item before. But on the other hand my previous test
with the <xsl:if select ="preceding::*[genera...]"> statement
should have worked ... There seems to be a difference somewhere.

I think it could be something like an overflow problem.

Maybe it could help if fop-dev's tell us, how the generate-id() function and
the detection of duplicate id's works internally (because the spec says
nothing about it, except this task can be solved by the
dev's as they like and as they think it's useful).


thx

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to