xmerl trouble with validation anyURI type
Anton Ryabkov <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.bugs,gmane.comp.lang.erlang.patches |
|---|---|
| Message-ID | <CAH_Ks=Q1qYt_=srX21e6EAbM4U_rtJhn1==V_rn4--vJsCNdkA@mail.gmail.com> |
Hello, I have a trouble with validating xml document by xsd schema with attribute's type anyURI and value = "alerting.wav". According to RFC 3986 (Uniform Resource Identifier) "alerting.wav" is valid value for anyURI type. I've tried on Erlang R16B03, 17.4. I attached simple sample, where you can see this problem. To run it, compile xml_test and invoke "test" method. I've analyzed xmerl source code, and have found that in xmerl_xsd_type.erl file make validation anyURI type. According source code anyURI must contains SCHEME section, but by RFC 3986 this section is optional. I've made fix, that validate anyURI type according regular expression from RFC 3986, Appendix B. _______________________________________________ erlang-bugs mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-bugs
xmerl_anyURI_bug.tar.gz
(application/x-gzip, 2.6 KB) - not displayed