XML Edition Options

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
aujunior
Posts: 27
Joined: Thu Feb 16, 2023 11:00 pm

XML Edition Options

Post 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
image.png (23.05 KiB) Viewed 519 times
3. Is there any way for the system to change and save the text content of an element always in Uppercase?
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: XML Edition Options

Post 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
Mihaela Calotescu
http://www.oxygenxml.com
cosminef
Site Admin
Posts: 76
Joined: Wed Aug 30, 2023 2:33 pm

Re: XML Edition Options

Post 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
Cosmin Eftenie
www.oxygenxml.com
aujunior
Posts: 27
Joined: Thu Feb 16, 2023 11:00 pm

Re: XML Edition Options

Post 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.
cosminef
Site Admin
Posts: 76
Joined: Wed Aug 30, 2023 2:33 pm

Re: XML Edition Options

Post 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
Cosmin Eftenie
www.oxygenxml.com
cosminef
Site Admin
Posts: 76
Joined: Wed Aug 30, 2023 2:33 pm

Re: XML Edition Options

Post 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
id-attribute.png (8.59 KiB) Viewed 281 times
Best,
Cosmin
Cosmin Eftenie
www.oxygenxml.com
cosminef
Site Admin
Posts: 76
Joined: Wed Aug 30, 2023 2:33 pm

Re: XML Edition Options

Post 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
Cosmin Eftenie
www.oxygenxml.com
Post Reply