[oXygen-user] Attribute xmlns

Sorin Ristache
Mon Aug 3 08:52:33 CDT 2009


Hello,

A SDF document has the namespace 
"http://www.oxygenxml.com/sample/documentation". If you insert a 
paragraph element from no namespace in a SDF document Oxygen must set no 
namespace for the element, that is add the attribute xmlns="". If you 
want to add a paragraph with the namespace of the SDF document type you 
have to set this namespace for your paragraph before inserting it in the 
document as you see in the example from InsertImageOperation.java:


String imageFragment = "<image 
xmlns='http://www.oxygenxml.com/sample/documentation'" + " href='" + 
href + "'/>";

If the namespace of the parent element where you insert the XML fragment 
has the same namespace as the XML fragment (the SDF namespace) the xmlns 
attribute is suppressed from the inserted fragment.


Regards,
Sorin


Rogie Isabelle wrote:
> 
> 
> Hello,
> 
>  
> 
> I’ve tried to add the type document SDF in Author 10.3 (files given as 
> example in the documentation) and I have a problem when I want to add a 
> paragraph or a section in a new document: an empty attribute xmlns is 
> added in the element.
> 
> How to suppress those attributes?




More information about the oXygen-user mailing list