Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: fo tree
    • Labels:
      None
    • Environment:
      Operating System: Mac OS X 10.4
      Platform: PC
    • External issue ID:
      53005

      Description

      Was getting this error:

      javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: "fo:inline" is not a valid child of "fo:block"! (See position 1870:716)

      After talking with the folks in the docbook XSLT mailing list, they helped me finding out that:

      ""
      Based on the .fo file that Alberto sent to me, this appears to be a bug in FOP 1.0. I can reproduce it by putting an indexterm inside an inline element inside a footnote. In general, an indexterm generates an fo:wrapper element to hold the indexterm id marker. When this fo:wrapper is inside an fo:inline, it appears to confuse FOP, but only when inside a footnote. Removing the fo:wrapper removes the error. All other locations with that construction do not generate an error. Two other XSL-FO processors did not produce an error.
      ""

      Somebody added:

      ""
      FYI, until recently indexterms were not allowed inside footnotes at all:
      http://www.docbook.org/tdg5/en/html/footnote.html
      They are allowed with v5.1:
      http://www.docbook.org/tdg51/en/html/footnote.html
      ""

      Thank you,
      Alberto

      1. test.fo.xml
        0.7 kB
        Glenn Adams
      2. example.xml
        1 kB
        Alberto Simões
      3. example.fo
        51 kB
        Alberto Simões

        Activity

        Hide
        Pascal Sancho added a comment -

        Please,
        can you:
        1/ reformulate short description matching FOP vocabulary (indexterm and docbook are not handled by FOP)?
        2/ attach a short XSL-FO (xml + xslt result) that demonstrates the issue?

        Show
        Pascal Sancho added a comment - Please, can you: 1/ reformulate short description matching FOP vocabulary (indexterm and docbook are not handled by FOP)? 2/ attach a short XSL-FO (xml + xslt result) that demonstrates the issue?
        Hide
        Alberto Simões added a comment -

        Attachment example.fo has been added with description: Generated FO file

        Show
        Alberto Simões added a comment - Attachment example.fo has been added with description: Generated FO file
        Hide
        Alberto Simões added a comment -

        Attachment example.xml has been added with description: Original DocBook document

        Show
        Alberto Simões added a comment - Attachment example.xml has been added with description: Original DocBook document
        Hide
        Alberto Simões added a comment -

        Hey,

        Sorry for taking so much time, but I got some trouble on finding the portion that was giving trouble.

        I attached the docbook file, and the generated fo file. I can't attach the XSLT files, as they are too many

        Please let me know how/if I can help.

        Thank you
        Alberto

        Show
        Alberto Simões added a comment - Hey, Sorry for taking so much time, but I got some trouble on finding the portion that was giving trouble. I attached the docbook file, and the generated fo file. I can't attach the XSLT files, as they are too many Please let me know how/if I can help. Thank you Alberto
        Hide
        Glenn Adams added a comment -

        this bug is due to isBlockItem() returning true for wrapper

        } else if (!canHaveBlockLevelChildren && isBlockItem(nsURI, localName))

        { invalidChildError(loc, getParent().getName(), nsURI, getName(), "rule.inlineContent"); }

        else

        { in particular isBlockItem() returns true for block *or* neutral, so this condition needs to be further qualified as: }

        else if (!canHaveBlockLevelChildren && isBlockItem(nsURI, localName)
        && !isNeutralItem(nsURI, localName)) {

        Show
        Glenn Adams added a comment - this bug is due to isBlockItem() returning true for wrapper } else if (!canHaveBlockLevelChildren && isBlockItem(nsURI, localName)) { invalidChildError(loc, getParent().getName(), nsURI, getName(), "rule.inlineContent"); } else { in particular isBlockItem() returns true for block *or* neutral, so this condition needs to be further qualified as: } else if (!canHaveBlockLevelChildren && isBlockItem(nsURI, localName) && !isNeutralItem(nsURI, localName)) {
        Hide
        Glenn Adams added a comment -

        (In reply to comment #5)
        > this bug is due to isBlockItem() returning true for wrapper
        >
        > } else if (!canHaveBlockLevelChildren && isBlockItem(nsURI,
        > localName))

        { > invalidChildError(loc, getParent().getName(), nsURI, getName(), > "rule.inlineContent"); > }

        else

        { > > in particular isBlockItem() returns true for block *or* neutral, so this > condition needs to be further qualified as: > > }

        else if (!canHaveBlockLevelChildren && isBlockItem(nsURI,
        > localName)
        > && !isNeutralItem(nsURI, localName)) {

        see Inline.java:120

        Show
        Glenn Adams added a comment - (In reply to comment #5) > this bug is due to isBlockItem() returning true for wrapper > > } else if (!canHaveBlockLevelChildren && isBlockItem(nsURI, > localName)) { > invalidChildError(loc, getParent().getName(), nsURI, getName(), > "rule.inlineContent"); > } else { > > in particular isBlockItem() returns true for block *or* neutral, so this > condition needs to be further qualified as: > > } else if (!canHaveBlockLevelChildren && isBlockItem(nsURI, > localName) > && !isNeutralItem(nsURI, localName)) { see Inline.java:120
        Hide
        Glenn Adams added a comment -

        Attachment test.fo.xml has been added with description: minimal FO test file

        Show
        Glenn Adams added a comment - Attachment test.fo.xml has been added with description: minimal FO test file
        Show
        Glenn Adams added a comment - http://svn.apache.org/viewvc?view=revision&revision=1309024

          People

          • Assignee:
            fop-dev
            Reporter:
            Alberto Simões
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development