docs icon indicating copy to clipboard operation
docs copied to clipboard

Improve sample template

Open ToshihikoMakita opened this issue 3 years ago • 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.

ToshihikoMakita avatar Sep 06 '21 01:09 ToshihikoMakita

@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.

infotexture avatar Sep 06 '21 15:09 infotexture

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.

jelovirt avatar Sep 07 '21 12:09 jelovirt