dita-ot/docs

Improve sample template

Opened this issue · 2 comments

Description

Make it clear how the following sample template correspondence with DITA.

https://github.com/dita-ot/docs/blob/develop/topics/plugin-rewrite-rules.dita

<xsl:template match="file[@format = 'image']/@result">
  <xsl:attribute name="{local-name()}" select="concat('images/', .)"/>
</xsl:template>
  • What is "file" element?
  • What is "@Result" attribute?
  • Does above corresponds to actual DITA element & attributes? Or they are only the example?

Possible Solution

Add description to above template code.

Potential Alternatives

None

Additional Context

To dynamically adjust the names and locations of output files in the map-first pre-processing routine (preprocess2)

It is also unclear that this function guarantee the xref/@href rewrite or reltable references.

@jelovirt Can you provide further details on this?

I think it makes sense to provide more information here, but I don't know enough about how this works to answer the questions above.

The first thing would be that we'd need to document the .job.xml i.e. Job object serialization format. The Job object itself has some Javadoc.

  • <file> – Resource DITA-OT is aware of, most commonly a file in the temporary folder.
  • @src - Absolute source URI.
  • @uri - Relative URI in the temporary folder.
  • @result - Absolute result URI for the resource. This is not the result URI in the output directory, but rather something else.

I'll fill this comment out when I have time.