DITA and XMetaL Discussion

XMetaL Community Forum DITA and XMetaL Discussion Long lines of code in Plain Text View

  • nancyt

    Long lines of code in Plain Text View

    Participants 2
    Replies 3
    Last Activity 13 years ago

    How do you prevent extremely long horizontal lines of code from appearing in xml files viewed in Plain Text View? I'm using XMetal Author 5.5 to edit DITA files with the options for Plain Text View set to the default setting (Word Wrap off). Is this what controls how the lines of code are constructed?

    Reply

    Derek Read

    Reply to: Long lines of code in Plain Text View

    There are two ways to handle this.

    1. Using the settings in the Tools > Options dialog on the PlainText view tab in the section called “Word Wrap” tells XMetaL to do “soft” wrapping (ie: what you see should not affect the actual XML and should not be saved to disk).

    2. Enable “Pretty Printing” by running the macro called “DITA Configuration: Turn ON Pretty-Printing” listed in the dropdown on the Macros toolbar. This *does* alter the XML content by inserting real line breaks, indentation, etc, so you should experiment with this on some test files and with the rest of your software, including the DITA OT and the specific output formats you generate using it, because many people (and the software they use) have different requirements for Pretty Printing.

    Pretty Printing can be further controlled (at the element level) by modifying the CTM file used by  the particular document type being edited. For DITA these files live here: DITAXACs_ditabase.ctm. That type of customization is not normally expected to be done by people not intimately familiar with creating XMetaL Author customizations (generally people that have XMetaL Developer), so if you have specific needs that the default Pretty Printing settings do not address you may wish to contract any required changes out to our Professional Services team or one of our partners.

    Non DITA:
    For people wondering if this affects them if they are not using DITA it does, everything here applies equally except for the macros specifically included with XMetaL Author Enterprise to make it easy to turn Pretty Printing on and off (these only affect DITA and simply copy a few existing files around). For all other DTDs and Schema the CTM file is designed as part of the customization (possibly created by you, one of our partners or our Professional Services team) using XMetaL Developer and its location will vary depending on the method you use to deploy your customization files. If you designed your customization then you will obviously know where the CTM file is. If you did not please check with the people that provided it and ask them to make changes.

    Reply

    achu

    Reply to: Long lines of code in Plain Text View

    How about in XMAX? how to wrap long line in the plain text view in XMAX?

    Reply

    Derek Read

    Reply to: Long lines of code in Plain Text View

    For XMAX someone will need to implement pretty printing settings in the CTM file if these have not already been set for the document type you are working with (basically the answer in my post under “Non DITA”).

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support