rbarzic / dita-ng

Automatically exported from code.google.com/p/dita-ng
Apache License 2.0
0 stars 0 forks source link

Parameter entities for .ent files #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The .ent files for domain modules only include the "integration" entities, 
which are the entities that extend the base types. In the RNG these are defines 
where the name starts with the name of the domain and a trailing dash, e.g. 
"hi-d-":

  <define name="hi-d-ph">
    <choice>
      <ref name="b.element"/>
      ...
    </choice>
  </define>

You could get the module name from the domains-atts-value declaration: it 
should always be the second token within the parenthesized value:

  <define name="domains-atts-value" combine="choice">
    <value>(topic hi-d)</value>
  </define>

The <defines> that reference the "integration" defines would go in the shell 
DTD, not the module itself, because in DTD syntax they are specific to each 
shell. So those entities would never get generated in the .ent or .mod file, 
but only in the DTD shell.

Original issue reported on code.google.com by drmacro@gmail.com on 18 May 2013 at 8:40

GoogleCodeExporter commented 9 years ago
The .ent file also contains the @domains attribute declaration, which should 
have the name "{domain name}-att", e.g.:

<!ENTITY hi-d-att     
  "(topic hi-d)"
>

Thus, the rule is: for the <define> named "domains-atts-value", construct a 
parameter entity where the name is the domain name plus "-atts" and the 
replacement type is the content of the <value> element.

Original comment by drmacro@gmail.com on 18 May 2013 at 8:49

GoogleCodeExporter commented 9 years ago

Original comment by p.leblan...@gmail.com on 19 May 2013 at 12:51

GoogleCodeExporter commented 9 years ago
This is implemented in r86.

Original comment by p.leblan...@gmail.com on 24 May 2013 at 7:03