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

Already on GitHub? Sign in to your account

Wrong XML Type name in XMLMini #6328

Closed
mblumtritt opened this Issue May 15, 2012 · 6 comments

Comments

Projects
None yet
4 participants

XML Mini (of ActiveSupport) defines the XML Type 'datetime' for Rubies DateTime and Time. But this is wrong. The XML Type has to be named 'dateTime' (with upper case letter 'T') - see http://www.w3.org/TR/xmlschema-2/#dateTime for more information…

Bug Location: definition of TYPE_NAMES in ActiveSupport::XmlMini; file xml_mini.rb in active_support

Contributor

acapilleri commented May 15, 2012

@rafaelfranca this fix seems only to change the related value of TYPE_NAMES, there's no test?

Owner

rafaelfranca commented May 15, 2012

No, but we have a TODO. If you can please add it.

Contributor

acapilleri commented May 16, 2012

@rafaelfranca , what do you think if i send a pull request for this issue that must to be fixed and we open another for the TODO test?

You need to change ActiveSupport::XmlMini::FORMATTING too!
Locally I use this patch in my Rails apps:

ActiveSupport::XmlMini::TYPE_NAMES.merge! "DateTime" => "dateTime", "Time" => "dateTime"
ActiveSupport::XmlMini::FORMATTING.merge! "dateTime" => ActiveSupport::XmlMini::FORMATTING["datetime"]
Contributor

acapilleri commented May 16, 2012

thanks @mblumtritt, yes ...I have seen there're other things to change

Owner

rafaelfranca commented May 16, 2012

well if we will change the behavior I expect tests with it.

@acapilleri acapilleri added a commit to acapilleri/rails that referenced this issue May 22, 2012

@acapilleri acapilleri changed wrong xml type datetime to dateTime, fixes #6328 8a80288

@acapilleri acapilleri referenced this issue May 22, 2012

Closed

Mini xml #6436

@acapilleri acapilleri referenced this issue May 22, 2012

Merged

Mini xml 4 #6446

@acapilleri acapilleri added a commit to acapilleri/rails that referenced this issue May 22, 2012

@acapilleri acapilleri + Angelo Capilleri changed xml type datetime to dateTime, fixes #6328
XmlMini define the xml *datatime*, but according to
http://www.w3.org/TR/xmlschema-2/#dateTime could be better
change this to *dateTime* with upper case letter 'T. So  *DateTime* and *Time*
are redefined from *datetime* to  *dateTime*

add the changing to the changelog
dff3526

@acapilleri acapilleri added a commit to acapilleri/rails that referenced this issue May 23, 2012

@acapilleri acapilleri Merge pull request #1 from acapilleri/mini_xml_4
changed  xml type datetime to dateTime, fixes #6328
73c9aa6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment