Skip to content

Commit

Permalink
Merge pull request #8452 from lthor/lars/xmerl/bug-event-state-sax-pa…
Browse files Browse the repository at this point in the history
…rser/OTP-19086

Fix event state handling in xmerl sax parser
  • Loading branch information
lthor authored May 6, 2024
2 parents cf95a63 + 3731fd7 commit bc8bb67
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/xmerl/src/xmerl_sax_parser_base.erlsrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%%-*-erlang-*-
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2008-2023. All Rights Reserved.
%% Copyright Ericsson AB 2008-2024. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -2121,10 +2121,11 @@ parse_external_entity(State, _PubId, SysId, Acc) ->

SaveState = event_callback({startEntity, SysId}, State),

State1 = State#xmerl_sax_parser_state{line_no=1,
end_tags = []},
EntityState =
SaveState#xmerl_sax_parser_state{line_no=1,
end_tags = []},

{Acc1, EventState, EventRefTab, AttVals} = handle_external_entity(ExtRef, State1, Acc),
{Acc1, EventState, EventRefTab, AttVals} = handle_external_entity(ExtRef, EntityState, Acc),

NewState = event_callback({endEntity, SysId},
SaveState#xmerl_sax_parser_state{event_state=EventState}),
Expand All @@ -2137,7 +2138,6 @@ parse_external_entity(State, _PubId, SysId, Acc) ->
end.



%%----------------------------------------------------------------------
%% Function : handle_external_entity(ExtRef, State, Acc) -> Result
%% Parameters: ExtRef = {file, string()} | {http, string()}
Expand Down

0 comments on commit bc8bb67

Please sign in to comment.