if you are a human please do not click here
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
Username :
Password :
Home
Help
Calendar
Register
Login
XMetaL Community Forums
»
General
»
General XMetaL Discussion
»
disable text layout
Pages:
1
« previous
next »
Print
Author
Topic: disable text layout (Read 1151 times)
achu
Member
Posts: 39
disable text layout
«
on:
April 27, 2010, 10:06:17 AM »
By switching to the text view, the XMetal will apply text layout automatically according to your CTM settings.
However, the line breaks XMetal insert are not the "soft" line break. It removes the original line breaks as well as inserts the new line breaks.
Is there a way to disable/enable text layout on the fly?
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member
Posts: 1550
Re: disable text layout
«
Reply #1 on:
April 27, 2010, 07:25:07 PM »
There is no real way to do this. The only possibility I can think of is to have two CTM files and switch between them (perhaps by renaming the files on disk) but that would require reloading the XML document
ActiveDocument.Reload()
.
Not sure what you need this for. Perhaps you could elaborate on the ultimate goal so we can figure out if it can be done, or if we might want to add a feature to help you out.
I should also state that I'm a little confused because Pretty Printing (when enabled in the CTM) does not only apply when you switch to Plain Text view, it is applied to the file on disk when you save from TagsOn or Normal view. So, really you either have Pretty Printing turned on (in which case Plain Text view will match what you see when saving from TagsOn or Normal) or you have it turned off (and in this case, again, it should match).
«
Last Edit: April 27, 2010, 07:28:27 PM by Derek Read
»
Logged
achu
Member
Posts: 39
Re: disable text layout
«
Reply #2 on:
April 28, 2010, 09:40:49 AM »
Sometimes, the line break in XML means something, we don't actually want to get rid off it. Ideally, We anticipate that the view in the editor should be just another way to present data without changing the actual data.
Here is what we attempt to achieve.
Pass XML string to XMAX for review and editing.
As an option, editor may switch to plain text view. The reason we applying pretty print is to increase readability for raw xml and limit the usage of horizontal scroll.
After completion of editing in XMAX, return Document.xml string for the next process. At this point, the xml string return from document.xml is inserted with additional line breaks due to pretty printing setting and original line breaks are gone.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member
Posts: 1550
Re: disable text layout
«
Reply #3 on:
April 28, 2010, 12:23:21 PM »
The only way to have both features at the same time is to turn pretty printing on (globally) and configure how each element should be pretty printed, which includes turning it off entirely on individual elements where white-space should be considered significant. This is done using the "preserve space" option. That tells the pretty printer to skip over those elements when pretty printing the document (which is done when saving).
Logged
Pages:
1
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> Forum Information
=> General XMetaL Discussion
=> DITA and XMetaL Discussion
=> XMetaL Tips and Tricks
=> XMetaL Announcements and Events
Loading...
email us