Possibility to find out if an XML is shwon in a single line or not?
Oxygen general issues.
-
- Posts: 206
- Joined: Thu Dec 01, 2011 4:22 pm
- Location: Hamburg, Germany
Possibility to find out if an XML is shwon in a single line or not?
Hello,
is it somehow possible to find out if a certain AuthorElement is shown in a single line or not?
The reason for this is that I´d like to like to style those AuthorElements in a single line differently than those who go over several lines.
Particularly I mean the display style of the border to distinguish between "inline" and "inline-block".
Unfortunately with "inline-block" style in version 14.2 the border is still also drawn around those xml tags, which do not belong to the xml tag, which actually should have the border.
And the "inline" style does not look good over more than one line.
Best regards,
Simon
is it somehow possible to find out if a certain AuthorElement is shown in a single line or not?
The reason for this is that I´d like to like to style those AuthorElements in a single line differently than those who go over several lines.
Particularly I mean the display style of the border to distinguish between "inline" and "inline-block".
Unfortunately with "inline-block" style in version 14.2 the border is still also drawn around those xml tags, which do not belong to the xml tag, which actually should have the border.
And the "inline" style does not look good over more than one line.

Best regards,
Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Possibility to find out if an XML is shwon in a single line or not?
Hi Simon,
We do not have API to identify whether an element's content will span one or multiple lines.
Also Oxygen does not (yet) have support for the CSS display:inline-block so it ignores it in the CSS, probably in your case it considers the element to be inline.
So I do not have a workaround for you.
Regards,
Radu
We do not have API to identify whether an element's content will span one or multiple lines.
Also Oxygen does not (yet) have support for the CSS display:inline-block so it ignores it in the CSS, probably in your case it considers the element to be inline.
So I do not have a workaround for you.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 206
- Joined: Thu Dec 01, 2011 4:22 pm
- Location: Hamburg, Germany
Re: Possibility to find out if an XML is shwon in a single line or not?
Hello Radu,
Okay then we´ll have to go back to the "block" display border, which unfortunately also draws a border around those XML tags, which shouldn´t have one :

I thought "inline" display would be the solution, but that does not really look good and gets worse the more lines a node has:

It would have been nice to have something like this without turning off the compact tag layout:

Best regards,
Simon
Okay then we´ll have to go back to the "block" display border, which unfortunately also draws a border around those XML tags, which shouldn´t have one :

I thought "inline" display would be the solution, but that does not really look good and gets worse the more lines a node has:

It would have been nice to have something like this without turning off the compact tag layout:

Best regards,
Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Possibility to find out if an XML is shwon in a single line or not?
Hi Simon,
So right now the problem with image (1) is that because of the compact tags layout (which is a default setting) inside the border of "solution" there are also compacted end tags for the parent elements of "solution".
We'll try to work on this one, if an element specifies a border around it somehow disable the compacting of parent start and end parent element tags inside it.
Regards,
Radu
So right now the problem with image (1) is that because of the compact tags layout (which is a default setting) inside the border of "solution" there are also compacted end tags for the parent elements of "solution".
We'll try to work on this one, if an element specifies a border around it somehow disable the compacting of parent start and end parent element tags inside it.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 206
- Joined: Thu Dec 01, 2011 4:22 pm
- Location: Hamburg, Germany
Re: Possibility to find out if an XML is shwon in a single line or not?
Hi Radu,
The actually desired way of styling is this:

In the other one of the previous post the solution tag is placed inline, but this here is better
Best regards,
Simon
Thanks that would be greatWe'll try to work on this one, if an element specifies a border around it somehow disable the compacting of parent start and end parent element tags inside it.

The actually desired way of styling is this:

In the other one of the previous post the solution tag is placed inline, but this here is better

Best regards,
Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Possibility to find out if an XML is shwon in a single line or not?
Hi Simon,
Yes, the solution we are working on should render the desired layout.
Do you want a beta kit when this is available in order to test on your side?
Regards,
Radu
Yes, the solution we are working on should render the desired layout.
Do you want a beta kit when this is available in order to test on your side?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 206
- Joined: Thu Dec 01, 2011 4:22 pm
- Location: Hamburg, Germany
Re: Possibility to find out if an XML is shwon in a single line or not?
Hi Radu,
I didn´t expected such a quick answer and that you directly implement a solution for this issue.
Thanks for such a great support again
Of couse I would appreciate to have a beta kit in order to test it for you.
Best regards,
Simon
I didn´t expected such a quick answer and that you directly implement a solution for this issue.
Thanks for such a great support again

