Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

encoding/xml: name space ignored on attribute #3526

Closed
rsc opened this Issue Apr 13, 2012 · 19 comments

Comments

Projects
None yet
4 participants
@rsc
Copy link
Contributor

rsc commented Apr 13, 2012

See.  http://play.golang.org/p/8ZsJ8ZzeIQ
The age attribute should (?) have a name space.
@niemeyer

This comment has been minimized.

Copy link
Contributor

niemeyer commented Apr 13, 2012

Comment 1:

Yeah, and on the same vein it must also handle foo>bar,attr.
@niemeyer

This comment has been minimized.

Copy link
Contributor

niemeyer commented Apr 15, 2012

Comment 2:

Owner changed to @niemeyer.

@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Apr 15, 2012

Comment 3 by chris.jones.yar:

A common example of this problem is the xml:lang attribute that appears in data formats
like XMPP's stanzas.
@gopherbot

This comment has been minimized.

Copy link

gopherbot commented May 27, 2012

Comment 4 by krolaw:

Should foo>bar,attr be listed as a separate bug?  I was bitten by it today.
@gopherbot

This comment has been minimized.

Copy link

gopherbot commented May 29, 2012

Comment 5 by chris.jones.yar:

They seem like separate bugs to me. I've started on a fix for this one, and it seems
like it won't fix the other problem.
@gopherbot

This comment has been minimized.

Copy link

gopherbot commented May 30, 2012

Comment 6 by krolaw:

Ok, foo>bar,attr bug added - https://golang.org/issue/3688
@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Aug 8, 2012

Comment 7 by BeMasher:

Ran into this issue with atom feeds from the picasa gdata api. The album feed produces
entries with id nodes in the atom namespace and later id nodes in the gphoto namespace. 
With the namespace url being ignored in the field's tag the last decoded id node
regardless of namespace is decoded into it.
@rsc

This comment has been minimized.

Copy link
Contributor Author

rsc commented Sep 12, 2012

Comment 8:

Labels changed: added go1.1maybe.

@rsc

This comment has been minimized.

Copy link
Contributor Author

rsc commented Sep 14, 2012

Comment 9:

Labels changed: removed go1.1maybe.

@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Oct 13, 2012

Comment 10 by robin.gloster:

You can do so by supplying the namespace URL instead of the Prefix:
Content     string   `xml:"http://purl.org/rss/1.0/modules/content/ encoded"`
instead of
Content     string   `xml:"content:encoded"`
@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Dec 2, 2012

Comment 11 by chris.jones.yar:

https://golang.org/cl/6868044 addresses this.
@rsc

This comment has been minimized.

Copy link
Contributor Author

rsc commented Dec 10, 2012

Comment 12:

Labels changed: added size-l.

@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Jan 7, 2013

Comment 13 by sorin.ionescu:

Thank you, Chris, for the https://golang.org/cl/6868044 patch; it looks
promising. We are not there yet. While it can marshal namespaces, it cannot unmarshal
them.
@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Jan 8, 2013

Comment 14 by chris.jones.yar:

Can you expand on that a bit? I'm using this code to marshal and unmarshal XMPP traffic,
which uses namespaces quite a bit.
It's not important to me whether my patch is the one that fixes this bug; I'd just like
to see it fixed. But if nobody else is going to fix it, I'd appreciate an explanation of
what requirements my patch needs to meet in order to be accepted.
@anacrolix

This comment has been minimized.

Copy link
Contributor

anacrolix commented Jan 8, 2013

Comment 15:

Welcome to "open source". :)
@rsc

This comment has been minimized.

Copy link
Contributor Author

rsc commented Mar 12, 2013

@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Mar 12, 2013

Comment 17 by cornelius.howl:

https://golang.org/cl/7350048/ Here is a simple patch.
@rsc

This comment has been minimized.

Copy link
Contributor Author

rsc commented Mar 12, 2013

Comment 18:

This issue was closed by revision 4dd3e1e.

Status changed to Fixed.

@gopherbot

This comment has been minimized.

Copy link

gopherbot commented Apr 9, 2014

Comment 19:

CL https://golang.org/cl/6868044 references this issue.

@rsc rsc added fixed labels Apr 9, 2014

@rsc rsc added this to the Go1.1 milestone Apr 14, 2015

@rsc rsc removed the go1.1 label Apr 14, 2015

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.