Mark Fletcher wrote:
> I'm trying to merge my 3.2 customizations with the 3.4 conref
> functionality. When I open a file with conrefs, the transcluded
> content doesn't automatically appear. I know the conref
> inclusionProcessor is activated, because I can use F2+xxx keys to force
> the transclusions. But what do I need to do to show transclusions upon
> opening a file?
Mark Fletcher wrote:
> I solved the problem. I needed to add this to my .xxe file:
>
> <dtd publicId="-//OASIS//DTD DITA Composite//EN" systemId="dtd/ditabase.dtd"
> />
>
> Out of curiousity, why does this affect conref transclusions?
Transclusion happens at a very early stage when the document is being
loaded.
During this very early stage, a DTD or schema must be really available
to XXE, otherwise there is no way to learn which are the attributes of
*type* ID.
Conref processing is based on the fact that topics, tasks, concepts,
etc, have an attribute of type ID. Conref processing is not based on the
fact that this attribute is always called "id".
> In fact, what is the element used for generally? Hussein, maybe you could
> elaborate on this documentation:
This configuration element is used for documents having no <!DOCTYPE>
explicitly specified in them. There are similar configuration elements
for W3C XML Schemas and for RELAX NG schemas.
The main use of this configuration element is for documents which are
not really documents per se, but rather modules intended to be included
in master documents.
All this does not make much sense for DITA where modular documents use
the conref mechanism. Moreover, to my knowlegde, the DITA OT really
requires you to specify a <!DOCTYPE> on all your DITA documents.
>
> "Use the DTD specified by this element to constrain the document."
> It appears that this tells XXE what DTD to use if no DOCTYPE is specified for
> a file. But, if no DOCTYPE is specified, how would the "detect" logic even
> have matched the file to the configuration?
>
The <detect> clause below, found in DITA_addon_dir/dita.xxe is used to
specify this:
---
<detect>
<or>
<dtdPublicId substring="true">DTD DITA Topic</dtdPublicId>
<dtdPublicId substring="true">DTD DITA Concept</dtdPublicId>
<dtdPublicId substring="true">DTD DITA Task</dtdPublicId>
<dtdPublicId substring="true">DTD DITA Reference</dtdPublicId>
<dtdPublicId substring="true">DTD DITA Composite</dtdPublicId>
<and>
<not><schemaType>schema</schemaType></not>
<schemaType xsi:nil="true" />
<rootElementNamespace xsi:nil="true" />
<or>
<rootElementLocalName>topic</rootElementLocalName>
<rootElementLocalName>concept</rootElementLocalName>
<rootElementLocalName>task</rootElementLocalName>
<rootElementLocalName>reference</rootElementLocalName>
<rootElementLocalName>dita</rootElementLocalName>
</or>
</and>
</or>
</detect>
---