aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/xmerl/doc/src/notes.xml7
-rw-r--r--lib/xmerl/src/xmerl_scan.erl11
2 files changed, 14 insertions, 4 deletions
diff --git a/lib/xmerl/doc/src/notes.xml b/lib/xmerl/doc/src/notes.xml
index 8fa352d951..8734bd8771 100644
--- a/lib/xmerl/doc/src/notes.xml
+++ b/lib/xmerl/doc/src/notes.xml
@@ -48,6 +48,13 @@
<p>
Own Id: OTP-9753</p>
</item>
+ <item>
+ <p>
+ Fix bug in namespace handling for attributes when the
+ <c>namespace_conformant</c> flag is set to true. </p>
+ <p>
+ Own Id: OTP-9821</p>
+ </item>
</list>
</section>
diff --git a/lib/xmerl/src/xmerl_scan.erl b/lib/xmerl/src/xmerl_scan.erl
index ec7ea534d6..48951b6723 100644
--- a/lib/xmerl/src/xmerl_scan.erl
+++ b/lib/xmerl/src/xmerl_scan.erl
@@ -2108,21 +2108,24 @@ scan_element(">" ++ T, S0 = #xmerl_scanner{event_fun = Event,
NSI, Namespace, SpaceDefault) ->
?bump_col(1),
Attrs = lists:reverse(Attrs0),
- wfc_unique_att_spec(Attrs,S),
- XMLSpace = case lists:keysearch('xml:space', #xmlAttribute.name, Attrs) of
+ E0=processed_whole_element(S,Pos,Name,Attrs,Lang,Parents,NSI,Namespace),
+
+ #xmlElement{attributes = Attrs1} = E0,
+ wfc_unique_att_spec(Attrs1,S),
+ XMLSpace = case lists:keysearch('xml:space', #xmlAttribute.name, Attrs1) of
false -> SpaceDefault;
{value, #xmlAttribute{value="default"}} -> SpaceOption;
{value, #xmlAttribute{value="preserve"}} -> preserve;
_ -> SpaceDefault
end,
- E0=processed_whole_element(S,Pos,Name,Attrs,Lang,Parents,NSI,Namespace),
+ E0=processed_whole_element(S,Pos,Name,Attrs1,Lang,Parents,NSI,Namespace),
S1 = #xmerl_scanner{} = Event(#xmerl_event{event = started,
line = StartL,
col = StartC,
data = E0}, S),
- {Content, T1, S2} = scan_content(T, S1, Name, Attrs, XMLSpace,
+ {Content, T1, S2} = scan_content(T, S1, Name, Attrs1, XMLSpace,
E0#xmlElement.language,
[{Name, Pos}|Parents], Namespace),