38.1.2 Including special characters in PI markers

For quoting, you can use either ' or ". For quotes within the content, use the other:

<?dthtm Config="[Attributes]body= onload='prettyPrint()'" ?>

You can also just escape whatever quote you used with a backslash within the quoted material:

<?dthtm Config="[Attributes]body= onload=\"prettyPrint()\"" ?>

PI markers used to insert HTML code or macros, such as Code and HTML Macro PI markers, must include an extra backslash in content to escape a required backslash, such as in a Windows file path:

<?dthtm HTML Macro='<$(($.\\filename.htm after "<body>") before "</body>")>' ?>

Doubled backslashes come out as singles in macros; see §37.1.1.3 Escaping special characters in macro definitions.

PI markers used for hypertext links might include backslashes in the content. In HyperJump and HyperAnchor PI markers, the backslashes are simply stripped; whatever followed them remains. In HyperLink PI markers, the backslashes remain also.

For PI markers of type HyperLink, make sure the file name is a URL, starting with file:/// before an absolute path beginning with a drive letter (for Windows), like this:

<?dthtm HyperLink="file:///D:/oh/site/ohframe.htm" ?>

Previous Topic:  38.1.1 Understanding DITA2Go PI marker syntax

Next Topic:  38.1.3 Deciding when to use PI markers

Parent Topic:  38.1 Understanding DITA2Go PI markers

Sibling Topics:

38.1.1 Understanding DITA2Go PI marker syntax

38.1.3 Deciding when to use PI markers

Table of ContentsIndex