<@td.content>
Rendering a DITA Map as One Page
The expandReferences
attribute can be used when referencing DITA maps to
insert an XML document containing all of the topics in the publication, instead of
the
flattened DITA map markup. The XML structure for this document is similar, but not
quite the
same, as the structure used by the DITA Open Toolkit when rendering PDF output.
- The root element is the map's root element.
- The first child of the root element is
<opentopic:map xmlns:opentopic="http://www.idiominc.com/opentopic">
.- This structure contains the original, unexpanded map structure, including the map title element.
- On each topicref, the ID of the corresponding topic element is in the
puckdita:cxt-topicId
attribute (xmlns:puckdita="http://www.titaniasoftware.com/namespace/puck-saxfilter-dita"
). - The metadata, including navtitle, for each topicref will have been resolved.
- After the
<opentopic:map>
element, all of the topics referenced by the map flow, nested as specified by the map. Navtitle-only topicrefs are rendered as topics with the appropriate title. Theid
attribute maps to thepuckdita:cxt-topicId
attribute for its topicref in the<opentopic:map>
section. - The
@href
attribute on allscope="local" format="dita"
links and cross-references will have already been converted into IDREF-style links (e.g.href="#targetId"
) that will resolve in the flattened document. - Related links, including those generated from reltables and the map structure, will
be
included in the topics. To avoid displaying them they must be excluded by the stylesheet.
You can differentiate authored links from generated links using the
puckdita:linkSource
attribute. If the attribute is not present, then the link was manually authored. Otherwise:"structure"
- The link is derived from the map structure.
"reltable"
- The link was generated from a reltable.
Viewing an XML Document as Transformed HTML
<@td.content url=itemUrl xsl="/topic/topic.xsl"> <@td.xslParam name="GENERATE-TASK-LABELS" value=true/> <@td.xslParam name="TASK-LABEL-TAG" value="h4"/> </@td.content>
This tag will render the content identified by the
object
itemUrl
using the XSLT
transformation in the portal theme at
/xsl/topic/topic.xsl
. It will
pass two parameters to the XSLT,
GENERATE-TASK-LABELS=true
and
TASK-LABEL-TAG=h4
.
Viewing a Contextualized Topic
<@td.content url=itemUrl contextUrl=contextUrl xsl="/topic/topic.xsl"/>
This loads the topic identified by the
itemUrl
, as referenced by the DITA map identified by
contextUrl
.
Rendering Content Based on Search
<@td.content searchTerm="serialno:12345" xsl="/topic/topic.xsl"/>
This will render the first document matching the given search.
Rendering an Assembly
<@td.content assembly=assemblyObj xsl="/map/map.xsl"/>
Rendering an Assembly Entry
<@td.content assembly=assemblyObj assemblyTopicRef=refId xsl="/topic/topic.xsl"/>
This will render a topic within object give by
assemblyObj
and refId
, the identifier of the topic
within the assembly.
Rendering All Topics in a DITA Map
<@td.content url="itemUrl" xsl="/map/monolith.xsl" expandReferences=true/>
This will use a version of the specified DITA map (or assembly) that is similar to, but not the same as, the monolithic XML structure used by the DITA Open Toolkit for PDFs.
Monolithic DITA Map XML Structure
Here is an example of what a DITA map rendered with expandReferences=true
might look like.
<map xmlns:puckdita="http://www.titaniasoftware.com/namespace/puck-saxfilter-dita" xmlns:opentopic="http://www.idiominc.com/opentopic"> <opentopic:map> <title>Map Title</title> <topicref puckdita:cxt-topicId="topic1"> <topicmeta> <navtitle>Topic One</navtitle> </topicmeta> <topicref puckdita:cxt-topicId="topic2"> <topicmeta> <navtitle>Topic Two</navtitle> </topicmeta> </topicref> </topicref> <topicref puckdita:cxt-topicId="topic3"> <topicmeta> <navtitle>Topic Three</navtitle> </topicmeta> </topicref> </opentopic:map> <topic id="topic1"> <title>Topic One</title> <!-- ... --> <topic id="topic2"> <title>Topic Two</title> <body> <p><xref href="#topic3">Topic 3</xref></p> </body> </topic> </topic> <topic id="topic3"> <title>Topic Three</title> <!-- ... --> </topic> </map>