Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Additional Namespaces when saving an XMLResource
Additional Namespaces when saving an XMLResource [message #1738921] Tue, 26 July 2016 07:33 Go to next message
Farid Cne is currently offline Farid CneFriend
Messages: 3
Registered: March 2015
Junior Member
Hello,
I have populated an XMLResource with its content and by default it saves me the following namespaces in the root tag definition:

xmlns="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd" xmlns:xhtml="http://www.w3.org/1999/xhtml"

I would like to insert other namespaces with the ones mentioned above when saving the resource :

xmlns:doors="http://www.ibm.com/rdm/doors/REQIF/xmlns/1.0" xmlns:reqif="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd"
xmlns:reqif-common="http://www.prostep.org/reqif"
xmlns:reqif-xhtml="http://www.w3.org/1999/xhtml"
xmlns:rm="http://www.ibm.com/rm"
xmlns:rm-reqif="http://www.ibm.com/rm/reqif"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

How could I do this?
Re: Additional Namespaces when saving an XMLResource [message #1739026 is a reply to message #1738921] Wed, 27 July 2016 04:52 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Does the model involved has a DocumentRoot? I.e., is this a model
generated from an XML Schema? If so, the DocumentRoot (it will be the
root object in Resource.getContents()) has as getXMLNSPrefixMap you can
populate.


On 26.07.2016 09:34, Farid Cne wrote:
> Hello,
> I have populated an XMLResource with its content and by default it
> saves me the following namespaces in the root tag definition:
>
> xmlns="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd"
> xmlns:xhtml="http://www.w3.org/1999/xhtml"
>
> I would like to insert other namespaces with the ones mentioned above
> when saving the resource :
>
> xmlns:doors="http://www.ibm.com/rdm/doors/REQIF/xmlns/1.0"
> xmlns:reqif="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd"
> xmlns:reqif-common="http://www.prostep.org/reqif"
> xmlns:reqif-xhtml="http://www.w3.org/1999/xhtml"
> xmlns:rm="http://www.ibm.com/rm"
> xmlns:rm-reqif="http://www.ibm.com/rm/reqif"
> xmlns:xhtml="http://www.w3.org/1999/xhtml"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> How could I do this?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:How to correctly save cross-referenced models to XMI
Next Topic:Neon: UpdateStrategy logs ERROR when binding Double to Text
Goto Forum:
  


Current Time: Sat Apr 27 00:54:46 GMT 2024

Powered by FUDForum. Page generated in 0.03163 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top