This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Test ---- Test group: TypeswitchExpression Test query: id-typeswitch-expr-02 Verification query: id-typeswitch-expr-02-test Problem ------- The test inserts a node using 'insert into' without defining a position explicitely. Therefor the position of the inserted node amongst the existing nodes is implementation-dependent. Because of this there are a number of different but correct results possible for this test. For instance the following result of the verification query is correct: <employee name="Jane Doe 1" gender="female"> <empnum>E1</empnum> <pnum>P1</pnum> <hours>40</hours> <hours>20</hours></employee> but it does give a difference (using XMLFragment via XMLDiff) with the expected result: <employee name="Jane Doe 1" gender="female"> <empnum>E1</empnum> <pnum>P1</pnum> <hours>40</hours><hours>20</hours> </employee> The difference report from XMLDiff is: [not identical] Expected sequence of child nodes '6' but was '7' - comparing <hours...> at /root[1]/employee[1]/hours[2] to <hours...> at /root[1]/employee[1]/hours[2] [different] Expected text value ' ' but was ' ' - comparing <employee ...> </employee> at /root[1]/employee[1]/text()[4] to <employee ...> </employee> at /root[1]/employee[1]/text()[1] Resolution ---------- The resolution could be to define all possible results, but maybe it's better to make the verification query more specific and thus more implementation independent. It could be changed to: (: Name: id-typeswitch-expr-02-test :) (: Description: Query to verify id-typeswitch-expr-02 :) (: insert-start :) declare variable $input-context external; (: insert-end :) $input-context/works[1]/employee[1]/hours Remark ----------- The same issue exists for id-typeswitch-expr-03
I've fixed these test cases in the way that you've suggested. Please close this bug report if you are satisfied with this response.