DITA Proposed Feature # 12060

coderef element for use within codeblock

Longer description

Create new coderef element modelled after xref, with equivalent attributes but no subelements, since the purpose of the element is to pull in the targetted file into the containing codeblock element, massaging < and > characters as necessary to make it valid CDATA.

Scope

Minor

Use Case

When documenting programs, need to pull in code from separate files where it can be maintained and compiled and validated, not copied and pasted and maintained separately.

Technical Requirements

New element called coderef, available as an optional child element of codebase, with the following attributes:
  • href
  • keyref
  • type
  • scope
  • format
  • id
  • conref
  • base
  • rev
  • status
  • outputclass
  • class
  • props
  • rev
  • product
  • platform
  • audience
  • otherprops

Costs

Trivial (copying xref and modifying its content)

Benefits

Gives authors the ability to pull in real working validated code into their code examples, rather than cutting and pasting and manually maintaining.

Time Required

1 day to change schemas/DTDs.