diff options
author | Lars Thorsen <[email protected]> | 2011-08-10 10:40:11 +0200 |
---|---|---|
committer | Lars Thorsen <[email protected]> | 2011-08-10 10:40:11 +0200 |
commit | b340f753e6ed4d92bb9df74e070e325400f54ab4 (patch) | |
tree | c770b3376654baa489d909f73700b95d7a17dec3 /lib | |
parent | b1b329ab6ee0577a616460454a8477cc4b4a1f5e (diff) | |
parent | 82dba8f37f312e8ae0f4b175d8e0a522788571a7 (diff) | |
download | otp-b340f753e6ed4d92bb9df74e070e325400f54ab4.tar.gz otp-b340f753e6ed4d92bb9df74e070e325400f54ab4.tar.bz2 otp-b340f753e6ed4d92bb9df74e070e325400f54ab4.zip |
Merge branch 'dev' into major
* dev:
Added test case for ticket 9411.
Entity replacement in attributes doesn't work poperly.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xmerl/src/xmerl_scan.erl | 2 | ||||
-rw-r--r-- | lib/xmerl/test/xmerl_SUITE.erl | 13 | ||||
-rw-r--r-- | lib/xmerl/test/xmerl_SUITE_data/misc.tar.gz | bin | 47121 -> 47340 bytes |
3 files changed, 13 insertions, 2 deletions
diff --git a/lib/xmerl/src/xmerl_scan.erl b/lib/xmerl/src/xmerl_scan.erl index 059c8f21b6..e598c5f56d 100644 --- a/lib/xmerl/src/xmerl_scan.erl +++ b/lib/xmerl/src/xmerl_scan.erl @@ -2276,7 +2276,7 @@ scan_att_chars([H|T], S0, H, Acc, TmpAcc,AttType,IsNorm) -> % End quote true -> normalize(Acc,S,IsNorm) end, - {lists:reverse(Acc2), T, S2,IsNorm2}; + {lists:flatten(lists:reverse(Acc2)), T, S2,IsNorm2}; scan_att_chars("&" ++ T, S0, Delim, Acc, TmpAcc,AT,IsNorm) -> % Reference ?bump_col(1), {ExpRef, T1, S1} = scan_reference(T, S), diff --git a/lib/xmerl/test/xmerl_SUITE.erl b/lib/xmerl/test/xmerl_SUITE.erl index 392b2522e8..0c809dbcb6 100644 --- a/lib/xmerl/test/xmerl_SUITE.erl +++ b/lib/xmerl/test/xmerl_SUITE.erl @@ -57,7 +57,8 @@ groups() -> {eventp_tests, [], [sax_parse_and_export]}, {ticket_tests, [], [ticket_5998, ticket_7211, ticket_7214, ticket_7430, - ticket_6873, ticket_7496, ticket_8156, ticket_8697]}, + ticket_6873, ticket_7496, ticket_8156, ticket_8697, + ticket_9411]}, {app_test, [], [{xmerl_app_test, all}]}, {appup_test, [], [{xmerl_appup_test, all}]}]. @@ -575,7 +576,17 @@ ticket_8697(Config) -> ?line [16#545C] = HexEntityText, ok. +ticket_9411(suite) -> []; +ticket_9411(doc) -> + ["Test that xmerl_scan handles attribute that contains for example ""]; +ticket_9411(Config) -> + DataDir = ?config(data_dir,Config), + ?line {ok, Schema} = xmerl_xsd:process_schema(filename:join([DataDir,"misc/ticket_9411.xsd"])), + ?line {ok, Bin} = file:read_file(filename:join([DataDir,"misc/ticket_9411.xml"])), + ?line Xml = erlang:binary_to_list(Bin), + ?line {E, _} = xmerl_scan:string(Xml), + ?line {E, _} = xmerl_xsd:validate(E, Schema). diff --git a/lib/xmerl/test/xmerl_SUITE_data/misc.tar.gz b/lib/xmerl/test/xmerl_SUITE_data/misc.tar.gz Binary files differindex c48a6f897b..fef7431845 100644 --- a/lib/xmerl/test/xmerl_SUITE_data/misc.tar.gz +++ b/lib/xmerl/test/xmerl_SUITE_data/misc.tar.gz |