You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Kapish Aggarwal <sc...@gmail.com> on 2007/03/09 20:39:53 UTC
Default Namespace in DOMXMLStreamReader in integration branch
During the execution of the Node2XMLStreamReader transform operation,
a code path compiles properties into a list, namely the different
namespaces and their prefixes. The code allows for the special case
for the default namespace (in
org.apache.tuscany.core.databinding.xml.DOMXMLStreamReader: line
1224):
if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(attr.getNamespaceURI()))
{
// Skip xmlns:xxx
if (!attr.getName().equals(attr.getLocalName())) {
// Skip xmlns="..."
registerNamespace(attr.getLocalName(), attr.getValue());
} else {
registerNamespace(XMLConstants.DEFAULT_NS_PREFIX,
attr.getValue());
}
continue;
}
In the integration branch
(http://svn.apache.org/repos/asf/incubator/tuscany/branches/sca-java-integration),
however, the tabulation doesn't account for this case:
if (XMLNS_ATTRIBUTE_NS_URI.equals(ns)) {
nsList.add(new QName(attr.getValue(), "", attr.getLocalName()));
}
When this transformation occurs, it tabulates the default namespace as
a prefix of "xmlns" resulting in a SOAP message with following
namespace definitions:
xmlns="..." xmlns:xmlns="..."
Was there a reason for this change in the integration branch or is
this a problem that needs to be fixed?
Kapish Aggarwal
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: Default Namespace in DOMXMLStreamReader in integration branch
Posted by Raymond Feng <en...@gmail.com>.
Hi, Kapish and Scott.
Thank you for reporting this and providing a patch. I fixed it and a few
related issues under revision r516566.
BTW, your patch didn't go through the ML but I have the fix :-). Next time
please attach the patch to a JIRA.
Thanks,
Raymond
----- Original Message -----
From: Scott Kurz
To: tuscany-dev@ws.apache.org
Sent: Friday, March 09, 2007 11:54 AM
Subject: Re: Default Namespace in DOMXMLStreamReader in integration branch
Assuming this was an oversight..attached is a patch in the integration
branch
On 3/9/07, Kapish Aggarwal < scakapish@gmail.com > wrote:
During the execution of the Node2XMLStreamReader transform operation,
a code path compiles properties into a list, namely the different
namespaces and their prefixes. The code allows for the special case
for the default namespace (in
org.apache.tuscany.core.databinding.xml.DOMXMLStreamReader : line
1224):
if
(XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(attr.getNamespaceURI()))
{
// Skip xmlns:xxx
if (!attr.getName().equals(attr.getLocalName())) {
// Skip xmlns="..."
registerNamespace(attr.getLocalName(), attr.getValue());
} else {
registerNamespace(XMLConstants.DEFAULT_NS_PREFIX ,
attr.getValue());
}
continue;
}
In the integration branch
(
http://svn.apache.org/repos/asf/incubator/tuscany/branches/sca-java-integration )
,
however, the tabulation doesn't account for this case:
if (XMLNS_ATTRIBUTE_NS_URI.equals(ns)) {
nsList.add(new QName(attr.getValue(), "",
attr.getLocalName()));
}
When this transformation occurs, it tabulates the default namespace as
a prefix of "xmlns" resulting in a SOAP message with following
namespace definitions:
xmlns="..." xmlns:xmlns="..."
Was there a reason for this change in the integration branch or is
this a problem that needs to be fixed?
Kapish Aggarwal
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org
Re: Default Namespace in DOMXMLStreamReader in integration branch
Posted by Scott Kurz <sc...@gmail.com>.
Assuming this was an oversight..attached is a patch in the integration
branch
On 3/9/07, Kapish Aggarwal <scakapish@gmail.com > wrote:
>
> During the execution of the Node2XMLStreamReader transform operation,
> a code path compiles properties into a list, namely the different
> namespaces and their prefixes. The code allows for the special case
> for the default namespace (in
> org.apache.tuscany.core.databinding.xml.DOMXMLStreamReader : line
> 1224):
>
> if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(
> attr.getNamespaceURI()))
> {
> // Skip xmlns:xxx
> if (!attr.getName().equals(attr.getLocalName())) {
> // Skip xmlns="..."
> registerNamespace(attr.getLocalName(), attr.getValue
> ());
> } else {
> registerNamespace(XMLConstants.DEFAULT_NS_PREFIX ,
> attr.getValue());
> }
> continue;
> }
>
> In the integration branch
> (http://svn.apache.org/repos/asf/incubator/tuscany/branches/sca-java-integration
> ),
> however, the tabulation doesn't account for this case:
>
> if (XMLNS_ATTRIBUTE_NS_URI.equals(ns)) {
> nsList.add(new QName(attr.getValue(), "",
> attr.getLocalName()));
> }
>
> When this transformation occurs, it tabulates the default namespace as
> a prefix of "xmlns" resulting in a SOAP message with following
> namespace definitions:
>
> xmlns="..." xmlns:xmlns="..."
>
> Was there a reason for this change in the integration branch or is
> this a problem that needs to be fixed?
>
> Kapish Aggarwal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>