cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Inserting File Entities

akamaruzzaman
1-Newbie

Inserting File Entities

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?

1 ACCEPTED SOLUTION

Accepted Solutions

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>.

View solution in original post

3 REPLIES 3

Hi Anisah,

What DTD are you using?

Suzanne Napoleon

www.FOSIexpert.com

"WYSIWYG is last-century technology!"

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>.

rdiaz
5-Regular Member
(To:akamaruzzaman)

Hey Anisah,

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

Thanks!

Top Tags