[erlang-bugs] xmerl trouble with validation anyURI type

Anton Ryabkov anton.ryabkov@REDACTED
Tue Mar 17 09:12:26 CET 2015


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150317/65b21cbc/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmerl_anyURI_bug.tar.gz
Type: application/x-gzip
Size: 2641 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150317/65b21cbc/attachment.bin>


More information about the erlang-bugs mailing list