DITA and XMetaL Discussion
thekilla20 June 7, 2013 at 2:01 pm
Formatting DITA TopicsJune 7, 2013 at 2:01 pmParticipants 1Replies 2Last Activity 9 years, 3 months ago
I'm having an issue trying to understand how to format my DITA general topic.
Currently I'm using Xmetal Author Enterprise 8.0 on Windows 7 x64 and have a specific number of paragraphs and tables within a topic I wish to have centered while others remain the same.
How would I go about doing this?Derek Read June 7, 2013 at 7:26 pm
Reply to: Formatting DITA TopicsJune 7, 2013 at 7:26 pm
If you are asking about output then using the outputclass attribute is one option, unless your special paragraphs can be uniquely identified some other way (using their relationship to other elements or another attribute). You might also want to look at specializing DITA, but that will add more complexity.
The basic strategy for using outputclass is as follows:
1) Decide on some unique value(s) to use in @outputclass that would allow you to uniquely identify the elements in question. You might simply choose “centered”, but a more descriptive value that describes the type of content it contains is usually a better strategy (ie: keeping your formatting out of your XML is almost always best). That way, if you decide in the future that this content should be right aligned, or have blue text, or whatever, then you can just make the change in the XSLT and your DITA markup will still make sense.
2) Modify the XSLT in the DITA OT for the particular output type(s) you are producing so that the value you set in (1) is used to style the content differently from the default.
To have XMetaL display these elements the same way as in your customized output then the CSS that displays your DITA topics while editing can probably be modified to render them in a similar way as well (a table would need to be thinner than 100% wide in order to see it rendered centered while authoring). Most of the time this will be a fairly easy change to the CSS that drives the DITA authoring.thekilla20 June 12, 2013 at 1:27 pm
Reply to: Formatting DITA TopicsJune 12, 2013 at 1:27 pm
I've modified my outputclass values in my xml document, how would I go about modifying the XSLT in the DITA OT for both pdf and html so the attributes “centered” appear in my document output?
Assuming I'm using stock CSS' for my program.
- You must be logged in to reply to this topic.