Of couse I would appreciate to have a beta kit in order to test it for you.
Best regards,
Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
-
- Posts: 206
- Joined: Thu Dec 01, 2011 4:22 pm
- Location: Hamburg, Germany
Re: Possibility to find out if an XML is shwon in a single line or not?
Hello Radu,
Thanks for offering me the beta kit for this issue.
I just testet it and it seems to be fine
, but when I add a border dynamically(by using a ro.sync.ecss.extensions.api.StylesFilter) at runtime the wrong styling occurs again unless I do a refresh() on the whole document.
Would it maybe possible to rearrange the XML tags, when a border is added by a StylesFilter?
I mean to refresh the editor after adding the Border programmatically works, but I think this must not be necessary, because the border itself is also directly drawn without a refresh.
I am only asking for this, because I do not want to waste performance by refreshing the whole document every time a border is added, in case you could do rearrange in a more performant way.
Best regards,
Simon
Thanks for offering me the beta kit for this issue.
I just testet it and it seems to be fine

Would it maybe possible to rearrange the XML tags, when a border is added by a StylesFilter?
I mean to refresh the editor after adding the Border programmatically works, but I think this must not be necessary, because the border itself is also directly drawn without a refresh.
I am only asking for this, because I do not want to waste performance by refreshing the whole document every time a border is added, in case you could do rearrange in a more performant way.

Best regards,
Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
-
- Posts: 206
- Joined: Thu Dec 01, 2011 4:22 pm
- Location: Hamburg, Germany
Re: Possibility to find out if an XML is shwon in a single line or not?
Hello again,
I just figured out that this also works and of cause performs better:
So well done 
Or can you do it even more performant than using WSAuthorEditorPage.refresh(authorNodeWithBorder.getParent());?
Best regards,
Simon
I just figured out that this also works and of cause performs better:
Code: Select all
AuthorNode authorNodeWithBorder = ...
ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPage.refresh(authorNodeWithBorder.getParent());

Or can you do it even more performant than using WSAuthorEditorPage.refresh(authorNodeWithBorder.getParent());?
Best regards,
Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Possibility to find out if an XML is shwon in a single line or not?
Hi Simon,
Actually we added the refresh API for just such cases.
The Author mode has a layout stage in which the layout of the content is computed (where each component is placed) and a rendering stage which gets called quite often when the components are painted on screen.
Usually when the document is not modified the StylesFilter is called from the painting stage and even if you set the border, the layout was already computed so you need to somehow force the layout on a certain node.
Indeed a possible problem could be a decrease in performance as the StylesFilter gets called quite a lot.
You should try to use JProfiler to profile the CPU when using the Eclipse application when working with a larger XML document, see if the styles filter accounts for a lot of processing. We use JProfiler internally quite a lot.
Regards,
Radu
Actually we added the refresh API for just such cases.
The Author mode has a layout stage in which the layout of the content is computed (where each component is placed) and a rendering stage which gets called quite often when the components are painted on screen.
Usually when the document is not modified the StylesFilter is called from the painting stage and even if you set the border, the layout was already computed so you need to somehow force the layout on a certain node.
Indeed a possible problem could be a decrease in performance as the StylesFilter gets called quite a lot.
You should try to use JProfiler to profile the CPU when using the Eclipse application when working with a larger XML document, see if the styles filter accounts for a lot of processing. We use JProfiler internally quite a lot.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 206
- Joined: Thu Dec 01, 2011 4:22 pm
- Location: Hamburg, Germany
Re: Possibility to find out if an XML is shwon in a single line or not?
Hi Radu,
ok thanks for the hint.
We do also use Profilers in some cases.
As I received a beta kit of version 15 I guess this feature cannot be merged into the 14.2 release, right?
I would really appreciate to have this feature now, because I guess the realse of version 15 will be in autumn this year, right?
Best regards,
Simon
ok thanks for the hint.
We do also use Profilers in some cases.
As I received a beta kit of version 15 I guess this feature cannot be merged into the 14.2 release, right?
I would really appreciate to have this feature now, because I guess the realse of version 15 will be in autumn this year, right?
Best regards,
Simon
Simon Scholz
vogella GmbH
http://www.vogella.com
vogella GmbH
http://www.vogella.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Possibility to find out if an XML is shwon in a single line or not?
Hi Simon,
I would be reticent integrating the changes in the minor bug fix versions of 14.2.
But version 15.0 will probably be released at the end of May, or beginning of June 2013, so not that late.
Regards,
Radu
I would be reticent integrating the changes in the minor bug fix versions of 14.2.
But version 15.0 will probably be released at the end of May, or beginning of June 2013, so not that late.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9445
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Possibility to find out if an XML is shwon in a single l
Hi Simon,
We released Oxygen 15.0 a couple of days ago, maybe you can check it out when you have the time.
Regards,
Radu
We released Oxygen 15.0 a couple of days ago, maybe you can check it out when you have the time.
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