Skip to main content
1-Visitor
July 8, 2015
Solved

Inserting File Entities

  • July 8, 2015
  • 3 replies
  • 1474 views

I'm having trouble inserting file entities. I want to insert a whole document and I'm able to create that entity but when I want to insert it there happens to be an error saying, "[A11132] Insertion of entity &filename would make <book> in entity &filename out of context". What does that mean? How do I fix this problem?

    Best answer by TimPhelps

    Anisah,

       Documents viewed in Arbortext Editor are not allowed to have multiple root elements.

    Thus if your file entity is <book>...</book> and you try to insert into a <book>...</book> document, then it will fail.

    For example in axdocbook you have a template file

    <?xml version-"1.0" encoding="UTF-8"?>

    <!-- Arbortext, Inc., 1988-2015, v.4002-->

    <!DOCTYPE book PUBLIC "-//Arbortext//DTD DocBook XML V4.0//EN" "axdocbook.dtd:>

    <book lang="en">

    <chapter>

    <title></title>

    <para></para>

    </chapter>

    </book>

    The file entity for the whole of the sample document would be

    <book lang="en">

    <title>PTC Employs......</title>

    ...

    </book>

    One cannot insert the fragment into the template document without making it out of context (inserting it somewhere within <book> and </book>), and

    it cannot be inserted before <book> or after </book>, because it would violate the rule having to have a single root element.

    Does that make sense?

    It might be better to create file entities for chapters. Those may then be inserted with <book> and </book>.

    3 replies

    12-Amethyst
    July 8, 2015

    Hi Anisah,

    What DTD are you using?

    Suzanne Napoleon

    www.FOSIexpert.com

    "WYSIWYG is last-century technology!"

    TimPhelps12-AmethystAnswer
    12-Amethyst
    July 10, 2015

    Anisah,

       Documents viewed in Arbortext Editor are not allowed to have multiple root elements.

    Thus if your file entity is <book>...</book> and you try to insert into a <book>...</book> document, then it will fail.

    For example in axdocbook you have a template file

    <?xml version-"1.0" encoding="UTF-8"?>

    <!-- Arbortext, Inc., 1988-2015, v.4002-->

    <!DOCTYPE book PUBLIC "-//Arbortext//DTD DocBook XML V4.0//EN" "axdocbook.dtd:>

    <book lang="en">

    <chapter>

    <title></title>

    <para></para>

    </chapter>

    </book>

    The file entity for the whole of the sample document would be

    <book lang="en">

    <title>PTC Employs......</title>

    ...

    </book>

    One cannot insert the fragment into the template document without making it out of context (inserting it somewhere within <book> and </book>), and

    it cannot be inserted before <book> or after </book>, because it would violate the rule having to have a single root element.

    Does that make sense?

    It might be better to create file entities for chapters. Those may then be inserted with <book> and </book>.

    5-Regular Member
    July 25, 2015

    Hey Anisah,

    Were you all set with regard to this issue, or did you have any follow-up questions?

    Thanks!