Inserting XML fragment adds xmlns="" attribute
Posted: Wed Jun 24, 2009 5:53 pm
Hi (me again),
I am developing a framework operation. The operation is responsible for surrounding a piece of text selected in the author window with some XML retrieved from a web app. The XML coming back from the webapp looks like this:
<legis-cite title="Directive 80/68 on the Protection of Groundwater Against Pollution" type="eudirective" year="1979" div-num="art1" div-seq="001" div-depth="1" lcr:id="111428075">
<ancestor-part div-num="root" div-seq="001" div-depth="0" lcr:id="294967762"></ancestor-part>
</legis-cite>
When I add it to the document using:
authorAccess.surroundInFragment(citation, offset, end);
the XML that gets inserted looks like this:
<legis-cite title="Directive 80/68 on the Protection of Groundwater Against Pollution" type="eudirective" year="1979" div-num="art1" div-seq="001" div-depth="1" lcr:id="111428075" xmlns="">
<ancestor-part div-num="root" div-seq="001" div-depth="0" lcr:id="294967762"></ancestor-part>
</legis-cite>
NOTE the additional 'xmlns=""' attribute in the top level legis-cite element.
Has anyone any ideas why this attribute is being added and what I can do to prevent it? Please bear in mind I'm a Java nerd not an XML nerd
Many thanks,
Simon.
I am developing a framework operation. The operation is responsible for surrounding a piece of text selected in the author window with some XML retrieved from a web app. The XML coming back from the webapp looks like this:
<legis-cite title="Directive 80/68 on the Protection of Groundwater Against Pollution" type="eudirective" year="1979" div-num="art1" div-seq="001" div-depth="1" lcr:id="111428075">
<ancestor-part div-num="root" div-seq="001" div-depth="0" lcr:id="294967762"></ancestor-part>
</legis-cite>
When I add it to the document using:
authorAccess.surroundInFragment(citation, offset, end);
the XML that gets inserted looks like this:
<legis-cite title="Directive 80/68 on the Protection of Groundwater Against Pollution" type="eudirective" year="1979" div-num="art1" div-seq="001" div-depth="1" lcr:id="111428075" xmlns="">
<ancestor-part div-num="root" div-seq="001" div-depth="0" lcr:id="294967762"></ancestor-part>
</legis-cite>
NOTE the additional 'xmlns=""' attribute in the top level legis-cite element.
Has anyone any ideas why this attribute is being added and what I can do to prevent it? Please bear in mind I'm a Java nerd not an XML nerd

Many thanks,
Simon.