diff options
author | Lars Thorsen <[email protected]> | 2011-04-26 14:54:24 +0200 |
---|---|---|
committer | Lars Thorsen <[email protected]> | 2011-05-10 09:13:24 +0200 |
commit | f721fb91140cb09b63b2563e61585ea2a272761c (patch) | |
tree | 113d815fb6cadbccce7751039c67024c3910c1dd /lib/xmerl/src/xmerl_xsd.erl | |
parent | 111410b7809269d8dec37722d6723d250c412cda (diff) | |
download | otp-f721fb91140cb09b63b2563e61585ea2a272761c.tar.gz otp-f721fb91140cb09b63b2563e61585ea2a272761c.tar.bz2 otp-f721fb91140cb09b63b2563e61585ea2a272761c.zip |
Added the xmerl test suites.
Diffstat (limited to 'lib/xmerl/src/xmerl_xsd.erl')
-rw-r--r-- | lib/xmerl/src/xmerl_xsd.erl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/xmerl/src/xmerl_xsd.erl b/lib/xmerl/src/xmerl_xsd.erl index c0923520c2..bd24db5389 100644 --- a/lib/xmerl/src/xmerl_xsd.erl +++ b/lib/xmerl/src/xmerl_xsd.erl @@ -2420,8 +2420,8 @@ validate_xml(XMLEl=#xmlElement{},SEl=#schema_element{},S) -> %% 2 often check_element_type(XML=[XMLTxt=#xmlText{}|Rest],CM=[CMEl|CMRest],Env, Block,S,Checked) -> - %% XMLTxt ��r det f��rsta av content i element, - %% CMEl ��r den till��tna typen enligt schemat + %% XMLTxt is the first part of the elements content, + %% CMEl is the allowed type according to the schema case is_whitespace(XMLTxt) of true -> %% Ignore XMLEl check_element_type(Rest,CM,Env,Block,S,[XMLTxt|Checked]); @@ -2453,7 +2453,7 @@ check_element_type(XML=[#xmlElement{}|_],[{choice,{CM,Occ}}|_CMRest], check_element_type(XML=[#xmlElement{}|_],[{all,{CM,Occ}}|_CMRest], Env,_Block,S,Checked) -> ?debug("calling choice/6~n",[]), - check_all(XML,CM,Occ,Env,S,Checked,XML); + check_all(XML,CM,Occ,Env,set_num_el(S,0),Checked,XML); %%LTH %% 3 often. CMEL may be ((simpleType | complexType)?, (unique | key | keyref)*)) check_element_type(XML=[XMLEl=#xmlElement{}|_],[CMEl|CMRest],Env, Block,S,Checked) -> @@ -3393,8 +3393,12 @@ qualified_node_set(Paths,[QN|QNs],El,S,Acc) -> end end, {KeySequence,S2} = mapfoldl(Fun,S,Paths), - qualified_node_set(Paths,QNs,El,S2,[flatten(KeySequence)|Acc]). - + case flatten(KeySequence) of + [] -> + qualified_node_set(Paths,QNs,El,S2,Acc); + KS -> + qualified_node_set(Paths,QNs,El,S2,[KS|Acc]) + end. apply_field(F,El,S) -> %% xmerl_xpath:string returns a list |