Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve sample template #354

Open
ToshihikoMakita opened this issue Sep 6, 2021 · 2 comments
Open

Improve sample template #354

ToshihikoMakita opened this issue Sep 6, 2021 · 2 comments
Labels
question Inquiry that may not require changes support Inquiries on how DITA/OT is intended to work

Comments

@ToshihikoMakita
Copy link

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.

@infotexture infotexture added question Inquiry that may not require changes support Inquiries on how DITA/OT is intended to work labels Sep 6, 2021
@infotexture
Copy link
Member

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

@jelovirt
Copy link
Member

jelovirt commented Sep 7, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Inquiry that may not require changes support Inquiries on how DITA/OT is intended to work
Projects
None yet
Development

No branches or pull requests

3 participants