aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/src
diff options
context:
space:
mode:
authorLars Thorsén <[email protected]>2017-01-13 10:53:20 +0100
committerGitHub <[email protected]>2017-01-13 10:53:20 +0100
commite4f93595aba76c2eda2d2efef175ea9d72ee5d29 (patch)
tree30cf2440c6e1b99dd318b015714611545996af92 /lib/xmerl/src
parenta2c5a9252ea2dd8382238ea4ec4e0850f4a15167 (diff)
parent90f1bcd23ae888c85ebe9b2b83ed9662a924300f (diff)
downloadotp-e4f93595aba76c2eda2d2efef175ea9d72ee5d29.tar.gz
otp-e4f93595aba76c2eda2d2efef175ea9d72ee5d29.tar.bz2
otp-e4f93595aba76c2eda2d2efef175ea9d72ee5d29.zip
Merge pull request #1261 from smangelsdorf/default_attrs_bug
Include explicit attrs when default_attrs=true
Diffstat (limited to 'lib/xmerl/src')
-rw-r--r--lib/xmerl/src/xmerl_scan.erl22
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/xmerl/src/xmerl_scan.erl b/lib/xmerl/src/xmerl_scan.erl
index 5e0459ec21..9f6b27113e 100644
--- a/lib/xmerl/src/xmerl_scan.erl
+++ b/lib/xmerl/src/xmerl_scan.erl
@@ -2225,16 +2225,18 @@ processed_whole_element(S=#xmerl_scanner{hook_fun = _Hook,
AllAttrs =
case S#xmerl_scanner.default_attrs of
true ->
- [ #xmlAttribute{name = AttName,
- parents = [{Name, Pos} | Parents],
- language = Lang,
- nsinfo = NSI,
- namespace = Namespace,
- value = AttValue,
- normalized = true} ||
- {AttName, AttValue} <- get_default_attrs(S, Name),
- AttValue =/= no_value,
- not lists:keymember(AttName, #xmlAttribute.name, Attrs) ];
+ DefaultAttrs =
+ [ #xmlAttribute{name = AttName,
+ parents = [{Name, Pos} | Parents],
+ language = Lang,
+ nsinfo = NSI,
+ namespace = Namespace,
+ value = AttValue,
+ normalized = true} ||
+ {AttName, AttValue} <- get_default_attrs(S, Name),
+ AttValue =/= no_value,
+ not lists:keymember(AttName, #xmlAttribute.name, Attrs) ],
+ lists:append(Attrs, DefaultAttrs);
false ->
Attrs
end,