[XOM-interest] remove xmlinclude attributes

Jon Stockdill jon.stockdill at gmail.com
Thu May 28 10:37:33 EDT 2009


> xml:base is required by the spec to reproduce the correct infoset.
> However the xmlns="" looks weird. Is that actual, real output you're
> showing me? Or is maybe there a default namespace declaration on the
> parent document and not one on the child? If so, then it's necessary.
> If not, I suspect I can delete the xmlns="".


Thanks for the reply.  As I googled, I did find xml:base is required.
I was able to get XOM to include the file successfully.

The xmlns was added, I think, because I had a targetNamespace in the
parent and none in the child.  Once I added the targetNamespace in the
child, it disappeared.

The reason I had an issue w/ the xml:base attribute was because it was
failing to validate against my schema.  Adding:

<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2005/08/xml.xsd"/>
and
<xs:attribute ref="xml:base"/>

Solved the problem.  I found these referenced here:
http://www.oxygenxml.com/forum/topic1521.html

Armed with these fixes, I can use XOM, XInclude and JAXB together successfully.

Thanks for the reply and excellent library.

--jon


More information about the XOM-interest mailing list