You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Glen Daniels <gl...@thoughtcraft.com> on 2005/09/08 06:02:42 UTC
[axis2] stax-1.1.1-dev.jar
Hi Alek:
The new stax-1.1.1-dev.jar (from codehaus SVN) has a number of fixes I'd
like to get into Axis2 (incl the empty element optimization), but the
version we currently have from the default maven repositories seems to
be an older one.
Do you have a maven repo somewhere with the new one, or can you put it
up at ibiblio or apache?
--Glen
Re: [axis2] stax-1.1.1-dev.jar
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Glen Daniels wrote:
> Hi Alek:
>
>>> Unfortunately this version still seems to have problems with
>>> multiple namespaces when repairing is switched on. :( The version
>>> that I get when I maven from the SVN source that I picked up
>>> yesterday works great, but the one you refer to above doesn't.
>>
>>
>> yes! i was doing built from codehaus and i forgot to run svn up :(
>> [...]
>> please try now. should i cut it as a new version.
>
>
> No, that's great as is, thanks! But you should look into the other
> bug at some point. Reminder:
>
> XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newInstance();
>
> xmlOutputFactory.setProperty("javax.xml.stream.isRepairingNamespaces",
> Boolean.TRUE);
> XMLStreamWriter writer =
> xmlOutputFactory.createXMLStreamWriter(System.out);
> writer.writeStartElement("http://ns1", "foo");
> writer.writeNamespace("d", "http://ns1");
> writer.writeEndElement();
> writer.flush();
>
> Now generates:
>
> <ns1:foo xmlns:d="http://ns1"/>
>
> I think it should either be:
>
> <ns1:foo xmlns:ns1="http://ns1" xmlns:d="http://ns1"/>
>
> or
>
> <d:foo xmlns:d="http://ns1"/>
>
> (I prefer the 2nd, but it does involve a little more backtracking)
:) ok i check into it :))))
alek
>
> Thanks,
> --Glen
>
--
The best way to predict the future is to invent it - Alan Kay
Re: [axis2] stax-1.1.1-dev.jar
Posted by Glen Daniels <gl...@thoughtcraft.com>.
Hi Alek:
>> Unfortunately this version still seems to have problems with multiple
>> namespaces when repairing is switched on. :( The version that I get
>> when I maven from the SVN source that I picked up yesterday works
>> great, but the one you refer to above doesn't.
>
> yes! i was doing built from codehaus and i forgot to run svn up :(
> [...]
> please try now. should i cut it as a new version.
No, that's great as is, thanks! But you should look into the other bug
at some point. Reminder:
XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newInstance();
xmlOutputFactory.setProperty("javax.xml.stream.isRepairingNamespaces",
Boolean.TRUE);
XMLStreamWriter writer =
xmlOutputFactory.createXMLStreamWriter(System.out);
writer.writeStartElement("http://ns1", "foo");
writer.writeNamespace("d", "http://ns1");
writer.writeEndElement();
writer.flush();
Now generates:
<ns1:foo xmlns:d="http://ns1"/>
I think it should either be:
<ns1:foo xmlns:ns1="http://ns1" xmlns:d="http://ns1"/>
or
<d:foo xmlns:d="http://ns1"/>
(I prefer the 2nd, but it does involve a little more backtracking)
Thanks,
--Glen
Re: [axis2] stax-1.1.1-dev.jar
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Glen Daniels wrote:
> Hi Alek:
>
>> i have just rebuilt RI and the latest 1.1.2 version is in
>> http://dist.codehaus.org/stax/jars/
>
>
> Unfortunately this version still seems to have problems with multiple
> namespaces when repairing is switched on. :( The version that I get
> when I maven from the SVN source that I picked up yesterday works
> great, but the one you refer to above doesn't.
yes! i was doing built from codehaus and i forgot to run svn up :(
U src/com/bea/xml/stream/MXParser.java
U src/com/bea/xml/stream/ConfigurationContextBase.java
U src/com/bea/xml/stream/XMLWriterBase.java
please try now. should i cut it as a new version.
thanks,
alek
>
> Try the Axis2 test org.apache.axis2.om.AttrNsTest (in the xml module)
> with repairing namespaces switched on (uncomment line 89 in
> org.apache.axis2.om.impl.OMOutputImpl) to see the problem.
>
> Another problem can be seen with this code:
>
> XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newInstance();
> xmlOutputFactory.setProperty("javax.xml.stream.isRepairingNamespaces",
> Boolean.TRUE);
> XMLStreamWriter writer =
> xmlOutputFactory.createXMLStreamWriter(System.out);
> writer.writeStartElement("http://ns1", "foo");
> writer.writeNamespace("d", "http://ns1");
> writer.writeEndElement();
> writer.flush();
>
> This produces (using the version up on codehaus):
>
> <ns1:foo xmlns:d="http://ns1" xmlns:d="http://ns1"></ns1:foo>
>
> Clearly the namespace is being output twice (and you'll also note that
> your empty element optimization isn't present), but there is also
> another problem in that the "ns1" prefix isn't actually being defined!
> The latter problem, by the way, still exists even in the SVN code.
>
> --Glen
--
The best way to predict the future is to invent it - Alan Kay
Re: [axis2] stax-1.1.1-dev.jar
Posted by Glen Daniels <gl...@thoughtcraft.com>.
Hi Alek:
> i have just rebuilt RI and the latest 1.1.2 version is in
> http://dist.codehaus.org/stax/jars/
Unfortunately this version still seems to have problems with multiple
namespaces when repairing is switched on. :( The version that I get
when I maven from the SVN source that I picked up yesterday works great,
but the one you refer to above doesn't.
Try the Axis2 test org.apache.axis2.om.AttrNsTest (in the xml module)
with repairing namespaces switched on (uncomment line 89 in
org.apache.axis2.om.impl.OMOutputImpl) to see the problem.
Another problem can be seen with this code:
XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newInstance();
xmlOutputFactory.setProperty("javax.xml.stream.isRepairingNamespaces",
Boolean.TRUE);
XMLStreamWriter writer =
xmlOutputFactory.createXMLStreamWriter(System.out);
writer.writeStartElement("http://ns1", "foo");
writer.writeNamespace("d", "http://ns1");
writer.writeEndElement();
writer.flush();
This produces (using the version up on codehaus):
<ns1:foo xmlns:d="http://ns1" xmlns:d="http://ns1"></ns1:foo>
Clearly the namespace is being output twice (and you'll also note that
your empty element optimization isn't present), but there is also
another problem in that the "ns1" prefix isn't actually being defined!
The latter problem, by the way, still exists even in the SVN code.
--Glen
Re: [axis2] stax-1.1.1-dev.jar
Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Glen Daniels wrote:
> The new stax-1.1.1-dev.jar (from codehaus SVN) has a number of fixes
> I'd like to get into Axis2 (incl the empty element optimization), but
> the version we currently have from the default maven repositories
> seems to be an older one.
>
> Do you have a maven repo somewhere with the new one, or can you put it
> up at ibiblio or apache?
hi Glen,
i have just rebuilt RI and the latest 1.1.2 version is in
http://dist.codehaus.org/stax/jars/
thanks,
alek
--
The best way to predict the future is to invent it - Alan Kay