Pasting content, expanding contained text entities

Ed Benton and PG Bartlett help. Last Updated: 2006-09-25 Management summary: doc_flatten

=Question=

I need to paste considerable content containing text entities. However, I need to be able to paste the text entities (contained in the content) as plain text, and not as entities.

For example, if the content in the source document reads thus:

"To install , do the following..."

where  is a text entity.

I want the pasted content (in the destination document) to read thus:

"To install Product A, do the following..."

I wanted the text entity () to be replaced with just the plain text that the entity represents (Product A).

Is there some way I can accomplish this?

=Ed Benton=

I don't know for sure how this might work in Arbortext 5.2, but in Epic 4.3.1, there is an entity_flatten function, which will expand all of your entities to plain document content. You can specify text, file or all entities inside the parenthesis. Then you can copy the entites as just plain text and paste them as such.

If you exit without saving, the original document will revert back to having the entities. If you save the original, the entities willl remain flattened.

If the document into which you are pasting the entities is of a doctype that can resolve the entities, you could paste the entities and then flatten them.

If you want to be elegant, you could incorporate the entity_flatten function in some ACL code and use it with some callback function.

Note that the only way (in Epic 4.3.1) to undo entity_flatten is to exit without saving. Edit-Undo will not undo entity_flatten.

=PG Bartlett=

doc_flatten was added in 5.0 to replace entity_flatten because it handles XIncludes as well. The online help was updated to describe doc_flatten in 5.0 and the topic for entity_flatten was removed. Unfortunately, the release notes for 5.0 did not reflect this change.

The entity_flatten function still exists as of 5.2 (and 5.3) and we have no plans to get rid of it. We will consider adding a help topic with a note to say it's deprecated in favor of doc_flatten.