[WebApp] Define sub-topics of a topic read-only

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

[WebApp] Define sub-topics of a topic read-only

Post by Denis »

Hi,

I have the following use case, which I want to accomplish with the oxygen webapp:

The user opens a topic to edit some parts of it. In the middle of the topic is a subtopic, which he does not have to edit.
We are using processing instructions to define, which subtopic is read only.

Here is an example:

Code: Select all


...
<task id="task_fz4_b2h_55"> <--- this task should be editable
<title>Lorem ipsum</title>
<shortdesc>Lorem ipsum dolor sit amet</shortdesc>
<taskbody>
...
</taskbody>
<task id="task_gwp_r3h_55"> <--- this task should be read only
<? read-only ?> <--- read only pi
<title>sub title 1</title>
<taskbody>
<context>about</context>
<steps id="steps_p15_s3h_55">
<step>
<cmd>cmd</cmd>
</step>
</steps>
</taskbody>
</task>
<task id="task_s3q_t3h_55"> <--- this task should be editable
<title>sub title 2</title>
<taskbody>
<context>about</context>
<example>example</example>
</taskbody>
</task>
</task>
In the oxygen eclipse application we are accomplish this behaviour with the StylesFilter. The WebApp doesn't support the StylesFilter. We have also tried the https://www.oxygenxml.com/doc/versions/ ... ector.html, but unfortunately these won't work for processing instructions, yet.

Do you have any further ideas how we could accomplish this requirement for the webapp?

Thanks
Denis
Denis Zygann
KGU Consulting GmbH
http://www.kgu-consulting.com
alex_jitianu
Posts: 1009
Joined: Wed Nov 16, 2005 11:11 am

Re: [WebApp] Define sub-topics of a topic read-only

Post by alex_jitianu »

Hi Denis,

I've added an issue for supporting the Styles Filter extension in the WebApp too. My question is: would the subject selector working with processing instructions be enough for you? Because if it is, I could send you a build in which we've fixed this issue and the subject selector works with PIs. Please let me know if you would like me to send you such a build.

Best regards,
Alex
flo
Posts: 1
Joined: Thu Jan 28, 2016 4:39 pm

Re: [WebApp] Define sub-topics of a topic read-only

Post by flo »

Hi Alex,

I am a colleague of Denis.

thanks for adding the issue for supporting the Styles Filter extension in the WebApp.
We have further analyzed our requirments:
Given the following XML-structure:

Code: Select all


    <topic id="abc">
<?read-only yes ?>
<title>Title</title>
<topic id="subtopic-abc">
<?read-only no ?>
<title>Subtitle</title>
</topic>
</topic>
<topic id="abb">
<?read-only yes ?>
<title>new title</title>
</topic>
In combination with the following CSS:

Code: Select all


*! > oxy|processing-instruction[read-only][yes] {
background-color: gray !important;
-oxy-editable: false;
}
*! > oxy|processing-instruction[read-only][no] {
background-color: white !important;
-oxy-editable: true;
}
There are three issues we could not solve:
  • The PI-selector in combination with the subject selector (as mentioned in the prior post)
  • Re-enabling -oxy-editable within a topic that is not editable. We haven't found this working with CSS at all.
  • The PI-selector to match a parameter which is not in key="value" format. (We need <?read-only yes ?> instead of <?read-only parameter="yes" ?>). This is definitely least prioritized.
Thank you
Florian
alex_jitianu
Posts: 1009
Joined: Wed Nov 16, 2005 11:11 am

Re: [WebApp] Define sub-topics of a topic read-only

Post by alex_jitianu »

Hi Florian,
The PI-selector in combination with the subject selector (as mentioned in the prior post)
We can provide a build in which the PI-selector works in combination with the subject selector. In this build you will also be able to use the StylesFilter to set the oxy_editable property.
Re-enabling -oxy-editable within a topic that is not editable. We haven't found their working with CSS at all.
Yes, once you set an element as read-only, all of its descendants are read-only and you can't change this state through CSS rules. But we do have an issue already recorded to allow this behavior. The good news is that through a StylesFilter this behavior is already possible. A StylesFilter can mark a parent as oxy_editable:false and some of its descendants as oxy_editable:true.

I think one of my colleagues already gave Denis a build in which the StylesFilter can be used to set the oxy_editable property so you should be able to test both issue mentioned above. If not, please let me know and I can provide such a build.


The good news is that from an StylesFilter you can

Best regards,
Alex
Post Reply