Whitespace handling changes in 11.1
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 176
- Joined: Wed Apr 29, 2009 4:55 pm
Whitespace handling changes in 11.1
Hello,
I've just discovered weird behaviour of the white space handling, which differs from version 11.0.
While in 11.0 all images (DocBook document) are inline according to the specificication in the CSS file:
in version 11.1 it is saved the following way:
To tell the truth, we use the same docbook4.framework file from 11.0 version and I've found there are small changes relative to all lists where xml:space preserve is 'Inside as first child' instead of 'Inside', but there is nothing connected to images.
I need to ensure original behaviour as now there are unintended spaces between text and inline images. Is there any workaround or fix for this? Is it necessary to change something?
Regards,
Jan
I've just discovered weird behaviour of the white space handling, which differs from version 11.0.
While in 11.0 all images (DocBook document) are inline according to the specificication in the CSS file:
Code: Select all
<inlinemediaobject><imageobject><imagedata
fileref="Icons/IconSave.gif"/></imageobject></inlinemediaobject>
Code: Select all
<inlinemediaobject>
<imageobject>
<imagedata fileref="Icons/IconSave.gif"/>
</imageobject>
</inlinemediaobject>
I need to ensure original behaviour as now there are unintended spaces between text and inline images. Is there any workaround or fix for this? Is it necessary to change something?
Regards,
Jan
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Whitespace handling changes in 11.1
Hi Jan,
Oxygen 11.1 also looks at the associated DTD information (which is considered more important than the CSS display) to determine whether an XML tag is element only (and it can be indented as a block) or with mixed content (and whitespaces cannot be added in order to indent it).
For example, the Docbook DTD says that inlinemediaobject is element only so the Oxygen format and indenter can format it by adding indent and line breaks. The XML should equivalent in both cases but if you want the old behavior you can go to the Oxygen Preferences Editor / Pages / Author / Schema aware page and uncheck the Schema aware normalization.... checkbox.
Regards,
Radu
Oxygen 11.1 also looks at the associated DTD information (which is considered more important than the CSS display) to determine whether an XML tag is element only (and it can be indented as a block) or with mixed content (and whitespaces cannot be added in order to indent it).
For example, the Docbook DTD says that inlinemediaobject is element only so the Oxygen format and indenter can format it by adding indent and line breaks. The XML should equivalent in both cases but if you want the old behavior you can go to the Oxygen Preferences Editor / Pages / Author / Schema aware page and uncheck the Schema aware normalization.... checkbox.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 176
- Joined: Wed Apr 29, 2009 4:55 pm
Re: Whitespace handling changes in 11.1
Thanks for the info, it helped. I am just curious what is the difference between this option and Editor|Format|XML|Schema aware format and indent option. I see the risk these two can interfere.
Jan
Jan
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Whitespace handling changes in 11.1
Hi,
The option you are referring to refers to the format and indent which happens in the Text page (by clicking the "Format and indent" toolbar action for example).
We have a separate checkbox for the Author because the Author looks in the CSS for some situations when schema-aware is enabled and thus has a subordinate checkbox: Indent blocks-only content.
So the two schema aware checkboxes apply to different pages.
Regards,
Radu
The option you are referring to refers to the format and indent which happens in the Text page (by clicking the "Format and indent" toolbar action for example).
We have a separate checkbox for the Author because the Author looks in the CSS for some situations when schema-aware is enabled and thus has a subordinate checkbox: Indent blocks-only content.
So the two schema aware checkboxes apply to different pages.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 176
- Joined: Wed Apr 29, 2009 4:55 pm
Re: Whitespace handling changes in 11.1
This sub option is still not very clear to me (maybe some use case could help), but if all this stuff if unchecked, I am still getting slight differences:
Instead of
I get:
Or instead of
this
(There is stilll enough place to keep starting element on the same line)
Any idea? It it important for us for version control...
Jan
Instead of
Code: Select all
<entry colname="col3"> </entry>
Code: Select all
<entry colname="col3">
</entry>
Code: Select all
<para>Check the appropriate installer files in the <guilabel
>...
Code: Select all
<para>Check the appropriate installer files in the
<guilabel>...
Any idea? It it important for us for version control...
Jan
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Whitespace handling changes in 11.1
Hi Jan,
We made changes so that format and indent when saving in the Author would be equivalent to format and indent in the Text mode.
For example the author had a tendency to break line between an element's tag start <guilabel and the > even if the element had no attributes, thing which did not happen in the Text mode.
I cannot reproduce the <entry> </entry> being split on multiple lines.
What Oxygen 11.2 will bring in addition to this will be that it will only format and indent the modified elements. So it will be far better for working with version control as XML modifications will be limited to the edited elements.
Regards,
Radu
We made changes so that format and indent when saving in the Author would be equivalent to format and indent in the Text mode.
For example the author had a tendency to break line between an element's tag start <guilabel and the > even if the element had no attributes, thing which did not happen in the Text mode.
I cannot reproduce the <entry> </entry> being split on multiple lines.
What Oxygen 11.2 will bring in addition to this will be that it will only format and indent the modified elements. So it will be far better for working with version control as XML modifications will be limited to the edited elements.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 176
- Joined: Wed Apr 29, 2009 4:55 pm
Re: Whitespace handling changes in 11.1
> What Oxygen 11.2 will bring in addition to this will be that it will only format and indent the modified elements.
This sounds really great!
(But I hope there will still be a chance to invoke reformatting for special cases manually)
After some consideration I tend to keep the default Oxygen settings. Our changes via css were almost workarounds and it is not necessary anymore.
There is the only css driven change of a default DocBook DTD behaviour when one combination of elements produces 'preserve-space' code. This, a bit surprisingly after all previously mentioned, works also if 'Schema aware formatting' is checked. I am just currious if this will be 'fixed' (and we will have to choose another approach (XSLT way) to get the intended output).
Regards,
Jan
This sounds really great!
(But I hope there will still be a chance to invoke reformatting for special cases manually)
After some consideration I tend to keep the default Oxygen settings. Our changes via css were almost workarounds and it is not necessary anymore.
There is the only css driven change of a default DocBook DTD behaviour when one combination of elements produces 'preserve-space' code. This, a bit surprisingly after all previously mentioned, works also if 'Schema aware formatting' is checked. I am just currious if this will be 'fixed' (and we will have to choose another approach (XSLT way) to get the intended output).
Regards,
Jan
-
- Posts: 9439
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Whitespace handling changes in 11.1
Hi Jan,
I should have been more precise.
The "Schema aware format and indent..." does not mean that only the associated schema is taken into account.
In the case of space preserve the following information is used in the following order:
1) If the XML <tag> contains an xml:space attribute or is the descendant of one.
2) If it is in a CSS white-space context.
3) If in the Oxygen Editor/Format/XML preferences page the element is in one if the space-preserve lists
4) If the associated schema specifies a default xml:space attribute for an element.
The same sources are used to consider an element mixed or element-only.
Regards,
Radu
I should have been more precise.
The "Schema aware format and indent..." does not mean that only the associated schema is taken into account.
In the case of space preserve the following information is used in the following order:
1) If the XML <tag> contains an xml:space attribute or is the descendant of one.
2) If it is in a CSS white-space context.
3) If in the Oxygen Editor/Format/XML preferences page the element is in one if the space-preserve lists
4) If the associated schema specifies a default xml:space attribute for an element.
The same sources are used to consider an element mixed or element-only.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service