How to use following kind of tag to add or rename tag
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 93
- Joined: Mon Aug 08, 2022 2:32 pm
How to use following kind of tag to add or rename tag
Post by SmitaPatil »
Hi Team,
I want to add tag such as <?Pub Caret 44?> and <?Pub _link?> <?Pub /_link?> in document.
I tried to use surroundInFragment method but its not working.
Just wanted to check if there is any way to tag this kind of tag.
Thanks,
Smita
I want to add tag such as <?Pub Caret 44?> and <?Pub _link?> <?Pub /_link?> in document.
I tried to use surroundInFragment method but its not working.
Just wanted to check if there is any way to tag this kind of tag.
Thanks,
Smita
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: How to use following kind of tag to add or rename tag
Hello,
In general to insert an XML fragment you should use the API:ro.sync.ecss.extensions.api.AuthorDocumentController.insertXMLFragment(String, int).
For example, let's say that you want to insert the first processing instruction at caret offset. This is the sample code:
Please let us know if this is not right for your use case and you need more information.
Best Regards,
Mihaela
In general to insert an XML fragment you should use the API:ro.sync.ecss.extensions.api.AuthorDocumentController.insertXMLFragment(String, int).
For example, let's say that you want to insert the first processing instruction at caret offset. This is the sample code:
Code: Select all
String myFragment = "<?Pub Caret 44?>";
authorAccess.getDocumentController().insertXMLFragment(myFragment, authorAccess.getEditorAccess().getCaretOffset());
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 93
- Joined: Mon Aug 08, 2022 2:32 pm
Re: How to use following kind of tag to add or rename tag
Post by SmitaPatil »
Hi Mihaela,
Thank you.
Can you please tell the method using which we can just remove tag name without removing text inside it or any method using which we can replace tag name by processing instruction.
Thanks,
Smita
Thank you.
Can you please tell the method using which we can just remove tag name without removing text inside it or any method using which we can replace tag name by processing instruction.
Thanks,
Smita
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: How to use following kind of tag to add or rename tag
Hi Smita,
There is an API method that you can use to remove the tags of an element: ro.sync.ecss.extensions.commons.operations.CommonsOperationsUtil.unwrapTags(AuthorAccess, AuthorNode).
Then, to add the processing instructions just use the ro.sync.ecss.extensions.api.AuthorDocumentController.insertXMLFragment(String, int) method that I mentioned in my previous message.
Best Regards,
Mihaela
There is an API method that you can use to remove the tags of an element: ro.sync.ecss.extensions.commons.operations.CommonsOperationsUtil.unwrapTags(AuthorAccess, AuthorNode).
Then, to add the processing instructions just use the ro.sync.ecss.extensions.api.AuthorDocumentController.insertXMLFragment(String, int) method that I mentioned in my previous message.
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 93
- Joined: Mon Aug 08, 2022 2:32 pm
Re: How to use following kind of tag to add or rename tag
Post by SmitaPatil »
Hi Mihaela,
Thank you so much.
Can you please provide documentation link on handling Processing instruction in oxygen xml editor and web author .
it will be helpful.
Thanks,
Smita
Thank you so much.
Can you please provide documentation link on handling Processing instruction in oxygen xml editor and web author .
it will be helpful.
Thanks,
Smita
-
- Posts: 515
- Joined: Wed May 20, 2009 2:40 pm
Re: How to use following kind of tag to add or rename tag
Hi Smita,
Can you please give us more details about what do you mean by "handling Processing instruction"?
Here are some documentation links:
1. Oxygen XML Editor 24.1 User Guide
https://www.oxygenxml.com/doc/versions/24.1/ug-editor/
2. Oxygen XML Web Author 24.1 User Guide
https://www.oxygenxml.com/doc/versions/ ... webauthor/
3. Oxygen Web Author 24.1 Customization Guide
https://www.oxygenxml.com/doc/versions/ ... -waCustom/
Best Regards,
Mihaela
Can you please give us more details about what do you mean by "handling Processing instruction"?
Here are some documentation links:
1. Oxygen XML Editor 24.1 User Guide
https://www.oxygenxml.com/doc/versions/24.1/ug-editor/
2. Oxygen XML Web Author 24.1 User Guide
https://www.oxygenxml.com/doc/versions/ ... webauthor/
3. Oxygen Web Author 24.1 Customization Guide
https://www.oxygenxml.com/doc/versions/ ... -waCustom/
Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
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