Page 1 of 1
XML Edition Options
Posted: Thu Feb 29, 2024 9:48 pm
by aujunior
Good afternoon everyone!
I have 3 questions regarding the editing of XML elements via Oxygen Web Author.
They are:
1. Is there any way to lock the deletion of an element?
2. Is there any way to omit the ID from the "Full Tags with Attributes" view?
image.png
3. Is there any way for the system to change and save the text content of an element always in Uppercase?
Re: XML Edition Options
Posted: Mon Mar 04, 2024 11:43 am
by mihaela
Hello,
For 1 and 3 you can use the
ro.sync.ecss.extensions.api.AuthorDocumentFilter API to change the default editing behavior of Oxygen XML Web Author.
For 2 you can use the
ro.sync.exml.workspace.api.editor.page.author.WSAuthorEditorPageBase.addAuthorAttributesDisplayFilter(AuthorAttributesDisplayFilter) to add a filter for displaying attributes.
Best Regards,
Mihaela
Re: XML Edition Options
Posted: Fri Mar 08, 2024 12:34 pm
by cosminef
Hello,
We noticed that you contacted us via email regarding clarifications about this response received on the forum.
We kindly request you to provide the following details:
1. Could you detail this use case for us? Are there specific key elements (that you wish to be undeletable) such as 'title' of a document?
2. For this use case, we are trying to develop a sample that you can use. We are trying to make it available by next week.
3. Additionally, could you provide details on this use case as well? Do you need this transformation to uppercase in the publishing output, or only when the document is saved? Are there specific elements within which you want this transformation?
If due to confidentiality reasons you prefer to continue the discussion via email, please let us know.
Best,
Cosmin
Re: XML Edition Options
Posted: Fri Mar 08, 2024 3:45 pm
by aujunior
Hello!
1. Yes, that's right. We want to block the deletion of an XML element depending on a specific context. Example: We cannot delete a <title> inside a <warning>.
2. Thank you very much.
3. Yes, there are specific elements. Example: When we edit the content of a <warning> element we want the text content to always be in upper case, preferably it is already saved in upper case.
Re: XML Edition Options
Posted: Mon Mar 11, 2024 2:18 pm
by cosminef
Hello,
We thank you for the explanations.
1. If in the XML Schema or DTD used for editing the XML, that element <title> were specified as
required in <warning>, Web Author should somewhat take this into account. If you wish, you can send us your schema. If it contains confidential information, we can continue the discussion via email.
2. When we have a sample in this regard, we will notify you and thank you for your understanding.
3. For this use case, you can download this sample plugin [a] and modify the
custom-style.css file like this:
Code: Select all
warning {
text-transform: uppercase;
}
[a]
https://github.com/oxygenxml/web-author ... thor-style
Best,
Cosmin
Re: XML Edition Options
Posted: Tue Mar 12, 2024 5:09 pm
by cosminef
Hello,
Regarding the sample plugin that omits the 'id' attribute in the 'Full Tags with Attributes' view:
- Is it okay if the 'id' attributes no longer appear in the 'Attributes view' as well?
We mean here:
id-attribute.png
Best,
Cosmin
Re: XML Edition Options
Posted: Wed Mar 13, 2024 1:09 pm
by cosminef
Hello,
We wanted to inform you that we have available a sample plugin for the use case number '2' described by you.
You can download this plugin from here. [1]
Each folder contains one plugin. To install such a plugin you should:
- Download the entire repository
- If applicable, follow the instructions included in the README.md file of the desired plugin.
- Create an archive with just the folder that contains the desired plugin
- [Go to the Web Author Administration Page
- In the Plugins section, click Upload Plugin and choose the archive made at step 2.
- Restart the Web Author server.
You can test its functionality to see if it fits your needs
[1]
https://github.com/oxygenxml/web-author ... -attribute
Best,
Cosmin