Programming Domain Elements

In DITA, the programming domain elements are used to define syntax and provide examples of programming languages, commands, APIs, file paths, and structured technical content.

code phrase (codeph)

The code phrase (codeph) element represents a snippet of code within the main flow of text.

Example: The <related-links> element is useful for maintaining links for users.

Inline code phrases are commonly used for configuration values, commands, API names, XML elements, and syntax references such as publish-content --profile portal-preview.

This intentionally long inline code example helps test wrapping and monospace styling behavior in Portal and PDF outputs: enterprise-publishing-preview-validation-workflow-configuration-profile.

codeblock (code block)

The codeblock element represents larger blocks of code or preformatted syntax.

XML
<map id="sample-map">
    <title>Portal Deployment</title>
</map>

Code blocks are useful for testing indentation, wrapping, overflow behavior, monospace fonts, and syntax highlighting.

JSON
{
  "environment": "preview",
  "profile": "customer-portal",
  "status": "successful"
}

filepath (file paths)

The filepath element identifies file names, directories, and filesystem paths.

Example: Save the PDF template in /templates/pdf/customer-branding/.

File paths may contain long directory structures to test wrapping behavior: /enterprise/content-management-system/configuration/deployments/customer-facing/preview-environment/.

  • C:\Program Files\Heretto\Publishing\
  • /opt/heretto/config/deployments/
  • \\shared-server\documentation\release-notes\

option (command options)

The option element identifies command-line options or switches.

Example: Run the deployment command using the --environment option.

BASH
publish-content --profile customer-portal --environment preview

parmname (parameter names)

The parmname element identifies parameter names in APIs, commands, or functions.

Example: The environment parameter controls the deployment target.

Table 1. API Parameter Examples
Parameter Description
profile Specifies the publishing profile.
environment Defines the deployment target.
outputFormat This intentionally longer parameter description helps test table wrapping behavior in Portal and PDF outputs.

synph (syntax phrase)

The synph element identifies syntax fragments within larger command or programming examples.

Example: Enter hostname:port using the correct server values.

Syntax phrases are often combined with parameter references such as <serverName>:<portNumber>.

apiname (API names)

The apiname element identifies API names, libraries, services, or frameworks.

Example: The Heretto Deploy API provides structured content delivery services.

This intentionally long API name helps test wrapping behavior: Enterprise Multi-Channel Structured Publishing Deployment API.

msgblock (message blocks)

The msgblock element represents system messages, logs, or console output.

Deployment completed successfully.
Preview environment updated.
PDF output generated.
[WARNING] Validation issue detected.
[INFO] Continuing deployment process.
[ERROR] Unable to locate branding asset.

Programming Rendering Stress Test

This section intentionally combines multiple programming domain elements to validate rendering consistency across Portal and PDF outputs.

Element Purpose
codeph Inline code fragment.
codeblock Block-level code example.
filepath Filesystem or directory path.
parmname Parameter name.
apiname API or service name.
msgblock System or console output block.
Important:

Programming domain topics often reveal layout issues involving monospace fonts, wrapping, overflow behavior, syntax highlighting, and inline spacing.