Getting formatted code samples into DITA
Posted: Thu May 17, 2012 10:43 am
Could someone walk me through the preferred way to get code/markup into DITA using Oxygen? I knew how to do this by importing text files in other XML tools but I'm not working out how to do it with Oxygen. I read about <coderef> and tried that but not getting what I need.
I just want to insert something like this into a topic:
so it looks that way. If I paste it into a codeblock it doesn't come out that way, and if I use a link using coderef it just puts a reference, not the text displayed as above. I can use codeblock for code that's one line long, but nothing like the above it seems.
In Epic Editor I remember that this involved putting the xsl or xml markup into a separate text file and importing it a certain way, but I don't remember details. I'm sure there's something similar?
I just want to insert something like this into a topic:
Code: Select all
<xsl:template name="InsertFooter">
<fo:block>
<fo:table width="100%">
<fo:table-column column-number="1"
column-width="30%" />
<fo:table-column column-number="2"
column-width="40%" />
<fo:table-column column-number="3"
column-width="30%" />
<fo:table-body>
<fo:table-row height="10mm">
<fo:table-cell margin-left="0pt"
margin-right="0pt">
<fo:block margin-top="5pt"
text-align="left"></fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0pt"
margin-right="0pt">
<fo:block margin-top="5pt"
text-align="center">Copyright © 2012
</fo:block>
</fo:table-cell>
<fo:table-cell margin-left="0pt"
margin-right="0pt">
<fo:block margin-top="5pt"
text-align="right"><fo:page-number/></fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:template>
In Epic Editor I remember that this involved putting the xsl or xml markup into a separate text file and importing it a certain way, but I don't remember details. I'm sure there's something similar?