Get hidden text in author view

Post here questions and problems related to oXygen frameworks/document types.
Denis
Posts: 47
Joined: Thu Jun 19, 2014 3:55 pm

Get hidden text in author view

Post by Denis »

Hi,
we are using the Eclipse Oxygen Author in Version 15.2.

If I drop a content reference into the editor, the author tab shows the reference content. In the text tab are requird elments hidden to remain the xml file valid. Is there a way to get these elements by giving the start and end offset?

Best regards,
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Get hidden text in author view

Post by Radu »

Hi Denis,
If I drop a content reference into the editor, the author tab shows the reference content.
Yes.
In the text tab are requird elments hidden to remain the xml file valid.


Is this a question? The Text page presents the XML content as it is, it cannot be customized to present content which is not there. It is based on an Eclipse Styled text to which you can gain access using ro.sync.exml.workspace.api.editor.page.text.WSTextEditorPage.getTextComponent().
The text page also has a couple of XML-specific API if you cast it to ro.sync.exml.workspace.api.editor.page.text.xml.WSXMLTextEditorPage.
Is there a way to get these elements by giving the start and end offset?
What elements?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Denis
Posts: 47
Joined: Thu Jun 19, 2014 3:55 pm

Re: Get hidden text in author view

Post by Denis »

Hi Radu,

my problem is a required attribute value in the text tab. If I drop the conref, the required elements and the required attributes will be created in the text tab. Now I have the problem, that a attribute value has to be set on a element in the text tab. If not the xml file is not valid.
I would to set a default value for this attribute, but I need these elements, which are hidden in the author tab. I can look for these elements in the file, but it would be nice, if I could get only the hidden part. Is this possible?

I hope the explaination is a bit more clear.

Best regards,
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
Radu
Posts: 9434
Joined: Fri Jul 09, 2004 5:18 pm

Re: Get hidden text in author view

Post by Radu »

Hi Denis,

I still don't fully understand. I don't understand if your problem is related to editing in the Text editing mode or in the Author editing mode or a mixture of both.

Please see some comments below:
my problem is a required attribute value in the text tab.
Ok, so you are editing the XML content in the Text editing mode.
If I drop the conref, the required elements and the required attributes will be created in the text tab.


You drop something in the Text editing mode from probably a custom view. And you have added a drop listener which creates the conref to that dropped target. Do I understand this correctly?
Now I have the problem, that a attribute value has to be set on a element in the text tab. If not the xml file is not valid.
But you said the required elements and attributes were created when the conref is dropped.
I would to set a default value for this attribute, but I need these elements, which are hidden in the author tab.
When an element makes a conref, it sometimes has required child elements which are hidden by default in the Author editing mode. But they can be edited using the API, they just are not visibile because the DITA CSS sets display:none on them. So you can access those hidden elements in the Author editing mode.
I can look for these elements in the file, but it would be nice, if I could get only the hidden part. Is this possible?
I don't understand your entire interaction with the editor.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Denis
Posts: 47
Joined: Thu Jun 19, 2014 3:55 pm

Re: Get hidden text in author view

Post by Denis »

Hi,
But they can be edited using the API, they just are not visibile because the DITA CSS sets display:none on them. So you can access those hidden elements in the Author editing mode.
You are right, I was blinded...
Thank you!

Regards,
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
Post Reply