Content Streams
PTC Arbortext Layout Developer loads content into a template to become a document. The loading process is handled by scripting written by the template designer. PTC Arbortext Layout Developer documents are not limited to a single main content stream, although only a single stream is passed to PTC ALD by Arbortext Publishing Engine or Arbortext Styler. Content streams are held in a number of tag types.
The PTC Arbortext Layout Developer document holds a copy of the content, which has some implications:
1. The content is usually loaded as an exact copy of the source content, unless an import script is applied, or a mapping or transformation is carried out. Note that the content pipeline may change the content, if working with Arbortext Publishing Engine and Arbortext Styler.
2. In PTC Arbortext Layout Developer templates, if the content has not been manipulated or transformed or subjected to the content pipeline, it can be edited and exported. Last-minute changes can be made if required.
There are three most common types of content stream to be aware of:
1. Text streams (.tx tags) are the original PTC Arbortext Layout Developer content stream type. They can hold any content, for example XML, SGML, or plain text. This type of stream should be used to create non-XML content for output or for storing information that could be saved to an external file. Text streams can be converted to XML by including the XML declaration at the top of the stream or as a tag property.
2. XML streams (.xm tags) are virtually identical to text streams. PTC Arbortext Layout Developer recognizes XML streams as XML, regardless of whether they contain the <?xml version=”1.0”?> declaration. This type of stream should be used to hold XML content that has been created or loaded from another location.
3. XML DOM tags (.xd) hold an XML DOM rather than editable text. The content stream from Arbortext Publishing Engine or Arbortext Styler is created as an XML DOM. The behavior of these streams differs to that of XML streams in that some PTC Arbortext Layout Developer XPath extension functions do not have the same effect and the DOM cannot be edited directly in PTC Arbortext Layout Developer. It is possible, however, to use DOM Level 2 Core commands in JavaScript to interact with the DOM. This type of stream should be used to hold the main content for a document or when creating a fragment of XML to augment another XML DOM. In the PTC ALD integration in Arbortext Publishing Engine or Arbortext Styler, an XML DOM content stream called editorDom0 is automatically created in the template.
Content streams drive PTC Arbortext Layout Developer’s formatting process. In an PTC Arbortext Layout Developer template, content streams are held in frames that appear on pages. The main content streams flow from one frame to the next. It is possible to have multiple main content streams and multiple frames on the same page that hold flowing content streams.
When assigning a content stream to a frame, PTC Arbortext Layout Developer can process an instruction to repeat the content stream when it next encounters the frame. This feature can be used to generate content such as running headers and bleed tabs.
Best Practices
• editorDom0 is a reserved name for XML DOM tags in PTC ALD as it is the name of the stream created automatically when formatting XML from Arbortext Publishing Engine or Arbortext Styler.
• Use text streams (.tx) to store non-XML text content.
• Use XML streams (.xm) to store XML text content.