Skip to content

Commit 63ee0b5

Browse files
committed
fix white space errors and add missing license header
1 parent 6f6d116 commit 63ee0b5

3 files changed

Lines changed: 31 additions & 21 deletions

File tree

lib/xmerl/src/xmerl_ucs.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ is_incharset(In,Charset) when is_list(In) ->
562562
{error,unsupported_charset};
563563
{error,_} ->
564564
false;
565-
L when is_list(L) ->
565+
L when is_list(L) ->
566566
true
567567
end.
568568

lib/xmerl/src/xmerl_xpath_pred.erl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,10 @@ contains(C, [A1, A2]) ->
509509
S1 = mk_string(C, A1),
510510
S2 = mk_string(C, A2),
511511
case string:str(S1, S2) of
512-
0 ->
513-
?string([]);
514-
Pos ->
515-
?string(string:substr(S1, 1, Pos - 1))
512+
0 ->
513+
?string([]);
514+
Pos ->
515+
?string(string:substr(S1, 1, Pos - 1))
516516
end.
517517

518518
%% string: substring-after(string, string)
@@ -645,9 +645,9 @@ number(C, [Arg]) ->
645645
sum(C, [Arg]) ->
646646
NS = mk_nodeset(C, Arg),
647647
?number(lists:foldl(
648-
fun(N, Sum) ->
649-
Sum + mk_number(C, string_value(N))
650-
end, 0, NS)).
648+
fun(N, Sum) ->
649+
Sum + mk_number(C, string_value(N))
650+
end, 0, NS)).
651651

652652
floor(C, [Arg]) ->
653653
Num = mk_number(C, Arg),

lib/xmerl/test/xmerl_SUITE_data/xpath/xpath_abbrev.erl

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1-
%%%-------------------------------------------------------------------
2-
%%% File : xpath_abbrev.erl
3-
%%% Author : Bertil Karlsson <bertil@finrod>
4-
%%% Description :
5-
%%%
6-
%%% Created : 17 Jan 2006 by Bertil Karlsson <bertil@finrod>
7-
%%%-------------------------------------------------------------------
1+
%% %CopyrightBegin%
2+
%%
3+
%% SPDX-License-Identifier: Apache-2.0
4+
%%
5+
%% Copyright Ericsson AB 2026. All Rights Reserved.
6+
%%
7+
%% Licensed under the Apache License, Version 2.0 (the "License");
8+
%% you may not use this file except in compliance with the License.
9+
%% You may obtain a copy of the License at
10+
%%
11+
%% http://www.apache.org/licenses/LICENSE-2.0
12+
%%
13+
%% Unless required by applicable law or agreed to in writing, software
14+
%% distributed under the License is distributed on an "AS IS" BASIS,
15+
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
%% See the License for the specific language governing permissions and
17+
%% limitations under the License.
18+
%%
19+
%% %CopyrightEnd%
20+
821
-module(xpath_abbrev).
922

1023
-export([test/0, check_node_set/2, ticket_6873/0, ticket_7496/0, functions/0]).
@@ -62,7 +75,7 @@ test() ->
6275
Res22 = xmerl_xpath:string("blipp[@id and @test]",E),
6376
ok = check_node_set("blipp[@id and @test]",Res22).
6477

65-
check_node_set("blipp",[E1,E2,E3]) ->
78+
check_node_set("blipp",[E1,E2,E3]) ->
6679
ok = xml_element_name(E1,blipp),
6780
ok = xml_element_name(E2,blipp),
6881
ok = xml_element_name(E3,blipp),
@@ -107,7 +120,7 @@ check_node_set("/myBS_model/blipp[3]/blupp[2]",[E]) ->
107120
#xmlElement{name=blupp,
108121
attributes=[#xmlAttribute{name=att,value="bluppc2"}]}=E,
109122
ok;
110-
check_node_set("blipp//plopp",[#xmlElement{name=plopp},#xmlElement{name=plopp}]) ->
123+
check_node_set("blipp//plopp",[#xmlElement{name=plopp},#xmlElement{name=plopp}]) ->
111124
ok;
112125
check_node_set("//plopp",[E1,E2,E3]) ->
113126
ok = xml_element_name(E1,plopp),
@@ -247,7 +260,6 @@ relational_operators() ->
247260
ok = Test(Doc, "/a/*[3 > 2]", All),
248261
ok.
249262

250-
251263
functions() ->
252264
Test = fun(Doc, XPath, Exp) ->
253265
Result = xmerl_xpath:string(XPath, Doc),
@@ -263,7 +275,7 @@ functions() ->
263275
end|| Obj <- Result],
264276
ok
265277
end,
266-
Foo =
278+
Foo =
267279
"<foo>"
268280
" <bar>"
269281
" <name>Xml</name>"
@@ -297,7 +309,6 @@ functions() ->
297309
ok = Test(Doc,"/foo[sum(bar/value) = 6]",[foo]),
298310
ok = Test(Doc,"/foo/bar/value[number() = 2]",[value]),
299311

300-
301312
{Doc2,_}= xmerl_scan:file("purchaseOrder.xml"),
302313
ok = Test(Doc2,"//*[starts-with(local-name(),'c')]",
303314
['apo:comment',city,city,comment]),
@@ -306,7 +317,6 @@ functions() ->
306317
ok = Test(Doc2,"//*[starts-with(name(),'{http://www.example.com/PO1')]",
307318
['apo:purchaseOrder','apo:comment']).
308319

309-
310320
namespaces() ->
311321
{Doc,_} = xmerl_scan:file("purchaseOrder.xml", [{namespace_conformant, true}]),
312322

0 commit comments

Comments
 (0)