Answers are grounded in this paper and cite their sources.
The XML specification defines a syntax for, and semantics for, a document type definition (DTD). An XML document can optionally reference a DTD, which it does by means of a document type declaration. The DTD may contain constraints on the elements that can be found in the XML document, and what attributes they may contain. It may also define entities, which associate names with strings or with external resources such as XML fragments or images. The constraints can be checked using a process termed validation. The XML Data Model (XDM) does not expose declarations found in a document’s document type definition. As a result, XSLT stylesheets, XPath expressions, XQuery expressions, and anything else using the XDM, cannot reference them. Sometimes one might want (or need) to access declarations from a DTD. The author in the past has written programs in procedural languages such as C or Perl in order to access such declarations. This paper describes an XSLT stylesheet that parses DTD syntax and constructs a simple XML representation that can then be processed using XSLT or other XML-aware languages directly. Some use cases and examples are given. The work is publicly available on gitlab.
No takes yet. Share an insight, caveat, or question.
Liam Quin (2024) studied this question.
Synapse has enriched 8 closely related papers on similar clinical questions. Consider them for comparative context: