Flattening files prior to translation

32 views
Skip to first unread message

mkaa...@gmail.com

unread,
Dec 10, 2013, 1:51:04 PM12/10/13
to dita-o...@googlegroups.com
There's been some discussion on the DITA users list lately about some of the localization issues that come up.

I really like George's idea to resolve everything into "simplified" DITA files prior to sending things off for translation.

This would allow the writers to continue using all of the DITA reuse mechanisms without causing mid-segment reference issues.

Any thoughts on how I could accomplish this?

Jarno Elovirta

unread,
Dec 10, 2013, 2:45:27 PM12/10/13
to Matt Kaatman, dita-o...@googlegroups.com
How does “simplified” DITA files differ from “normalized” DITA files? With “normalized” I mean DITA files where key and content references have been resolved, metadata has been cascaded inside maps and between maps and topics.

In DITA-OT the preprocessing step does exactly this. If you wanted to use the results of preprocessing for something other than output transtype, you could just:

1. strip out default attribute values, i.e. class and domains.
2. strip debug attributes, i.e. xtrc and xtrf
3. strip processing instructions and all DITA-OT specific attributes in DITA-OT namespace 
4. add doctype

You could also use the same approach with an additional step for e.g. sharing DITA content with other parties that just want to consume vanilla DITA

5. generalize all non-OASIS provided specializations to their base types

J

--
You received this message because you are subscribed to the Google Groups "DITA-OT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dita-ot-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

mkaa...@gmail.com

unread,
Dec 10, 2013, 3:18:57 PM12/10/13
to dita-o...@googlegroups.com, Matt Kaatman
Hey Jarno,

I'm looking at those files now and I think you've captured the exact differences.

What's the cleanest approach to strip those pieces out? Out of a bad habit I usually approach this kind of modification with regex. Is there a really generic way to run through every node with xslt and look for specific attributes to delete?

Thanks,
Matt

Jarno Elovirta

unread,
Dec 10, 2013, 3:44:57 PM12/10/13
to Matt Kaatman, dita-o...@googlegroups.com
You can create a transtype that will process all maps and topics with an identity transformation XSLT that does the cleanup. The ${fullditamapandtopicfile} property contains the filename of the list file you want to process with XSLT task.

J
Reply all
Reply to author
Forward
0 new messages