xmlns attribute is getting added
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 93
- Joined: Mon Aug 08, 2022 2:32 pm
xmlns attribute is getting added
Post by SmitaPatil »
Hi Team,
I am using below InsertFragmentOperation class to insert tag into document.
this.editor.getActionsManager();
actionManager.invokeOperation('ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation', {
fragment:fragmentToInsert
//schemaAware :true
},
Tag is getting added but xmlns attriibute is getting added
Thanks,
Smita
I am using below InsertFragmentOperation class to insert tag into document.
this.editor.getActionsManager();
actionManager.invokeOperation('ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation', {
fragment:fragmentToInsert
//schemaAware :true
},
Tag is getting added but xmlns attriibute is getting added
image.png
Can you please let me know how can avoid it from getting added.Thanks,
Smita
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 172
- Joined: Tue Mar 20, 2018 5:28 pm
Re: xmlns attribute is getting added
Post by Bogdan Dumitru »
Hello Smita,
You may have missed specifying the namespace to the fragment that's inserted.
What is the namespace of the fragment to be inserted?
What is the namespace of the document's root element?
You may have missed specifying the namespace to the fragment that's inserted.
What is the namespace of the fragment to be inserted?
What is the namespace of the document's root element?
Bogdan Dumitru
http://www.oxygenxml.com
http://www.oxygenxml.com
-
- Posts: 93
- Joined: Mon Aug 08, 2022 2:32 pm
Re: xmlns attribute is getting added
Post by SmitaPatil »
Hi Bogdan,
Actually I just want to add tag in document.
for example in below case its a <bold></bold>
not a document.
Can you suggest any method or class which I can call to insert a tag or element in document.
Thanks & Regards,
Smita
Actually I just want to add tag in document.
for example in below case its a <bold></bold>
not a document.
Can you suggest any method or class which I can call to insert a tag or element in document.
Thanks & Regards,
Smita
-
- Site Admin
- Posts: 172
- Joined: Tue Mar 20, 2018 5:28 pm
Re: xmlns attribute is getting added
Post by Bogdan Dumitru »
Hi Smita,
Try adding the "xmlns" attribute to your fragment, somewhat like this:
For an in-depth understanding of how the InsertFragmentOperation works, see the Arguments of InsertFragmentOperation topic that describes how elements without a namespace are inserted:
Try adding the "xmlns" attribute to your fragment, somewhat like this:
Code: Select all
<b xmlns="[YOUR-NAMSEPACE]"></b>
If there is a default namespace declared in the document and the document fragment does not declare a namespace, the elements from the fragment are considered to be in no namespace.
Bogdan Dumitru
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