Hi All,
 I have produced some simplified code to demonstrate what appears to
be a bug. However I would like to check with the list before I file a
report.

If I have the following code:


String uri = LocalReference.createClapReference(getClass().getPackage())
+ "/xmlwns.xml";
Representation listVtl = new ClientResource(uri).get();
SaxRepresentation r = new SaxRepresentation(listVtl);
log.debug(r.getText());

I observe the following behavior:

inputfile xmlwns.xml

<a xmlns="uri:a" xmlns:b="uri:b"  >
 <b:content/>
</a>

gives as output to the logger:

<a xmlns:b="uri:b" xmlns="uri:a">
 <b:content xmlns:b="uri:b"></b:content>
</a>

which is a little more verbose, but technically correct.

While with inputfile xmlwns.xml

<a:doc xmlns:a="uri:a" xmlns:b="uri:b" >
 <b:content/>
</a:doc>

gives as output to the logger:

<a:doc xmlns:a="uri:a" xmlns:b="uri:b" xmlns:a="uri:a">
 <b:content xmlns:b="uri:b"></b:content>
</a:doc>

you will see that the namspace definition for xmlns:a is duplicated,
which gives an error on some XML readers. For example Google Chrome
will complain about a redefinition of the namespace.

Whats your view on this? Is this a bug in Restlet?

Thanks a lot,
Regards,
Nicholas

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2944144

Reply via email to