ALD Objects > Tags
  
Tags
This section must begin by stating that the PTC ALD definition of a tag is not that expected by connoisseurs of markup languages. Within the realms of XML, HTML, SGML et al., a tag is a context element for text; in PTC ALD, a tag is a container for information of any kind. Information can be text, object graphics, raster graphics, page layouts, color definitions, bookmarks, scripts, control streams, etc. . Every object in PTC ALD has a specific tag type and a specific role to play . Please refer to PTC ALD Tag Types in the Reference Manuals section of PTC ALD help for a full list of tag types.
Regardless of type, the main purpose of a tag is twofold:
1. Build layout: contains formatting, property and reference information
2. Hold content: contains, for example, text or script information
A certain set of information is available for each tag, such as the number of characters in a text stream or the dimensions of a graphic. This data can be accessed manually by the desktop via the tbrowse macro or the Document > Tags > Browse tags menu option, or passed to a defined set of variables via the ttaginfo macro, or the Info tabs of the Browse tags dialog box, for use during the calculation of data for conditional formatting (see Variables for further information).
Most tags are simple text streams, which can be created dynamically. Once created they can also saved to file ready to be shared with other documents via the tsave and tload macros respectively, which can greatly simplify the creation of documents or templates.
It is possible to apply password protection to a tag. Refer to the tpass macro or the Document > Tags > Password protect tag menu option. This command invokes the Tag password/encryption dialog box from where, as the name suggests, you can also specify an encryption for a text tag.
Tag Libraries
Tags with a similar role can be grouped as tag libraries. A tag library is a file containing PTC ALD tags that can be saved outside the document in which the tags are used. When tag libraries are in place it is possible to share tags between documents by loading the tag as a link from the external tag library.
Namespaces
At times it is necessary to use similarly named tags in different contexts. To facilitate this use tags can be grouped into namespaces. The namespace tag (.Ns) constitutes the container for the tags within that namespace. Namespaces can also be nested in this way. It is possible to control the order in which namespaces are applied during formatting via the tnorder macro or the Document > Namespaces > Search list order menu option. A namespace can also be saved externally and loaded into any chosen document, via the tnsave and tnload macros respectively.
 
An PTC ALD namespace is different to an XML namespace. Although PTC ALD does support the tying of the two types of namespace to assist with the processing of XML documents, the two should not be confused.