Support validation of resource xml files
---------------------------------------- Key: OFBIZ-4723 URL: https://issues.apache.org/jira/browse/OFBIZ-4723 Project: OFBiz Issue Type: Improvement Components: framework Affects Versions: SVN trunk Environment: REV 1297286 Reporter: Anne Jessel Priority: Minor The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. The attached patch: * provides a valid xsd * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list * includes simple unit tests for UtilProperties to ensure it does work with both formats * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anne Jessel updated OFBIZ-4723: ------------------------------- Attachment: OFBIZ-4723_support-validation-resource-xml.patch > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Priority: Minor > Attachments: OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anne Jessel updated OFBIZ-4723: ------------------------------- Attachment: OFBIZ-4723_code_cleanups.patch While creating the main patch, I made some minor code cleanups to these files. Including as a separate patch to aid review. Patch should be applied after main one. > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Priority: Minor > Attachments: OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236135#comment-13236135 ] Jacques Le Roux commented on OFBIZ-4723: ---------------------------------------- Anne, You don't need to do that when there is only one line, Debug.logInfo() will do it by itself. There is only a real gain when there are more than one line. - Debug.logInfo("Current file : " + fileInfo.getFileName(), module); + if (Debug.infoOn()) { + Debug.logInfo("Current file : " + fileInfo.getFileName(), module); + } > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Priority: Minor > Attachments: OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236135#comment-13236135 ] Jacques Le Roux edited comment on OFBIZ-4723 at 3/22/12 10:46 PM: ------------------------------------------------------------------ Edit ========= forgot {code} ============ Anne, You don't need to do that when there is only one line, Debug.logInfo() will do it by itself. There is only a real gain when there are more than one line. {code} - Debug.logInfo("Current file : " + fileInfo.getFileName(), module); + if (Debug.infoOn()) { + Debug.logInfo("Current file : " + fileInfo.getFileName(), module); + } {code} was (Author: jacques.le.roux): Anne, You don't need to do that when there is only one line, Debug.logInfo() will do it by itself. There is only a real gain when there are more than one line. - Debug.logInfo("Current file : " + fileInfo.getFileName(), module); + if (Debug.infoOn()) { + Debug.logInfo("Current file : " + fileInfo.getFileName(), module); + } > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Priority: Minor > Attachments: OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236135#comment-13236135 ] Jacques Le Roux edited comment on OFBIZ-4723 at 3/22/12 10:46 PM: ------------------------------------------------------------------ Edit ========= forgot \{code\} rhaaa²============ Anne, You don't need to do that when there is only one line, Debug.logInfo() will do it by itself. There is only a real gain when there are more than one line. {code} - Debug.logInfo("Current file : " + fileInfo.getFileName(), module); + if (Debug.infoOn()) { + Debug.logInfo("Current file : " + fileInfo.getFileName(), module); + } {code} was (Author: jacques.le.roux): Edit ========= forgot {code} ============ Anne, You don't need to do that when there is only one line, Debug.logInfo() will do it by itself. There is only a real gain when there are more than one line. {code} - Debug.logInfo("Current file : " + fileInfo.getFileName(), module); + if (Debug.infoOn()) { + Debug.logInfo("Current file : " + fileInfo.getFileName(), module); + } {code} > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Priority: Minor > Attachments: OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236163#comment-13236163 ] Anne Jessel commented on OFBIZ-4723: ------------------------------------ Jacques The purpose of the Debug.infoOn() call is to avoid unnecessary string concatenations and unnecessary object creation, which are slow operations. It also reduces the need for garbage collection. There is lots of advice around the web to follow this pattern, unless the log message does not include any concatenation or conversions. For example: http://logging.apache.org/log4j/1.2/faq.html#a2.3 and http://blog.progs.be/91/isdebugenabled > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Priority: Minor > Attachments: OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13236351#comment-13236351 ] Jacques Le Roux commented on OFBIZ-4723: ---------------------------------------- Anne, Ah ok, not sure it makes a huge difference, but I see now your point indeed. This should be our recommened way of doing then. We could even improve our current code. But I wonder if it's worth it: 9029 occurences of Debug.log... Not all with concatenation tough... > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Priority: Minor > Attachments: OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-4723. ---------------------------------- Resolution: Fixed Fix Version/s: SVN trunk Assignee: Jacques Le Roux Thanks Anne, Your patch is in trunk at r1304193. I did not back port, like you I don't think it's important enough for that. I have also updated the xsd on the site. > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-4723: ----------------------------------- Attachment: OFBIZ-4723_both.patch I attach both patches in one when applied to trunk HEAD (r1304738) > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux reopened OFBIZ-4723: ------------------------------------ I reverted because the test does not pass > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anne Jessel updated OFBIZ-4723: ------------------------------- Attachment: OFBIZ-4723_combined.patch New combined patch. > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_combined.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237831#comment-13237831 ] Jacques Le Roux commented on OFBIZ-4723: ---------------------------------------- Thanks Anne, Commited in trunk at r1305004 The base test suite was successfully run locally once UtilIOTests have been commented out (still an issue with it on Windows) > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_combined.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-4723. ---------------------------------- Resolution: Fixed > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_combined.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238067#comment-13238067 ] Anne Jessel commented on OFBIZ-4723: ------------------------------------ Thank you Jacques. I would just like to confirm so I know for next time: the problem was not actually caused by my patches. It was just bad luck a problem elsewhere made it look as if my patches were the cause. So I should prepare future patches the same way. Is that correct? > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_combined.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238158#comment-13238158 ] Jacques Le Roux commented on OFBIZ-4723: ---------------------------------------- Anne, I don't think so, unless Jacopo and Hans also ran the test on Windows. This bug is only known to appear on Windows. The real background problem we have at the moment is really that buildbot (OFBiz official CI) does not work, but that's another story. Please ask them on dev ML to be sure (in case they don't spot our messages) > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_combined.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238201#comment-13238201 ] Jacopo Cappellato commented on OFBIZ-4723: ------------------------------------------ I can confirm that two tests are still failing in latest trunk (rev.1305053): testReadXmlLangNewStyle and service-xml-rpc-local-engine Tested in OSX. > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_combined.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238257#comment-13238257 ] Anne Jessel commented on OFBIZ-4723: ------------------------------------ According to viewvc, UtilProperties.java has not been changed in 13 months. Which means this patch has not been applied successfully. Can anyone see why this part of the patch is not ending up in svn? Is the file locked or read-only or something? Index: framework/base/src/org/ofbiz/base/util/UtilProperties.java =================================================================== --- framework/base/src/org/ofbiz/base/util/UtilProperties.java (revision 1304746) +++ framework/base/src/org/ofbiz/base/util/UtilProperties.java (working copy) @@ -964,8 +964,14 @@ throw new IllegalArgumentException("locale cannot be null"); } String localeString = locale.toString(); + String correctedLocaleString = localeString.replace('_','-'); for (Element property : propertyList) { - Element value = UtilXml.firstChildElement(property, "value", "xml:lang", localeString); + // Support old way of specifying xml:lang value. + // Old way: en_AU, new way: en-AU + Element value = UtilXml.firstChildElement(property, "value", "xml:lang", correctedLocaleString); + if( value == null ) { + value = UtilXml.firstChildElement(property, "value", "xml:lang", localeString); + } if (value != null) { if (properties == null) { properties = new Properties(); @@ -1053,7 +1059,9 @@ bundle = new UtilResourceBundle(bundle.properties, locale, parentBundle); } double totalTime = System.currentTimeMillis() - startTime; - Debug.logInfo("ResourceBundle " + resource + " (" + locale + ") created in " + totalTime/1000.0 + "s with " + numProperties + " properties", module); + if (Debug.infoOn()) { + Debug.logInfo("ResourceBundle " + resource + " (" + locale + ") created in " + totalTime/1000.0 + "s with " + numProperties + " properties", module); + } bundleCache.put(resourceName, bundle); } } > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_combined.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anne Jessel updated OFBIZ-4723: ------------------------------- Attachment: OFBIZ-4723_UtilProperties_only.patch This patch has ONLY the changes to UtilProperties.java. Perhaps a patch that changes only this file will reveal why the other patches silently failed. > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_UtilProperties_only.patch, OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_combined.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238296#comment-13238296 ] Jacques Le Roux commented on OFBIZ-4723: ---------------------------------------- Anne, Oops, it's my fault. I had another changes pending for OFBIZ-4427 and did not notice I put this file in a svn changelist, so I did not commit it with the others. So I will revert it all reapply and commit and it should be OK. > Support validation of resource xml files > ---------------------------------------- > > Key: OFBIZ-4723 > URL: https://issues.apache.org/jira/browse/OFBIZ-4723 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Environment: REV 1297286 > Reporter: Anne Jessel > Assignee: Jacques Le Roux > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-4723_UtilProperties_only.patch, OFBIZ-4723_both.patch, OFBIZ-4723_code_cleanups.patch, OFBIZ-4723_combined.patch, OFBIZ-4723_support-validation-resource-xml.patch > > > The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard. > The attached patch: > * provides a valid xsd > * updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list > * includes simple unit tests for UtilProperties to ensure it does work with both formats > * changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file. > This problem exists in released versions, but I doubt it is important enough to back port. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |