Merge lp:~nbrinza/zorba/parse-fragment into lp:zorba

Proposed by Nicolae Brinza on 2012-02-29
Status: Superseded
Proposed branch: lp:~nbrinza/zorba/parse-fragment
Merge into: lp:zorba
Diff against target: 5676 lines (+2925/-639)
158 files modified
CMakeLists.txt (+15/-5)
ChangeLog (+2/-0)
modules/com/zorba-xquery/www/modules/CMakeLists.txt (+2/-0)
modules/com/zorba-xquery/www/modules/xml-options.xsd (+89/-0)
modules/com/zorba-xquery/www/modules/xml.xq (+198/-4)
src/api/xmldatamanagerimpl.cpp (+72/-38)
src/context/static_context.cpp (+74/-69)
src/context/static_context.h (+4/-3)
src/diagnostics/diagnostic_en.xml (+10/-6)
src/diagnostics/pregenerated/dict_en.cpp (+4/-3)
src/functions/pregenerated/func_parse_fragment.cpp (+7/-21)
src/functions/pregenerated/func_parse_fragment.h (+3/-3)
src/functions/pregenerated/function_enum.h (+1/-2)
src/runtime/parsing_and_serializing/fragment_istream.h (+54/-10)
src/runtime/parsing_and_serializing/parse_fragment_impl.cpp (+167/-168)
src/runtime/parsing_and_serializing/pregenerated/parse_fragment.h (+1/-1)
src/runtime/sequences/sequences_impl.cpp (+10/-10)
src/runtime/spec/parsing_and_serializing/parse_fragment.xml (+5/-12)
src/store/api/load_properties.h (+224/-38)
src/store/naive/loader.h (+23/-6)
src/store/naive/loader_dtd.cpp (+307/-165)
src/store/naive/loader_fast.cpp (+9/-1)
src/store/naive/simple_store.cpp (+14/-12)
src/types/typeimpl.cpp (+20/-4)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-01.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-02.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-03.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-04.xml.res (+12/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-05.xml.res (+12/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-06.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-07.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-08.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-09.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-10.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-11.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-12.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-13.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-14.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-15.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-16.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-17.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-18.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-19.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-20.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-21.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-22.xml.res (+4/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-23.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-24.xml.res (+5/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-25.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-26.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-27.xml.res (+10/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-28.xml.res (+6/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-29.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-30.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-31.xml.res (+59/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-32.xml.res (+50/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-33.xml.res (+34/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-34.xml.res (+18/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-35.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-36.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-37.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-38.xml.res (+14/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-39.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-40.xml.res (+3/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-41.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-42.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-43.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-44.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-45.xml.res (+2/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-46.xml.res (+31/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-53.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-54.xml.res (+7/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-55.xml.res (+8/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-56.xml.res (+7/-0)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-12.xml.res (+1/-1)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-01.xq (+8/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-02.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-03.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-04.xq (+19/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-05.xq (+19/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-06.xq (+19/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-07.xq (+19/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-08.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-09.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-10.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-11.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-12.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-13.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-14.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-15.xq (+8/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-16.xq (+8/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-17.xq (+8/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-18.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-19.xq (+15/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-20.xq (+15/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-21.xq (+15/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-22.xq (+15/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-23.xq (+15/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-24.xq (+16/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-25.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-26.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-27.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-28.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-29.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-30.xq (+21/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-31.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-32.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-33.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-34.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-35.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-36.xq (+65/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-37.xq (+20/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-38.xq (+20/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-39.xq (+20/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-40.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-41.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-42.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-43.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-44.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-45.xq (+9/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-46.xq (+37/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-47.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-47.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-48.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-48.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-49.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-49.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-50.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-50.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-51.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-51.xq (+11/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-52.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-52.xq (+11/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-53.xq (+13/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-54.xq (+14/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-55.xq (+14/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-56.xq (+14/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-01.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-02.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-03.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-04.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-05.xq (+8/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-06.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-07.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-08.xq (+7/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-09.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-10.xq (+2/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-11.xq (+7/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-12.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-13.xq (+7/-1)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-14.xq (+6/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-15.xq (+8/-2)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-16.spec (+0/-1)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-16.xq (+0/-8)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-17.spec (+0/-1)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-17.xq (+0/-8)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-18.spec (+1/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-18.xq (+0/-10)
To merge this branch: bzr merge lp:~nbrinza/zorba/parse-fragment
Reviewer Review Type Date Requested Status
David Graf (community) 2012-02-29 Approve on 2012-03-06
Matthias Brantner 2012-02-29 Approve on 2012-02-29
William Candillon 2012-02-29 Approve on 2012-02-29
Review via email: mp+95152@code.launchpad.net

This proposal supersedes a proposal from 2012-02-29.

This proposal has been superseded by a proposal from 2012-03-07.

Commit message

Fully streaming module for parsing XML. Parsing can also be configured with several options such as skip-text-only-whitespace.

Description of the change

Fully streaming parse-xml module.

To post a comment you must log in.
William Candillon (wcandillon) wrote : Posted in a previous version of this proposal

The branch doesn't compile on my machine:
[ 0%] Building CXX object src/CMakeFiles/zorba_simplestore.dir/functions/func_nodes.cpp.o
In file included from /Users/wcandillon/tmp/parse-fragment/build/src/functions/func_nodes.cpp:26:
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:211: error: stray '#' in program
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:212: error: stray '#' in program
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:212: error: stray '#' in program
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:211: error: expected ',' or '...' before numeric constant
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:211: error: expected `)' before ';' token
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:211: error: ISO C++ forbids declaration of 'aAttr' with no type
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:211: error: expected ';' before ')' token
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:212: error: expected ',' or '...' before numeric constant
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:212: error: expected `)' before ';' token
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:212: error: ISO C++ forbids declaration of 'aLangAttr' with no type
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:212: error: expected unqualified-id before 'const'
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:212: error: ISO C++ forbids declaration of 'aRequestLang' with no type
/Users/wcandillon/tmp/parse-fragment/build/src/runtime/nodes/nodes.h:212: error: expected ';' before ')' token

@Matthias, are you experiencing the same issue on mac?

William Candillon (wcandillon) wrote : Posted in a previous version of this proposal

It seems to be a problem with the diff:
- bool isLangAttr(const store::Item_t& aAttr) const;
- bool matchesReqLang(const store::Item_t& aLangAttr, const zstring& aRequestLang) const;
+ bool isLangAttr(const store::Item_t& aAttr) const;
+ bool matchesReqLang(const store::Item_t& aLangAttr, const zstring& aRequestLang) const;

review: Needs Fixing
Nicolae Brinza (nbrinza) wrote : Posted in a previous version of this proposal

Yes, indeed, this is a strange corruption that I sometimes get after a merge. I've fixed the issue, resubmitting.

Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

WOW, that's really cool. I just tried parsing a huge file and memory consumption was constant at a low level. Also, skipping root nodes worked like a charm.

I have some question/remarks:
- In the schema, there is a typo skip-top-Level-text-nodes => skip-top-level-text-nodes
- If validation is enabled, will the validation copy or validate-in-place? I think it should validate-in-place for performance reasons.
- From the documentation, it's not clear on which nodes validation will happen if root nodes are skipped.
- Why does the schema have the following copyright notice "Copyright (c)2010 Elsevier, Inc."?
- The copyright should be 2006-2012
- Parsing the following document with <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/> results in an infinite loop:
<root><a id='0'>
 0
 </b>
</a>
<a id='1'>
 1
</a>
<a id='2'>
 2
</a>
</root>
- The feature is not added to the ChangeLog

review: Needs Fixing
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

Also, the branch doesn't build without schema support (i.e. ZORBA_NO_XMLSCHEMA:BOOL=ON)

[ 1%] Building CXX object src/CMakeFiles/zorba_simplestore.dir/runtime/parsing_and_serializing/parse_fragment_impl.cpp.o
/home/mbrantner/zorba/sandbox/src/runtime/parsing_and_serializing/parse_fragment_impl.cpp: In function ‘void zorba::processOptions(zorba::store::Item_t, zorba::store::LoadProperties&, zorba::static_context*, const zorba::QueryLoc&)’:
/home/mbrantner/zorba/sandbox/src/runtime/parsing_and_serializing/parse_fragment_impl.cpp:62:3: error: ‘Validator’ has not been declared
/home/mbrantner/zorba/sandbox/src/runtime/parsing_and_serializing/parse_fragment_impl.cpp:67:7: error: ‘ParseConstants’ has not been declared

review: Needs Information
William Candillon (wcandillon) wrote : Posted in a previous version of this proposal

Why is there an Elsevier copyright for modules/com/zorba-xquery/www/modules/xml-options.xsd ?

review: Needs Information
Nicolae Brinza (nbrinza) wrote : Posted in a previous version of this proposal

The Elsevier copyright came from the xqdoc.xsd, which I think I used as a base for the options file. I fixed it together with the other issues Matthias has raised. I've also fixed a couple of other cases where malformed XMLs where handled incorrectly. Resubmitting for merging.

William Candillon (wcandillon) wrote : Posted in a previous version of this proposal

I tried the forecast data with the parse function: very impressive!!

For documentation purposes, I would rename the parse-xml prefix to xml, this is more consistent right?

review: Needs Information
William Candillon (wcandillon) wrote : Posted in a previous version of this proposal

Would xmldoc be a good prefix?

Nicolae Brinza (nbrinza) wrote : Posted in a previous version of this proposal

It certainly is the closest allowed alternative...

Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

- The branch doesn't build without schema support (i.e. ZORBA_NO_XMLSCHEMA:BOOL=ON)

[ 1%] Building CXX object src/CMakeFiles/zorba_simplestore.dir/runtime/parsing_and_serializing/parse_fragment_impl.cpp.o
/home/mbrantner/zorba/sandbox/src/runtime/parsing_and_serializing/parse_fragment_impl.cpp: In function ‘void zorba::processOptions(zorba::store::Item_t, zorba::store::LoadProperties&, zorba::static_context*, const zorba::QueryLoc&)’:
/home/mbrantner/zorba/sandbox/src/runtime/parsing_and_serializing/parse_fragment_impl.cpp:62:3: error: ‘Validator’ has not been declared
/home/mbrantner/zorba/sandbox/src/runtime/parsing_and_serializing/parse_fragment_impl.cpp:67:7: error: ‘ParseConstants’ has not been declared
make[2]: *** [src/CMakeFiles/zorba_simplestore.dir/runtime/parsing_and_serializing/parse_fragment_impl.cpp.o] Error 1

- If validation is enabled, will the validation copy or validate-in-place? I think it should validate-in-place for performance reasons.

review: Needs Fixing
William Candillon (wcandillon) : Posted in a previous version of this proposal
review: Approve
Nicolae Brinza (nbrinza) wrote : Posted in a previous version of this proposal

All pending issues have been fixed. Resubmitting the proposal for merging.

William Candillon (wcandillon) wrote : Posted in a previous version of this proposal

I tried it and it looks like just the best.

review: Approve
William Candillon (wcandillon) wrote : Posted in a previous version of this proposal

Adding David to the review, I think he found a bug.

David Graf (davidagraf) : Posted in a previous version of this proposal
review: Approve
Nicolae Brinza (nbrinza) wrote : Posted in a previous version of this proposal

I've fixed the conflict in the Changelog. Resubmitting for merging into the trunk.

Matthias Brantner (matthias-brantner) : Posted in a previous version of this proposal
review: Approve
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
William Candillon (wcandillon) : Posted in a previous version of this proposal
review: Approve
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job parse-fragment-2012-02-23T17-50-09.456Z is finished.
  The final status was:

  1136 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

David Graf (davidagraf) : Posted in a previous version of this proposal
review: Approve
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Attempt to merge into lp:zorba failed due to conflicts:

text conflict in ChangeLog

Nicolae Brinza (nbrinza) wrote : Posted in a previous version of this proposal

I have fixed the regressions and the conflicts. Resubmitting.

William Candillon (wcandillon) : Posted in a previous version of this proposal
review: Approve
review: Approve
review: Approve
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~nbrinza/zorba/parse-fragment into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:274 (message):
  Validation queue job parse-fragment-2012-02-29T15-41-14.921Z is finished.
  The final status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

David Graf (davidagraf) :
review: Approve
lp:~nbrinza/zorba/parse-fragment updated on 2012-03-07
10510. By Nicolae Brinza on 2012-03-07

Added a parse-xml:parse-xml-fragment() function for backwards compatibility. Also made a small fix to a related error message.

Nicolae Brinza (nbrinza) wrote :

I have added the backwards-compatible parse-xml:parse-xml-fragment() function and now the link crawler test passes ok. Resubmitting for mergeing into the trunk.

lp:~nbrinza/zorba/parse-fragment updated on 2013-04-09
10511. By Nicolae Brinza on 2012-03-07

Merged with Zorba trunk

10512. By Nicolae Brinza on 2012-03-13

Updated and merged Matthias' documentation code example for the parse-fragment() function

10513. By Nicolae Brinza on 2012-03-13

Added another example in the documentation of the parse-fragment function

10514. By Nicolae Brinza on 2012-03-13

Removed the strip-boundary-whitespace option from the parse-fragment function

10515. By Nicolae Brinza on 2012-03-13

Fixed the formatting of the code examples in the documenation of the parse-fragment module

10516. By Nicolae Brinza on 2012-03-14

Merged with Zorba trunk

10517. By Nicolae Brinza on 2012-03-15

Fixed the failing link crawler test in the release build

10518. By Nicolae Brinza on 2012-03-15

Merged with Zorba trunk

10519. By Nicolae Brinza on 2012-04-24

Merged with Zorba trunk

10520. By Nicolae Brinza on 2012-04-24

Added a test for the backwards-compatible zorba:parse-xml-fragment() function

10521. By Nicolae Brinza on 2012-04-25

Small optimization in the serializer to avoid a repeated string comparison

10522. By Nicolae Brinza on 2012-05-10

Merged with Zorba trunk

10523. By Nicolae Brinza on 2012-05-10

Documentation fixes.

10524. By Nicolae Brinza on 2012-05-11

Reverted a change in the parse fragment module to fix the regressions

10525. By Nicolae Brinza on 2012-05-15

Improved documentation of the parse-fragment module

10526. By Nicolae Brinza on 2012-05-15

Merged with Zorba trunk

10527. By Nicolae Brinza on 2012-05-16

Fixed the type of options parameter to the parse-fragment() function.

10528. By Nicolae Brinza on 2012-05-16

Fixed the quantity of the options parameter from ONE to QUESTION.

10529. By Nicolae Brinza on 2012-07-02

Merged with Zorba trunk

10530. By Nicolae Brinza on 2012-07-17

The parse-fragment function now allows a DOCTYPE declaration in the input.

10531. By Nicolae Brinza on 2012-07-17

Merged with Zorba trunk

10532. By Nicolae Brinza on 2012-07-17

Updated the Changelog with the parse-fragment info

10533. By Nicolae Brinza on 2012-07-17

Updated Changelog with the resolution of bug #1016606

10534. By Nicolae Brinza on 2012-07-31

Merged with Zorba trunk

10535. By Nicolae Brinza on 2012-07-31

Fixed parse-fragment not handling correctly the streammable streams lifetime.

10536. By Nicolae Brinza on 2012-08-01

The input buffer of parse-fragment can grow if libxml is not able to parse the current chunk. Fixes bug #1027270

10537. By Nicolae Brinza on 2012-08-01

Merged with Zorba trunk

10538. By Nicolae Brinza on 2012-08-29

Merged with Zorba trunk

10539. By Nicolae Brinza on 2012-08-29

Updated the Changelog with fixes for bugs #1016606 and #1024033

10540. By Nicolae Brinza on 2012-08-29

Updated the Changelog with the fix for the bug #1023170

10541. By Nicolae Brinza on 2013-01-14

Merged with Zorba trunk

10542. By Nicolae Brinza on 2013-01-16

Fix for bug #1099535 endless loop in xml:parse()

10543. By Nicolae Brinza on 2013-01-16

Merged with Zorba trunk

10544. By Nicolae Brinza on 2013-01-16

Updated Changelog to mention fix for bug #1099535

10545. By Nicolae Brinza on 2013-01-18

Merged with Zorba trunk

10546. By Nicolae Brinza on 2013-01-20

Fixed bug #1099648 -- XML parsing failures on Red Hat

10547. By Nicolae Brinza on 2013-01-20

Updated Changelog to mention the fix for bug #1099648

10548. By Nicolae Brinza on 2013-04-09

Merged with Zorba trunk

Unmerged revisions

10548. By Nicolae Brinza on 2013-04-09

Merged with Zorba trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2012-02-15 10:25:02 +0000
3+++ CMakeLists.txt 2012-03-07 15:45:43 +0000
4@@ -237,11 +237,21 @@
5 MESSAGE(STATUS "Looking for LibXml2")
6 FIND_PACKAGE(LibXml2)
7 IF(LIBXML2_FOUND)
8- MESSAGE(STATUS "Found LIBXML2 library -- " ${LIBXML2_LIBRARIES})
9-
10- INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
11- SET(requiredlibs-store ${requiredlibs-store} ${LIBXML2_LIBRARIES})
12- SET(CXXFLAGS ${CXXFLAGS} ${LIBXML2_DEFINITONS})
13+ # Now check LibXml2's version
14+ FILE(STRINGS ${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h LIBXML2_VERSION_TMP REGEX
15+ "^#define[ \t]+LIBXML_DOTTED_VERSION[ \t]+\".*\"")
16+ STRING(REGEX REPLACE "^#define[ \t]+LIBXML_DOTTED_VERSION[ \t]+\"(.*)\"" "\\1"
17+ LIBXML2_VERSION ${LIBXML2_VERSION_TMP})
18+
19+ IF(LIBXML2_VERSION VERSION_EQUAL "2.7.0" OR LIBXML2_VERSION VERSION_GREATER "2.7.0")
20+ MESSAGE(STATUS "Found LIBXML2 library -- " ${LIBXML2_LIBRARIES})
21+ INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
22+ SET(requiredlibs-store ${requiredlibs-store} ${LIBXML2_LIBRARIES})
23+ SET(CXXFLAGS ${CXXFLAGS} ${LIBXML2_DEFINITONS})
24+ ELSE(LIBXML2_VERSION VERSION_EQUAL "2.7.0" OR LIBXML2_VERSION VERSION_GREATER "2.7.0")
25+ MESSAGE(FATAL_ERROR "The libxml2 library version 2.7.0 or higher is required in order to build Zorba.")
26+ ENDIF(LIBXML2_VERSION VERSION_EQUAL "2.7.0" OR LIBXML2_VERSION VERSION_GREATER "2.7.0")
27+
28 ELSE(LIBXML2_FOUND)
29 MESSAGE(FATAL_ERROR "The libxml2 library and headers are required in order to build simple store.")
30 ENDIF(LIBXML2_FOUND)
31
32=== modified file 'ChangeLog'
33--- ChangeLog 2012-03-06 22:43:17 +0000
34+++ ChangeLog 2012-03-07 15:45:43 +0000
35@@ -5,6 +5,8 @@
36 * Add --compile-plan (-c) and --execute-plan (-e) options to zorba command line.
37 * Add XQuery 3.0 concat operator (http://www.w3.org/TR/xquery-30/#id-string-concat-expr)
38 * Fixed bug 923015 (clone() not implemented for full-text expressions)
39+ * The core parse-xml module is now able to parse input files in a streaming mode. A number of new options have also been added.
40+ * LibXml2 version 2.7.0 or higher is now required in order to build Zorba.
41 * No-copy optimization: avoids copying nodes during node-constructor expressions.
42 * Added external function annotations %ann:propagates-input-nodes and
43 %ann:must-copy-input-nodes to be used by the no-copy optimization.
44
45=== modified file 'modules/com/zorba-xquery/www/modules/CMakeLists.txt'
46--- modules/com/zorba-xquery/www/modules/CMakeLists.txt 2012-02-24 00:40:26 +0000
47+++ modules/com/zorba-xquery/www/modules/CMakeLists.txt 2012-03-07 15:45:43 +0000
48@@ -63,6 +63,8 @@
49 URI "http://www.zorba-xquery.com/modules/schema")
50 DECLARE_ZORBA_MODULE(FILE string.xq VERSION 2.1
51 URI "http://www.zorba-xquery.com/modules/string")
52+DECLARE_ZORBA_SCHEMA(FILE xml-options.xsd
53+ URI "http://www.zorba-xquery.com/modules/xml-options")
54 DECLARE_ZORBA_MODULE(FILE uri.xq VERSION 1.0
55 URI "http://www.zorba-xquery.com/modules/uri")
56 DECLARE_ZORBA_MODULE(FILE xml.xq VERSION 2.0
57
58=== added file 'modules/com/zorba-xquery/www/modules/xml-options.xsd'
59--- modules/com/zorba-xquery/www/modules/xml-options.xsd 1970-01-01 00:00:00 +0000
60+++ modules/com/zorba-xquery/www/modules/xml-options.xsd 2012-03-07 15:45:43 +0000
61@@ -0,0 +1,89 @@
62+<?xml version="1.0"?>
63+<!--
64+ - Copyright 2006-2012 The FLWOR Foundation.
65+ -
66+ - Licensed under the Apache License, Version 2.0 (the "License");
67+ - you may not use this file except in compliance with the License.
68+ - You may obtain a copy of the License at
69+ -
70+ - http://www.apache.org/licenses/LICENSE-2.0
71+ -
72+ - Unless required by applicable law or agreed to in writing, software
73+ - distributed under the License is distributed on an "AS IS" BASIS,
74+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
75+ - See the License for the specific language governing permissions and
76+ - limitations under the License.
77+-->
78+<schema xmlns="http://www.w3.org/2001/XMLSchema"
79+ targetNamespace="http://www.zorba-xquery.com/modules/xml-options"
80+ elementFormDefault="qualified" attributeFormDefault="qualified">
81+
82+ <element name="options">
83+ <complexType>
84+ <all>
85+
86+ <element name="base-uri" minOccurs="0" maxOccurs="1">
87+ <complexType>
88+ <attribute name="value" type="anyURI" use="required"/>
89+ </complexType>
90+ </element>
91+ <element name="no-error" minOccurs="0" maxOccurs="1">
92+ <complexType/>
93+ </element>
94+ <element name="strip-boundary-space" minOccurs="0" maxOccurs="1">
95+ <complexType/>
96+ </element>
97+ <element name="schema-validate" minOccurs="0" maxOccurs="1">
98+ <complexType>
99+ <attribute name="mode" default="strict">
100+ <simpleType>
101+ <restriction base="string">
102+ <enumeration value="strict"/>
103+ <enumeration value="lax"/>
104+ </restriction>
105+ </simpleType>
106+ </attribute>
107+ </complexType>
108+ </element>
109+ <element name="DTD-validate" minOccurs="0" maxOccurs="1">
110+ <complexType/>
111+ </element>
112+ <element name="DTD-load" minOccurs="0" maxOccurs="1">
113+ <complexType/>
114+ </element>
115+ <element name="default-DTD-attributes" minOccurs="0" maxOccurs="1">
116+ <complexType/>
117+ </element>
118+ <element name="parse-external-parsed-entity" minOccurs="0" maxOccurs="1">
119+ <complexType>
120+ <attribute name="skip-root-nodes" use="optional">
121+ <simpleType>
122+ <restriction base="int">
123+ <minInclusive value="0"/>
124+ </restriction>
125+ </simpleType>
126+ </attribute>
127+ <attribute name="skip-top-level-text-nodes" type="boolean" use="optional"/>
128+ </complexType>
129+ </element>
130+ <element name="substitute-entities" minOccurs="0" maxOccurs="1">
131+ <complexType/>
132+ </element>
133+ <element name="xinclude-substitutions" minOccurs="0" maxOccurs="1">
134+ <complexType/>
135+ </element>
136+ <element name="remove-redundant-ns" minOccurs="0" maxOccurs="1">
137+ <complexType/>
138+ </element>
139+ <element name="no-CDATA" minOccurs="0" maxOccurs="1">
140+ <complexType/>
141+ </element>
142+ <element name="no-xinclude-nodes" minOccurs="0" maxOccurs="1">
143+ <complexType/>
144+ </element>
145+
146+ </all>
147+ </complexType>
148+ </element>
149+
150+</schema>
151
152=== modified file 'modules/com/zorba-xquery/www/modules/xml.xq' (properties changed: +x to -x)
153--- modules/com/zorba-xquery/www/modules/xml.xq 2011-08-10 02:50:23 +0000
154+++ modules/com/zorba-xquery/www/modules/xml.xq 2012-03-07 15:45:43 +0000
155@@ -1,4 +1,4 @@
156-xquery version "1.0";
157+xquery version "3.0";
158
159 (:
160 : Copyright 2006-2010 The FLWOR Foundation.
161@@ -23,13 +23,14 @@
162 : external parsed entities, described by
163 : <a href="http://www.w3.org/TR/xml/#wf-entities">XML 1.0 Well-Formed
164 : Parsed Entities</a>. The functions can also perform Schema and DTD
165- : validation of the input documents.
166+ : validation of the input documents.
167 : </p>
168 :
169 : @see <a href="http://www.w3.org/TR/xml/#wf-entities">XML 1.0 Well-Formed
170 : Parsed Entities</a>
171 : @see <a href="http://www.w3.org/TR/xpath-functions-30/#func-parse-xml">
172 : fn:parse-xml() function in XPath and XQuery Functions and Operators 3.0</a>
173+ : @see <a href="http://xmlsoft.org/html/libxml-parser.html">LibXml2 parser</a>
174 :
175 : @author Nicolae Brinza
176 : @project data processing/data converters
177@@ -37,6 +38,8 @@
178 :)
179 module namespace parse-xml = "http://www.zorba-xquery.com/modules/xml";
180
181+import schema namespace parse-xml-options = "http://www.zorba-xquery.com/modules/xml-options";
182+
183 declare namespace zerr = "http://www.zorba-xquery.com/errors";
184 declare namespace err = "http://www.w3.org/xqt-errors";
185
186@@ -48,6 +51,149 @@
187 : A function to parse XML files and fragments (i.e.
188 : <a href="http://www.w3.org/TR/xml/#wf-entities">external general parsed
189 : entities</a>). The functions takes two arguments: the first one is the
190+ : string to be parsed and the second argument is an &lt;options/&gt; element that
191+ : passes a list of options to the parsing function. They are described below.
192+ : The options element must conform to the xml-options.xsd schema. Some of these
193+ : will be passed to the underlying library (LibXml2) and further documentation
194+ : for them can be found at <a href="http://xmlsoft.org/html/libxml-parser.html">
195+ : LibXml2 parser</a>.
196+ :
197+ : The list of available options:
198+ :
199+ : <ul>
200+ : <li>
201+ : &lt;base-uri/&gt; - the element must have a "value" attribute, which will provide
202+ : the baseURI that will be used as the baseURI for every node returned by this
203+ : function.
204+ : </li>
205+ :
206+ : <li>
207+ : &lt;no-error/&gt; - if present, the option will disable fatal error processing. Any
208+ : failure to parse or validate the input in the requested manner will result
209+ : in the function returning an empty sequence and no error will raised.
210+ : </li>
211+ :
212+ : <li>
213+ : &lt;strip-boundary-space/&gt; - if present, it will enable the removal of blank nodes from the input.
214+ : </li>
215+ :
216+ : <li>
217+ : &lt;schema-validate/&gt; - if present, it will request that the input string be Schema
218+ : validated. The element accepts an attribute named "mode" which can have two
219+ : values: "strict and "lax". Enabling the option will produce a result that is
220+ : equivalent to processing the input with the option disabled, and then copying
221+ : the result using the XQuery "validate strict|lax" expression. This option can not
222+ : be used together with either the &lt;DTD-validate/&gt; or the &lt;parse-external-parsed-entity/&gt;
223+ : option. Doing so will raise a zerr:ZXQD0003 error.
224+ : </li>
225+ :
226+ : <li>
227+ : &lt;DTD-validate/&gt; - the option will enable the DTD-based validation. If this
228+ : option is enabled and the input references a DTD, then the input must be a
229+ : well-formed and DTD-valid XML document. The &lt;DTD-load/&gt; option must be used for
230+ : external DTD files to be loaded. If the option is enabled and the input does
231+ : not reference a DTD then the option is ignored. If the option is disabled, the
232+ : input is not required to reference a DTD and if it does reference a DTD then
233+ : the DTD is ignored for validation purposes. This option can not
234+ : be used together with either the &lt;schema-validate/&gt; or the &lt;parse-external-parsed-entity&gt;
235+ : option. Doing so will raise a zerr:ZXQD0003 error.
236+ : </li>
237+ :
238+ : <li>
239+ : &lt;DTD-load/&gt; - if present, it will enable loading of external DTD files.
240+ : </li>
241+ :
242+ : <li>
243+ : &lt;default-DTD-attributes/&gt; - if present, it will enable the default DTD attributes.
244+ : </li>
245+ :
246+ : <li>
247+ : &lt;parse-external-parsed-entity/&gt; - if present, it will enable the processing of XML
248+ : external entities. If the option
249+ : is enabled, the input must conform to the syntax extParsedEnt (production
250+ : [78] in XML 1.0, see <a href="http://www.w3.org/TR/xml/#wf-entities">
251+ : Well-Formed Parsed Entities</a>). The result of the function call is a list
252+ : of nodes corresponding to the top-level components of the content of the
253+ : external entity: that is, elements, processing instructions, comments, and
254+ : text nodes. CDATA sections and character references are expanded, and
255+ : adjacent characters are merged so the result contains no adjacent text
256+ : nodes. If the option is disabled, the input must be a well-formed XML
257+ : document conforming to the Document production
258+ : (<a href="http://www.w3.org/TR/xml/#sec-well-formed">production [1] in XML 1.0</a>).
259+ : This option can not be used together with either the &lt;schema-validate/&gt; or the &lt;DTD-validate/&gt;
260+ : option. Doing so will raise a zerr:ZXQD0003 error.
261+ : The &lt;parse-external-parsed-entity/&gt; option has two parameters, given by attributes. The first
262+ : attribute is "skip-root-nodes" and it can have a non-negative value. Specifying the paramter
263+ : tells the parser to skip the given number of root nodes and return only their children. E.g.
264+ : skip-root-nodes="1" is equivalent to parse-xml($xml-string)/node()/node() . skip-root-nodes="2" is equivalent
265+ : to parse-xml($xml-string)/node()/node()/node() , etc. The second attribute is "skip-top-level-text-nodes" with a
266+ : boolean value. Specifying "true" will tell the parser to skip top level text nodes, returning
267+ : only the top level elements, comments, PIs, etc. This parameter works in combination with
268+ : the "skip-root-nodes" paramter, thus top level text nodes are skipped after "skip-root-nodes" has
269+ : been applied.
270+ : </li>
271+ :
272+ : <li>
273+ : &lt;substitute-entities/&gt; - if present, it will enable the XML entities substitutions.
274+ : </li>
275+ :
276+ : <li>
277+ : &lt;remove-redundant-ns/&gt; - if present, the parser will remove redundant namespaces declarations.
278+ : </li>
279+ :
280+ : <li>
281+ : &lt;no-CDATA/&gt; - if present, the parser will merge CDATA nodes as text nodes.
282+ : </li>
283+ :
284+ : <li>
285+ : &lt;xinclude-substitutions/&gt; - if present, it will enable the XInclude substitutions.
286+ : </li>
287+ :
288+ : <li>
289+ : &lt;no-xinclude-nodes/&gt; - if present, the parser will not generate XInclude START/END nodes.
290+ : </li>
291+ :
292+ : </ul>
293+ :
294+ :
295+ : @param $xml-string The string that holds the XML to be parsed. If empty,
296+ : the function will return an empty sequence
297+ : @param $options The options for the parsing
298+ : @return The parsed XML as a document node or a list of nodes, or an empty
299+ : sequence.
300+ :
301+ : @error zerr:ZXQD0003 The error will be raised if the options to the function
302+ : are inconsistent.
303+ :
304+ : @error err:FODC0006 The error will be raised if the input string is not a
305+ : valid XML document or fragment (external general parsed
306+ : entity) or if DTD validation was enabled and the
307+ : document has not passed it.
308+ :
309+ : @error err:XQDY0027 The error will be raised if schema validation was enabled
310+ : and the input document has not passed it or if the parsing options are not
311+ : conformant to the xml-options.xsd schema.
312+ :
313+ : @example test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-03.xq
314+ : @example test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-01.xq
315+ : @example test/rbkt/Queries/zorba/parsing_and_serializing/parse-xml-fragment-07.xq
316+ :
317+ :)
318+
319+declare function parse-xml:parse(
320+ $xml-string as xs:string?,
321+ $options as element()?) as node()* external;
322+
323+
324+(:~
325+ :
326+ : Note: this function is included for backwards compatibility purposes. It
327+ : is recommended that you use the parse-xml:parse() function instead.
328+ :
329+ :
330+ : A function to parse XML files and fragments (i.e.
331+ : <a href="http://www.w3.org/TR/xml/#wf-entities">external general parsed
332+ : entities</a>). The functions takes two arguments: the first one is the
333 : string to be parsed and the second argument is a flags string
334 : (eEdDsSlLwWfF]*(;[\p{L}]*)?) selecting the options described below.
335 : <br/>
336@@ -136,10 +282,35 @@
337 :)
338 declare function parse-xml:parse-xml-fragment(
339 $xml-string as xs:string?,
340- $options as xs:string) as node()* external;
341+ $options as xs:string) as node()*
342+{
343+ let $new_options := <parse-xml-options:options>{
344+ if (contains($options, "e"))
345+ then <parse-xml-options:parse-external-parsed-entity/> else (),
346+ if (contains($options, "d"))
347+ then <parse-xml-options:DTD-validate/> else (),
348+ if (contains($options, "s"))
349+ then <parse-xml-options:schema-validate parse-xml-options:mode="strict"/>
350+ else (),
351+ if (contains($options, "l"))
352+ then <parse-xml-options:schema-validate parse-xml-options:mode="lax"/>
353+ else (),
354+ if (contains($options, "w"))
355+ then <parse-xml-options:strip-boundary-space/> else (),
356+ if (contains($options, "f"))
357+ then <parse-xml-options:no-error/> else ()
358+ }</parse-xml-options:options>
359+ return
360+ parse-xml:parse($xml-string, $new_options)
361+};
362
363
364 (:~
365+ :
366+ : Note: this function is included for backwards compatibility purposes. It
367+ : is recommended that you use the parse-xml:parse() function instead.
368+ :
369+ :
370 : A function to parse XML files and fragments. The behavior is the
371 : same as the parse-xml-fragment with two arguments.
372 :
373@@ -169,4 +340,27 @@
374 declare function parse-xml:parse-xml-fragment(
375 $xml-string as xs:string?,
376 $base-uri as xs:string,
377- $options as xs:string) as node()* external;
378+ $options as xs:string) as node()*
379+{
380+ let $new_options := <parse-xml-options:options>{
381+ if (contains($options, "e"))
382+ then <parse-xml-options:parse-external-parsed-entity/> else (),
383+ if (contains($options, "d"))
384+ then <parse-xml-options:DTD-validate/> else (),
385+ if (contains($options, "s"))
386+ then <parse-xml-options:schema-validate parse-xml-options:mode="strict"/>
387+ else (),
388+ if (contains($options, "l"))
389+ then <parse-xml-options:schema-validate parse-xml-options:mode="lax"/>
390+ else (),
391+ if (contains($options, "w"))
392+ then <parse-xml-options:strip-boundary-space/> else (),
393+ if (contains($options, "f"))
394+ then <parse-xml-options:no-error/> else (),
395+ <parse-xml-options:base-uri>{
396+ attribute{xs:QName("parse-xml-options:value")}{$base-uri}}
397+ </parse-xml-options:base-uri>
398+ }</parse-xml-options:options>
399+ return
400+ parse-xml:parse($xml-string, $new_options)
401+};
402
403=== modified file 'src/api/annotationimpl.cpp' (properties changed: +x to -x)
404=== modified file 'src/api/xmldatamanagerimpl.cpp'
405--- src/api/xmldatamanagerimpl.cpp 2012-01-23 10:06:24 +0000
406+++ src/api/xmldatamanagerimpl.cpp 2012-03-07 15:45:43 +0000
407@@ -75,7 +75,7 @@
408
409 ********************************************************************************/
410 XmlDataManagerImpl::XmlDataManagerImpl()
411- :
412+ :
413 theDocManager(0),
414 theColManager(0),
415 theW3CColManager(0)
416@@ -126,7 +126,9 @@
417 std::ostringstream lProlog;
418 lProlog
419 << "import module namespace d = '" << static_context::ZORBA_FETCH_FN_NS << "';"
420- << "import module namespace x = '" << static_context::ZORBA_XML_FN_NS << "';";
421+ << "import module namespace x = '" << static_context::ZORBA_XML_FN_NS << "';"
422+ << "import schema namespace opt = '" << static_context::ZORBA_XML_FN_OPTIONS_NS << "';";
423+
424 theContext->loadProlog(lProlog.str(), lHints);
425 }
426
427@@ -151,7 +153,7 @@
428 DocumentManager*
429 XmlDataManagerImpl::getDocumentManager() const
430 {
431- if (!theDocManager)
432+ if (!theDocManager)
433 {
434 theDocManager = new DocumentManagerImpl(theContext, theFactory);
435 theDocManager->registerDiagnosticHandler(theDiagnosticHandler);
436@@ -166,7 +168,7 @@
437 CollectionManager*
438 XmlDataManagerImpl::getCollectionManager() const
439 {
440- if (!theColManager)
441+ if (!theColManager)
442 {
443 theColManager = new CollectionManagerImpl(
444 theContext,
445@@ -185,7 +187,7 @@
446 CollectionManager*
447 XmlDataManagerImpl::getW3CCollectionManager() const
448 {
449- if (!theW3CColManager)
450+ if (!theW3CColManager)
451 {
452 theW3CColManager = new CollectionManagerImpl(
453 theContext,
454@@ -280,21 +282,34 @@
455 ZORBA_DM_TRY
456 {
457 Item lQName = theFactory->createQName(static_context::ZORBA_XML_FN_NS,
458- "parse-xml-fragment");
459+ "parse");
460
461 // create a streamable string item
462 std::vector<ItemSequence_t> lArgs;
463- lArgs.push_back(
464- new SingletonItemSequence(theFactory->createStreamableString(aStream,
465- &streamReleaser)));
466-
467- std::ostringstream lOptions;
468- lOptions << (aOptions.isDtdValidationEnabled()?"d":"D");
469-
470- lOptions << (aOptions.isExternalEntityProcessingEnabled()?"e":"E");
471-
472- lArgs.push_back(
473- new SingletonItemSequence(theFactory->createString(lOptions.str())));
474+ lArgs.push_back(new SingletonItemSequence(
475+ theFactory->createStreamableString(aStream, &streamReleaser)));
476+
477+ Item empty_item;
478+ Item validated_options;
479+ NsBindings nsPairs;
480+ Item untyped_type = theFactory->createQName("http://www.w3.org/2001/XMLSchema", "xs", "untyped");
481+ Item options_node = theFactory->createElementNode(empty_item,
482+ theFactory->createQName(static_context::ZORBA_XML_FN_OPTIONS_NS, "options"),
483+ untyped_type, false, false, nsPairs);
484+
485+ if (aOptions.isDtdValidationEnabled())
486+ theFactory->createElementNode(options_node,
487+ theFactory->createQName(static_context::ZORBA_XML_FN_OPTIONS_NS, "DTD-validate"),
488+ untyped_type, false, false, nsPairs);
489+
490+ if (aOptions.isExternalEntityProcessingEnabled())
491+ theFactory->createElementNode(options_node,
492+ theFactory->createQName(static_context::ZORBA_XML_FN_OPTIONS_NS, "parse-external-parsed-entity"),
493+ untyped_type, false, false, nsPairs);
494+
495+ theContext->validate(options_node, validated_options, validate_strict);
496+
497+ lArgs.push_back(new SingletonItemSequence(validated_options));
498
499 return theContext->invoke(lQName, lArgs);
500 }
501@@ -315,23 +330,42 @@
502 ZORBA_DM_TRY
503 {
504 Item lQName = theFactory->createQName(static_context::ZORBA_XML_FN_NS,
505- "parse-xml-fragment");
506+ "parse");
507
508 // create a streamable string item
509 std::vector<ItemSequence_t> lArgs;
510- lArgs.push_back(
511- new SingletonItemSequence(theFactory->createStreamableString(aStream,
512- &streamReleaser)));
513- lArgs.push_back(
514- new SingletonItemSequence(theFactory->createString(aBaseURI)));
515-
516- std::ostringstream lOptions;
517- lOptions << (aOptions.isDtdValidationEnabled()?"d":"D");
518-
519- lOptions << (aOptions.isExternalEntityProcessingEnabled()?"e":"E");
520-
521- lArgs.push_back(
522- new SingletonItemSequence(theFactory->createString(lOptions.str())));
523+ lArgs.push_back(new SingletonItemSequence(
524+ theFactory->createStreamableString(aStream, &streamReleaser)));
525+
526+ Item empty_item;
527+ Item validated_options;
528+ NsBindings nsPairs;
529+ Item untyped_type = theFactory->createQName("http://www.w3.org/2001/XMLSchema", "xs", "untyped");
530+ Item options_node = theFactory->createElementNode(empty_item,
531+ theFactory->createQName(static_context::ZORBA_XML_FN_OPTIONS_NS, "options"),
532+ untyped_type, false, false, nsPairs);
533+
534+ if (aOptions.isDtdValidationEnabled())
535+ theFactory->createElementNode(options_node,
536+ theFactory->createQName(static_context::ZORBA_XML_FN_OPTIONS_NS, "DTD-validate"),
537+ untyped_type, false, false, nsPairs);
538+
539+ if (aOptions.isExternalEntityProcessingEnabled())
540+ theFactory->createElementNode(options_node,
541+ theFactory->createQName(static_context::ZORBA_XML_FN_OPTIONS_NS, "parse-external-parsed-entity"),
542+ untyped_type, false, false, nsPairs);
543+
544+ Item base_uri_node = theFactory->createElementNode(options_node,
545+ theFactory->createQName(static_context::ZORBA_XML_FN_OPTIONS_NS, "base-uri"),
546+ untyped_type, false, false, nsPairs);
547+ theFactory->createAttributeNode(base_uri_node,
548+ theFactory->createQName(static_context::ZORBA_XML_FN_OPTIONS_NS, "value"),
549+ Item(),
550+ theFactory->createString(aBaseURI));
551+
552+ theContext->validate(options_node, validated_options, validate_strict);
553+
554+ lArgs.push_back(new SingletonItemSequence(validated_options));
555
556 return theContext->invoke(lQName, lArgs);
557 }
558@@ -382,15 +416,15 @@
559 theDiagnosticHandler = aDiagnosticHandler;
560 theUserDiagnosticHandler = true;
561
562- if (theColManager)
563+ if (theColManager)
564 {
565 theColManager->registerDiagnosticHandler(theDiagnosticHandler);
566 }
567- if (theDocManager)
568+ if (theDocManager)
569 {
570 theDocManager->registerDiagnosticHandler(theDiagnosticHandler);
571 }
572- if (theW3CColManager)
573+ if (theW3CColManager)
574 {
575 theW3CColManager->registerDiagnosticHandler(theDiagnosticHandler);
576 }
577@@ -400,17 +434,17 @@
578 /*******************************************************************************
579
580 ********************************************************************************/
581-void XmlDataManagerImpl::registerStemmerProvider(StemmerProvider const *p)
582+void XmlDataManagerImpl::registerStemmerProvider(StemmerProvider const *p)
583 {
584 SYNC_CODE(AutoLatch lock(theLatch, Latch::WRITE);)
585- if ( theStemmerProviderWrapper )
586+ if ( theStemmerProviderWrapper )
587 {
588 if ( theStemmerProviderWrapper->get_provider() == p )
589 return;
590 delete theStemmerProviderWrapper;
591 theStemmerProviderWrapper = nullptr;
592 }
593- if ( p )
594+ if ( p )
595 {
596 theStemmerProviderWrapper = new internal::StemmerProviderWrapper( p );
597 theStore->setStemmerProvider( theStemmerProviderWrapper );
598@@ -421,7 +455,7 @@
599 /*******************************************************************************
600
601 ********************************************************************************/
602-void XmlDataManagerImpl::registerTokenizerProvider(TokenizerProvider const *p)
603+void XmlDataManagerImpl::registerTokenizerProvider(TokenizerProvider const *p)
604 {
605 SYNC_CODE(AutoLatch lock(theLatch, Latch::WRITE);)
606 theStore->setTokenizerProvider( p );
607
608=== modified file 'src/context/static_context.cpp'
609--- src/context/static_context.cpp 2012-03-06 22:43:17 +0000
610+++ src/context/static_context.cpp 2012-03-07 15:45:43 +0000
611@@ -273,11 +273,11 @@
612 static_context::W3C_XML_NS = "http://www.w3.org/XML/1998/namespace";
613
614 const char*
615-static_context::ZORBA_MATH_FN_NS =
616+static_context::ZORBA_MATH_FN_NS =
617 "http://www.zorba-xquery.com/modules/math";
618
619 const char*
620-static_context::ZORBA_BASE64_FN_NS =
621+static_context::ZORBA_BASE64_FN_NS =
622 "http://www.zorba-xquery.com/modules/converters/base64";
623
624
625@@ -286,11 +286,11 @@
626 "http://www.zorba-xquery.com/modules/converters/json";
627
628 const char*
629-static_context::ZORBA_NODEREF_FN_NS =
630+static_context::ZORBA_NODEREF_FN_NS =
631 "http://www.zorba-xquery.com/modules/node-reference";
632
633 const char*
634-static_context::ZORBA_NODEPOS_FN_NS =
635+static_context::ZORBA_NODEPOS_FN_NS =
636 "http://www.zorba-xquery.com/modules/node-position";
637
638 const char*
639@@ -298,71 +298,71 @@
640 "http://www.zorba-xquery.com/modules/store/dynamic/collections/ddl";
641
642 const char*
643-static_context::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_FN_NS =
644+static_context::ZORBA_STORE_DYNAMIC_COLLECTIONS_DML_FN_NS =
645 "http://www.zorba-xquery.com/modules/store/dynamic/collections/dml";
646
647 const char*
648-static_context::ZORBA_STORE_STATIC_COLLECTIONS_DDL_FN_NS =
649+static_context::ZORBA_STORE_STATIC_COLLECTIONS_DDL_FN_NS =
650 "http://www.zorba-xquery.com/modules/store/static/collections/ddl";
651
652 const char*
653-static_context::ZORBA_STORE_STATIC_COLLECTIONS_DML_FN_NS =
654+static_context::ZORBA_STORE_STATIC_COLLECTIONS_DML_FN_NS =
655 "http://www.zorba-xquery.com/modules/store/static/collections/dml";
656
657 const char*
658-static_context::ZORBA_STORE_STATIC_INDEXES_DDL_FN_NS =
659+static_context::ZORBA_STORE_STATIC_INDEXES_DDL_FN_NS =
660 "http://www.zorba-xquery.com/modules/store/static/indexes/ddl";
661
662 const char*
663-static_context::ZORBA_STORE_STATIC_INDEXES_DML_FN_NS =
664+static_context::ZORBA_STORE_STATIC_INDEXES_DML_FN_NS =
665 "http://www.zorba-xquery.com/modules/store/static/indexes/dml";
666
667 const char*
668-static_context::ZORBA_STORE_STATIC_INTEGRITY_CONSTRAINTS_DDL_FN_NS =
669+static_context::ZORBA_STORE_STATIC_INTEGRITY_CONSTRAINTS_DDL_FN_NS =
670 "http://www.zorba-xquery.com/modules/store/static/integrity_constraints/ddl";
671
672 const char*
673-static_context::ZORBA_STORE_STATIC_INTEGRITY_CONSTRAINTS_DML_FN_NS =
674+static_context::ZORBA_STORE_STATIC_INTEGRITY_CONSTRAINTS_DML_FN_NS =
675 "http://www.zorba-xquery.com/modules/store/static/integrity_constraints/dml";
676
677 const char*
678-static_context::ZORBA_STORE_DYNAMIC_DOCUMENTS_FN_NS =
679+static_context::ZORBA_STORE_DYNAMIC_DOCUMENTS_FN_NS =
680 "http://www.zorba-xquery.com/modules/store/dynamic/documents";
681
682 const char*
683-static_context::ZORBA_STORE_DYNAMIC_UNORDERED_MAP_FN_NS =
684+static_context::ZORBA_STORE_DYNAMIC_UNORDERED_MAP_FN_NS =
685 "http://www.zorba-xquery.com/modules/store/data-structures/unordered-map";
686
687 const char*
688-static_context::ZORBA_SCHEMA_FN_NS =
689+static_context::ZORBA_SCHEMA_FN_NS =
690 "http://www.zorba-xquery.com/modules/schema";
691
692 const char*
693-static_context::ZORBA_XQDOC_FN_NS =
694+static_context::ZORBA_XQDOC_FN_NS =
695 "http://www.zorba-xquery.com/modules/xqdoc";
696
697 const char*
698-static_context::ZORBA_RANDOM_FN_NS =
699+static_context::ZORBA_RANDOM_FN_NS =
700 "http://www.zorba-xquery.com/modules/random";
701
702 const char*
703-static_context::ZORBA_INTROSP_SCTX_FN_NS =
704+static_context::ZORBA_INTROSP_SCTX_FN_NS =
705 "http://www.zorba-xquery.com/modules/introspection/sctx";
706
707 const char*
708-static_context::ZORBA_REFLECTION_FN_NS =
709+static_context::ZORBA_REFLECTION_FN_NS =
710 "http://www.zorba-xquery.com/modules/reflection";
711
712 const char*
713-static_context::ZORBA_UTIL_FN_NS =
714+static_context::ZORBA_UTIL_FN_NS =
715 "http://www.zorba-xquery.com/zorba/util-functions";
716
717 const char*
718-static_context::ZORBA_SCRIPTING_FN_NS =
719+static_context::ZORBA_SCRIPTING_FN_NS =
720 "http://www.zorba-xquery.com/zorba/scripting";
721
722 const char*
723-static_context::ZORBA_STRING_FN_NS =
724+static_context::ZORBA_STRING_FN_NS =
725 "http://www.zorba-xquery.com/modules/string";
726
727 const char*
728@@ -374,45 +374,50 @@
729 "http://www.zorba-xquery.com/modules/fetch";
730
731 const char*
732-static_context::ZORBA_NODE_FN_NS =
733+static_context::ZORBA_NODE_FN_NS =
734 "http://www.zorba-xquery.com/modules/node";
735
736 const char*
737-static_context::ZORBA_XML_FN_NS =
738+static_context::ZORBA_XML_FN_NS =
739 "http://www.zorba-xquery.com/modules/xml";
740
741+const char*
742+static_context::ZORBA_XML_FN_OPTIONS_NS =
743+"http://www.zorba-xquery.com/modules/xml-options";
744+
745+
746 /***************************************************************************//**
747 Target namespaces of zorba reserved modules
748 ********************************************************************************/
749 const char*
750-static_context::XQUERY_OP_NS =
751+static_context::XQUERY_OP_NS =
752 "http://www.zorba-xquery.com/internal/xquery-ops";
753
754 const char*
755-static_context::ZORBA_OP_NS =
756+static_context::ZORBA_OP_NS =
757 "http://www.zorba-xquery.com/internal/zorba-ops";
758
759 /***************************************************************************//**
760 Options-related namespaces
761 ********************************************************************************/
762-const char*
763-static_context::ZORBA_OPTIONS_NS =
764+const char*
765+static_context::ZORBA_OPTIONS_NS =
766 "http://www.zorba-xquery.com/options";
767
768-const char*
769-static_context::ZORBA_OPTION_WARN_NS =
770+const char*
771+static_context::ZORBA_OPTION_WARN_NS =
772 "http://www.zorba-xquery.com/options/warnings";
773
774-const char*
775-static_context::ZORBA_OPTION_FEATURE_NS =
776+const char*
777+static_context::ZORBA_OPTION_FEATURE_NS =
778 "http://www.zorba-xquery.com/options/features";
779
780-const char*
781-static_context::ZORBA_OPTION_OPTIM_NS =
782+const char*
783+static_context::ZORBA_OPTION_OPTIM_NS =
784 "http://www.zorba-xquery.com/options/optimizer";
785
786-const char*
787-static_context::ZORBA_VERSIONING_NS =
788+const char*
789+static_context::ZORBA_VERSIONING_NS =
790 "http://www.zorba-xquery.com/options/versioning";
791
792
793@@ -450,7 +455,7 @@
794 ns == ZORBA_FETCH_FN_NS ||
795 ns == ZORBA_NODE_FN_NS ||
796 ns == ZORBA_XML_FN_NS);
797- }
798+ }
799 else if (ns == W3C_FN_NS || ns == XQUERY_MATH_FN_NS)
800 {
801 return true;
802@@ -527,7 +532,7 @@
803 if (lVarName == static_context::DOT_POS_VAR_NAME)
804 {
805 lVarName = "context position";
806- }
807+ }
808 else if (lVarName == static_context::DOT_SIZE_VAR_NAME)
809 {
810 lVarName = "context size";
811@@ -715,7 +720,7 @@
812
813 if (theVariablesMap)
814 delete theVariablesMap;
815-
816+
817 if (theImportedPrivateVariablesMap)
818 delete theImportedPrivateVariablesMap;
819
820@@ -963,7 +968,7 @@
821 ar & theContextItemType;
822
823 ar & theVariablesMap;
824- ar & theImportedPrivateVariablesMap;
825+ ar & theImportedPrivateVariablesMap;
826
827 ar.set_serialize_only_for_eval(true);
828 ar & theFunctionMap;
829@@ -1464,7 +1469,7 @@
830
831 ********************************************************************************/
832 std::auto_ptr<internal::Resource> static_context::resolve_uri(
833- zstring const& aUri,
834+ zstring const& aUri,
835 internal::EntityData::Kind aEntityKind,
836 zstring& oErrorMessage) const
837 {
838@@ -1496,7 +1501,7 @@
839 internal::EntityData const lData(aEntityKind);
840
841 apply_uri_mappers(aUri, &lData, internal::URIMapper::COMPONENT, oComponents);
842- if (oComponents.size() == 0)
843+ if (oComponents.size() == 0)
844 {
845 oComponents.push_back(aUri);
846 }
847@@ -1507,9 +1512,9 @@
848
849 ********************************************************************************/
850 void static_context::apply_uri_mappers(
851- zstring const& aUri,
852+ zstring const& aUri,
853 internal::EntityData const* aEntityData,
854- internal::URIMapper::Kind aMapperKind,
855+ internal::URIMapper::Kind aMapperKind,
856 std::vector<zstring>& oUris) const
857 {
858 // Initialize list with the one input URI.
859@@ -1525,7 +1530,7 @@
860 mapper != sctx->theURIMappers.end(); mapper++)
861 {
862 // Only call mappers of the appropriate kind
863- if ((*mapper)->mapperKind() != aMapperKind)
864+ if ((*mapper)->mapperKind() != aMapperKind)
865 {
866 continue;
867 }
868@@ -1541,16 +1546,16 @@
869 size_t const lPreNumResultUris = lResultUris.size();
870 (*mapper)->mapURI(*uri, aEntityData, *this, lResultUris);
871 size_t const lPostNumResultUris = lResultUris.size();
872- if (lPreNumResultUris == lPostNumResultUris)
873+ if (lPreNumResultUris == lPostNumResultUris)
874 {
875 // Mapper didn't map this URI to anything new, therefore add
876 // the original URI to the result list
877 lResultUris.push_back(*uri);
878 }
879- else
880+ else
881 {
882 // Check the new entries for DENY_ACCESS.
883- for (size_t i = lPreNumResultUris; i < lPostNumResultUris; i++)
884+ for (size_t i = lPreNumResultUris; i < lPostNumResultUris; i++)
885 {
886 if (lResultUris.at(i) == internal::URIMapper::DENY_ACCESS) {
887 throw XQUERY_EXCEPTION(zerr::ZXQP0029_URI_ACCESS_DENIED,
888@@ -1574,14 +1579,14 @@
889 void static_context::apply_url_resolvers(
890 std::vector<zstring>& aUrls,
891 internal::EntityData const* aEntityData,
892- std::auto_ptr<internal::Resource>& oResource,
893+ std::auto_ptr<internal::Resource>& oResource,
894 zstring& oErrorMessage) const
895 {
896 oErrorMessage = "";
897
898 // Iterate through all candidate URLs...
899 for (std::vector<zstring>::iterator url = aUrls.begin();
900- url != aUrls.end(); url++)
901+ url != aUrls.end(); url++)
902 {
903 // We should never try to load the http-client module using its original URI,
904 // because that URI starts with http:, so we'll try to load the http-client
905@@ -1600,7 +1605,7 @@
906 sctx->theURLResolvers.begin();
907 resolver != sctx->theURLResolvers.end(); resolver++)
908 {
909- try
910+ try
911 {
912 // Take ownership of returned Resource (if any)
913 oResource.reset((*resolver)->resolveURL(*url, aEntityData));
914@@ -1611,15 +1616,15 @@
915 return;
916 }
917 }
918- catch (const std::exception& e)
919+ catch (const std::exception& e)
920 {
921- if (oErrorMessage == "")
922+ if (oErrorMessage == "")
923 {
924 // Really no point in saving anything more than the first message
925 oErrorMessage = e.what();
926 }
927 }
928- catch (...)
929+ catch (...)
930 {
931 // Not much we can do here except try the rest of the
932 // candidate URIs
933@@ -2169,7 +2174,7 @@
934 {
935 if (externalVarsOnly)
936 {
937- if((*ite).second->is_external())
938+ if((*ite).second->is_external())
939 vars.push_back((*ite).second);
940 }
941 else
942@@ -2179,7 +2184,7 @@
943 }
944 }
945 }
946-
947+
948 if (returnPrivateVars && sctx->theImportedPrivateVariablesMap != NULL)
949 {
950 VariableMap::iterator ite = sctx->theImportedPrivateVariablesMap->begin();
951@@ -2199,7 +2204,7 @@
952 {
953 if(externalVarsOnly)
954 {
955- if((*ite).second->is_external())
956+ if((*ite).second->is_external())
957 vars.push_back((*ite).second);
958 }
959 else
960@@ -3220,11 +3225,11 @@
961 PrologOption option(qname, value);
962
963 store::Item* qname2 = option.theName.getp();
964-
965+
966 zstring lNamespace = qname2->getNamespace();
967
968 // If option namespace starts with zorba options namespace
969- if ( lNamespace.find(ZORBA_OPTIONS_NS) == 0 )
970+ if ( lNamespace.find(ZORBA_OPTIONS_NS) == 0 )
971 {
972 zstring lLocalName = qname2->getLocalName();
973
974@@ -3239,7 +3244,7 @@
975 process_feature_option(lVal1, lLocalName == "enable", loc);
976 lCommaFound = true;
977 }
978- process_feature_option(lCommaFound ? lVal2 : lVal1,
979+ process_feature_option(lCommaFound ? lVal2 : lVal1,
980 lLocalName == "enable",
981 loc);
982 }
983@@ -3254,7 +3259,7 @@
984 process_optim_option(lVal1, lLocalName == "enable", loc);
985 lCommaFound = true;
986 }
987- process_optim_option(lCommaFound ? lVal2 : lVal1,
988+ process_optim_option(lCommaFound ? lVal2 : lVal1,
989 lLocalName == "enable",
990 loc);
991 }
992@@ -3282,7 +3287,7 @@
993 // Re-use "ModuleVersion" class since it does 98% of the work for us;
994 // just use a fake URI
995 ModuleVersion lOptVersion(zstring(ZORBA_VERSIONING_NS) + "/corezorba", value);
996- if (! lOptVersion.is_valid_version())
997+ if (! lOptVersion.is_valid_version())
998 {
999 RAISE_ERROR(zerr::ZXQP0039_INVALID_VERSION_SPECIFICATION, loc,
1000 ERROR_PARAMS(value));
1001@@ -3291,7 +3296,7 @@
1002 ModuleVersion lZorbaVersion(zstring(ZORBA_VERSIONING_NS) + "/corezorba",
1003 ZORBA_VERSION);
1004
1005- if ( ! lZorbaVersion.satisfies(lOptVersion))
1006+ if ( ! lZorbaVersion.satisfies(lOptVersion))
1007 {
1008 RAISE_ERROR(zerr::ZXQP0038_INAPPROPRIATE_ZORBA_VERSION, loc,
1009 ERROR_PARAMS(value, ZORBA_VERSION));
1010@@ -3301,7 +3306,7 @@
1011
1012 // If the option is in (starts-with) Zorba's own namespace but not known,
1013 // we raise an error
1014- else
1015+ else
1016 {
1017 RAISE_ERROR(zerr::ZXQP0060_OPTION_NOT_KNOWN, loc,
1018 ERROR_PARAMS(qname2->getNamespace() + ":" + qname2->getLocalName()));
1019@@ -3352,7 +3357,7 @@
1020 const zstring& name,
1021 const QueryLoc& loc)
1022 {
1023- store::Item_t lQName = parse_and_expand_qname( value, ZORBA_WARN_NS, loc );
1024+ store::Item_t lQName = parse_and_expand_qname( value, ZORBA_WARN_NS, loc );
1025
1026 std::vector<store::Item_t>::iterator lIter;
1027
1028@@ -3418,7 +3423,7 @@
1029 RAISE_ERROR(zerr::ZDST0060_FEATURE_NOT_SUPPORTED, loc,
1030 ERROR_PARAMS(featureName->getStringValue(),
1031 ZED(ZDST0060_unknown_namespace),
1032- featureName->getNamespace()));
1033+ featureName->getNamespace()));
1034 }
1035
1036 feature::kind k;
1037@@ -3434,7 +3439,7 @@
1038 RAISE_ERROR(zerr::ZDST0060_FEATURE_NOT_SUPPORTED, loc,
1039 ERROR_PARAMS(featureName->getStringValue(),
1040 ZED(ZDST0060_unknown_localname),
1041- featureName->getLocalName()));
1042+ featureName->getLocalName()));
1043 }
1044 }
1045
1046@@ -3450,7 +3455,7 @@
1047 if (value != "for-serialization-only")
1048 {
1049 RAISE_ERROR(zerr::ZDST0060_FEATURE_NOT_SUPPORTED, loc,
1050- ERROR_PARAMS(value, ZED(ZDST0060_unknown_localname), value));
1051+ ERROR_PARAMS(value, ZED(ZDST0060_unknown_localname), value));
1052 }
1053 }
1054
1055@@ -3974,11 +3979,11 @@
1056 {
1057 theImportedPrivateVariablesMap = new VariableMap(0, NULL, 8, false);
1058 }
1059-
1060+
1061 if (!theImportedPrivateVariablesMap->insert(ve->get_name(), ve))
1062 {
1063 throw XQUERY_EXCEPTION_VAR(err::XQST0049, ERROR_PARAMS( ve->get_name()->getStringValue() ), ERROR_LOC( loc ));
1064- }
1065+ }
1066 }
1067 }
1068 }
1069
1070=== modified file 'src/context/static_context.h'
1071--- src/context/static_context.h 2012-02-24 00:40:26 +0000
1072+++ src/context/static_context.h 2012-03-07 15:45:43 +0000
1073@@ -273,7 +273,7 @@
1074 theExternalModulesMap :
1075 -----------------------
1076
1077- theTypeMnager :
1078+ theTypeManager :
1079 ---------------
1080 If non NULL, then "this" is the root sctx of a module, and theTypeManager stores
1081 the schemas that are imported by the associated module (in-scope element
1082@@ -296,7 +296,7 @@
1083
1084 theVariablesMap :
1085 -----------------
1086-
1087+
1088 theImportedPrivateVariablesMap :
1089 --------------------------------
1090
1091@@ -469,6 +469,7 @@
1092 static const char* ZORBA_FETCH_FN_NS;
1093 static const char* ZORBA_NODE_FN_NS;
1094 static const char* ZORBA_XML_FN_NS;
1095+ static const char* ZORBA_XML_FN_OPTIONS_NS;
1096
1097 // Namespaces of virtual modules declaring zorba builtin functions
1098 static const char* ZORBA_UTIL_FN_NS;
1099@@ -522,7 +523,7 @@
1100 xqtref_t theContextItemType;
1101
1102 VariableMap * theVariablesMap;
1103-
1104+
1105 VariableMap * theImportedPrivateVariablesMap;
1106
1107 FunctionMap * theFunctionMap;
1108
1109=== modified file 'src/diagnostics/diagnostic_en.xml'
1110--- src/diagnostics/diagnostic_en.xml 2012-03-06 00:09:14 +0000
1111+++ src/diagnostics/diagnostic_en.xml 2012-03-07 15:45:43 +0000
1112@@ -1753,7 +1753,7 @@
1113 </diagnostic>
1114
1115 <diagnostic code="ZXQD0003" name="INCONSISTENT_PARSE_FRAGMENT_OPTIONS">
1116- <value>inconsistent options to the parse-xml-fragment() function: $1</value>
1117+ <value>inconsistent options to the parse-xml() function: $1</value>
1118 </diagnostic>
1119
1120 <diagnostic code="ZXQD0004" name="INVALID_PARAMETER">
1121@@ -2612,6 +2612,10 @@
1122 <entry key="BadXMLDocument_2o">
1123 <value>malformed XML document${ at "2"}</value>
1124 </entry>
1125+
1126+ <entry key="BadXMLNoOpeningTag">
1127+ <value>closing tag without matching opening tag</value>
1128+ </entry>
1129
1130 <entry key="BadXMLForXQDoc_3">
1131 <value>can not parse as XML for xqdoc: $3</value>
1132@@ -3509,12 +3513,12 @@
1133 <value>xqueryx content is empty</value>
1134 </entry>
1135
1136- <entry key="ParseFragmentOptionDSLNotAllowed">
1137- <value>if the e option is specified, none of the options d, s, or l may be enabled</value>
1138- </entry>
1139-
1140 <entry key="ParseFragmentOptionCombinationNotAllowed">
1141- <value>specifying both $2 and $3 is an error</value>
1142+ <value>only one of the &lt;schema-validate/&gt;, &lt;DTD-validate/&gt; or &lt;parse-external-parsed-entity/&gt; options can be specified</value>
1143+ </entry>
1144+
1145+ <entry key="ParseFragmentInvalidOptions">
1146+ <value>invalid options passed to the parse-xml:parse() function, the element must in the schema target namespace</value>
1147 </entry>
1148
1149 </subvalues>
1150
1151=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
1152--- src/diagnostics/pregenerated/dict_en.cpp 2012-03-06 00:09:14 +0000
1153+++ src/diagnostics/pregenerated/dict_en.cpp 2012-03-07 15:45:43 +0000
1154@@ -384,7 +384,7 @@
1155 { "ZWST0006", "\"$1\": function caching might not give the intended result because the function is declared as $2" },
1156 { "ZXQD0001", "\"$1\": prefix not declared when calling function \"$2\" from $3" },
1157 { "ZXQD0002", "\"$1\": $2" },
1158- { "ZXQD0003", "inconsistent options to the parse-xml-fragment() function: $1" },
1159+ { "ZXQD0003", "inconsistent options to the parse-xml() function: $1" },
1160 { "ZXQD0004", "invalid parameter: $1" },
1161 { "ZXQD0005", "key with type $1 not subtype or castable to target type $2 of map ($3)" },
1162 { "ZXQD0006", "\"$1\": invalid UTF-8 byte sequence" },
1163@@ -462,6 +462,7 @@
1164 { "~BadWordNetPtr_2", "\"$2\": invalid pointer type" },
1165 { "~BadXMLDocument_2o", "malformed XML document${ at \"2\"}" },
1166 { "~BadXMLForXQDoc_3", "can not parse as XML for xqdoc: $3" },
1167+ { "~BadXMLNoOpeningTag", "closing tag without matching opening tag" },
1168 { "~BadXQueryVersion", "unsupported XQuery version" },
1169 { "~Base64BadChar", "invalid Base64 character" },
1170 { "~Base64Equals", "in Base64, '=' must be at the end and followed by one of [AEIMQUYcgkosw048]" },
1171@@ -580,8 +581,8 @@
1172 { "~OpNodeBeforeMustHaveNodes", "op:node-before() must have nodes as parameters" },
1173 { "~OperationNotDef_23", "$2 not defined for type \"$3\"" },
1174 { "~OperationNotPossibleWithTypes_234", "\"$2\": operation not possible with parameters of type \"$3\" and \"$4\"" },
1175- { "~ParseFragmentOptionCombinationNotAllowed", "specifying both $2 and $3 is an error" },
1176- { "~ParseFragmentOptionDSLNotAllowed", "if the e option is specified, none of the options d, s, or l may be enabled" },
1177+ { "~ParseFragmentInvalidOptions", "invalid options passed to the parse-xml:parse() function, the element must in the schema target namespace" },
1178+ { "~ParseFragmentOptionCombinationNotAllowed", "only one of the <schema-validate/>, <DTD-validate/> or <parse-external-parsed-entity/> options can be specified" },
1179 { "~ParserInitFailed", "parser initialization failed" },
1180 { "~ParserNoCreateTree", "XML tree creation failed" },
1181 { "~PromotionImpossible", "promotion not possible" },
1182
1183=== modified file 'src/functions/pregenerated/func_parse_fragment.cpp'
1184--- src/functions/pregenerated/func_parse_fragment.cpp 2012-02-16 12:48:17 +0000
1185+++ src/functions/pregenerated/func_parse_fragment.cpp 2012-03-07 15:45:43 +0000
1186@@ -31,7 +31,7 @@
1187
1188
1189
1190-PlanIter_t fn_zorba_xml_parse_xml_fragment::codegen(
1191+PlanIter_t fn_zorba_xml_parse::codegen(
1192 CompilerCB*,
1193 static_context* sctx,
1194 const QueryLoc& loc,
1195@@ -46,26 +46,12 @@
1196 {
1197
1198
1199- DECL_WITH_KIND(sctx, fn_zorba_xml_parse_xml_fragment,
1200- (createQName("http://www.zorba-xquery.com/modules/xml","","parse-xml-fragment"),
1201- GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
1202- GENV_TYPESYSTEM.STRING_TYPE_ONE,
1203- GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
1204- FunctionConsts::FN_ZORBA_XML_PARSE_XML_FRAGMENT_2);
1205-
1206- }
1207-
1208-
1209- {
1210-
1211-
1212- DECL_WITH_KIND(sctx, fn_zorba_xml_parse_xml_fragment,
1213- (createQName("http://www.zorba-xquery.com/modules/xml","","parse-xml-fragment"),
1214- GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
1215- GENV_TYPESYSTEM.STRING_TYPE_ONE,
1216- GENV_TYPESYSTEM.STRING_TYPE_ONE,
1217- GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
1218- FunctionConsts::FN_ZORBA_XML_PARSE_XML_FRAGMENT_3);
1219+ DECL_WITH_KIND(sctx, fn_zorba_xml_parse,
1220+ (createQName("http://www.zorba-xquery.com/modules/xml","","parse"),
1221+ GENV_TYPESYSTEM.STRING_TYPE_QUESTION,
1222+ GENV_TYPESYSTEM.ELEMENT_TYPE_QUESTION,
1223+ GENV_TYPESYSTEM.ANY_NODE_TYPE_STAR),
1224+ FunctionConsts::FN_ZORBA_XML_PARSE_2);
1225
1226 }
1227
1228
1229=== modified file 'src/functions/pregenerated/func_parse_fragment.h'
1230--- src/functions/pregenerated/func_parse_fragment.h 2012-01-11 17:30:25 +0000
1231+++ src/functions/pregenerated/func_parse_fragment.h 2012-03-07 15:45:43 +0000
1232@@ -38,11 +38,11 @@
1233
1234
1235
1236-//fn-zorba-xml:parse-xml-fragment
1237-class fn_zorba_xml_parse_xml_fragment : public function
1238+//fn-zorba-xml:parse
1239+class fn_zorba_xml_parse : public function
1240 {
1241 public:
1242- fn_zorba_xml_parse_xml_fragment(const signature& sig, FunctionConsts::FunctionKind kind)
1243+ fn_zorba_xml_parse(const signature& sig, FunctionConsts::FunctionKind kind)
1244 :
1245 function(sig, kind)
1246 {
1247
1248=== modified file 'src/functions/pregenerated/function_enum.h'
1249--- src/functions/pregenerated/function_enum.h 2012-02-24 00:40:26 +0000
1250+++ src/functions/pregenerated/function_enum.h 2012-03-07 15:45:43 +0000
1251@@ -254,8 +254,7 @@
1252 FN_FORMAT_NUMBER_3,
1253 FN_FORMAT_INTEGER_2,
1254 FN_FORMAT_INTEGER_3,
1255- FN_ZORBA_XML_PARSE_XML_FRAGMENT_2,
1256- FN_ZORBA_XML_PARSE_XML_FRAGMENT_3,
1257+ FN_ZORBA_XML_PARSE_2,
1258 FN_PARSE_XML_1,
1259 FN_PARSE_XML_2,
1260 FN_SERIALIZE_1,
1261
1262=== modified file 'src/runtime/parsing_and_serializing/fragment_istream.h' (properties changed: +x to -x)
1263--- src/runtime/parsing_and_serializing/fragment_istream.h 2011-07-16 13:33:13 +0000
1264+++ src/runtime/parsing_and_serializing/fragment_istream.h 2012-03-07 15:45:43 +0000
1265@@ -18,55 +18,99 @@
1266 #define ZORBA_RUNTIME_PARSING_AND_SERIALIZING_FRAGMENT_ISTREAM_H
1267
1268 #include <iostream>
1269+#include <libxml/parser.h>
1270+#include <store/api/iterator.h>
1271
1272 namespace zorba {
1273
1274 /**
1275- * A class to hold an input stream for the parse-xml-fragment function
1276- * Author: Zorba Team
1277+ * A class to hold an input stream for the parse-xml:parse() function
1278+ * Author: Nicolae Brinza
1279 */
1280 class FragmentIStream : public std::istream
1281 {
1282 public:
1283+ static const unsigned int BUFFER_SIZE = 4096;
1284+ static const unsigned int LOOKAHEAD_BYTES = 3; // lookahead fetching is implemented, but currently not used
1285+ static const unsigned int PARSED_NODES_BATCH_SIZE = 1024;
1286+
1287+public:
1288 FragmentIStream()
1289 :
1290 std::istream(NULL),
1291 theIss(NULL),
1292 theStream(NULL),
1293 theBuffer(NULL),
1294- buffer_size(0),
1295- current_offset(0)
1296+ bytes_in_buffer(0),
1297+ current_offset(0),
1298+ current_element_depth(0),
1299+ root_elements_to_skip(0),
1300+ ctxt(NULL),
1301+ first_start_doc(true),
1302+ forced_parser_stop(false),
1303+ reached_eof(false),
1304+ parsed_nodes_count(0),
1305+ children(NULL)
1306 {
1307 };
1308
1309+ bool stream_is_consumed()
1310+ {
1311+ return reached_eof && current_offset >= bytes_in_buffer;
1312+ }
1313+
1314 void reset()
1315 {
1316 if (theBuffer)
1317+ {
1318 delete[] theBuffer;
1319+ }
1320+
1321 if (theIss)
1322+ {
1323 delete theIss;
1324+ }
1325+
1326+ if (ctxt)
1327+ {
1328+ xmlCtxtReset(ctxt);
1329+ xmlFreeParserCtxt(ctxt);
1330+ }
1331
1332 theIss = NULL;
1333 theStream = NULL;
1334 theBuffer = NULL;
1335- buffer_size = 0;
1336+ bytes_in_buffer = 0;
1337 current_offset = 0;
1338+ current_element_depth = 0;
1339+ root_elements_to_skip = 0;
1340+ ctxt = NULL;
1341+ first_start_doc = true;
1342+ forced_parser_stop = false;
1343+ reached_eof = false;
1344+ parsed_nodes_count = 0;
1345+ children = NULL;
1346 }
1347
1348 virtual ~FragmentIStream()
1349 {
1350- if (theBuffer)
1351- delete[] theBuffer;
1352- if (theIss)
1353- delete theIss;
1354+ reset();
1355 }
1356
1357 public:
1358 std::istringstream* theIss;
1359 std::istream* theStream;
1360 char* theBuffer;
1361- unsigned long buffer_size;
1362+ unsigned long bytes_in_buffer;
1363 unsigned long current_offset;
1364+ int current_element_depth;
1365+ int root_elements_to_skip;
1366+ xmlParserCtxtPtr ctxt;
1367+ bool first_start_doc;
1368+ bool forced_parser_stop;
1369+ bool reached_eof;
1370+ unsigned int parsed_nodes_count;
1371+ store::Iterator_t children;
1372 };
1373
1374 }
1375
1376=== modified file 'src/runtime/parsing_and_serializing/parse_fragment_impl.cpp' (properties changed: +x to -x)
1377--- src/runtime/parsing_and_serializing/parse_fragment_impl.cpp 2011-08-10 02:50:23 +0000
1378+++ src/runtime/parsing_and_serializing/parse_fragment_impl.cpp 2012-03-07 15:45:43 +0000
1379@@ -25,117 +25,150 @@
1380 #include "store/api/store.h"
1381 #include "store/api/item.h"
1382 #include "store/api/item_factory.h"
1383+#include "store/api/load_properties.h"
1384
1385 #include "system/globalenv.h"
1386
1387 #include "types/schema/schema.h"
1388 #include "types/schema/validate.h"
1389
1390+
1391 namespace zorba
1392 {
1393
1394 /*******************************************************************************
1395- 14.9.1 fn-zorba-xml:parse-xml-fragment
1396+ 14.9.1 fn-zorba-xml:parse
1397 ********************************************************************************/
1398
1399-class ParseXmlFragmentOptions
1400-{
1401-public:
1402- // all options are false by default, except for enableFatelErrorProcessing which is true
1403- bool enableExternalEntitiesProcessing;
1404- bool enableDTDValidation;
1405- bool enableStrictSchemaValidation;
1406- bool enableLaxSchemaValidation;
1407- bool enableWhitespaceStripping;
1408- bool enableFatelErrorProcessing;
1409-
1410-public:
1411- ParseXmlFragmentOptions() :
1412- enableExternalEntitiesProcessing(false),
1413- enableDTDValidation(false),
1414- enableStrictSchemaValidation(false),
1415- enableLaxSchemaValidation(false),
1416- enableWhitespaceStripping(false),
1417- enableFatelErrorProcessing(true) // only enableFatelErrorProcessing is set to true
1418- {
1419- }
1420-
1421- void reset()
1422- {
1423- enableExternalEntitiesProcessing = false;
1424- enableDTDValidation = false;
1425- enableStrictSchemaValidation = false;
1426- enableLaxSchemaValidation = false;
1427- enableWhitespaceStripping = false;
1428- enableFatelErrorProcessing = true; // only enableFatelErrorProcessing is set to true
1429- }
1430-
1431- static ParseXmlFragmentOptions parseOptions(const zstring& options, const QueryLoc& loc)
1432- {
1433- ParseXmlFragmentOptions opt;
1434-
1435- if (options.find("e") != zstring::npos && options.find("E") != zstring::npos)
1436- throw XQUERY_EXCEPTION(zerr::ZXQD0003_INCONSISTENT_PARSE_FRAGMENT_OPTIONS,
1437- ERROR_PARAMS(ZED(ParseFragmentOptionCombinationNotAllowed), "e", "E"), ERROR_LOC( loc ));
1438-
1439- if (options.find("d") != zstring::npos && options.find("D") != zstring::npos)
1440- throw XQUERY_EXCEPTION(zerr::ZXQD0003_INCONSISTENT_PARSE_FRAGMENT_OPTIONS,
1441- ERROR_PARAMS(ZED(ParseFragmentOptionCombinationNotAllowed), "d", "D"), ERROR_LOC( loc ));
1442-
1443- if (options.find("s") != zstring::npos && options.find("S") != zstring::npos)
1444- throw XQUERY_EXCEPTION(zerr::ZXQD0003_INCONSISTENT_PARSE_FRAGMENT_OPTIONS,
1445- ERROR_PARAMS(ZED(ParseFragmentOptionCombinationNotAllowed), "s", "S"), ERROR_LOC( loc ));
1446-
1447- if (options.find("l") != zstring::npos && options.find("L") != zstring::npos)
1448- throw XQUERY_EXCEPTION(zerr::ZXQD0003_INCONSISTENT_PARSE_FRAGMENT_OPTIONS,
1449- ERROR_PARAMS(ZED(ParseFragmentOptionCombinationNotAllowed), "l", "L"), ERROR_LOC( loc ));
1450-
1451- if (options.find("w") != zstring::npos && options.find("W") != zstring::npos)
1452- throw XQUERY_EXCEPTION(zerr::ZXQD0003_INCONSISTENT_PARSE_FRAGMENT_OPTIONS,
1453- ERROR_PARAMS(ZED(ParseFragmentOptionCombinationNotAllowed), "w", "W"), ERROR_LOC( loc ));
1454-
1455- if (options.find("f") != zstring::npos && options.find("F") != zstring::npos)
1456- throw XQUERY_EXCEPTION(zerr::ZXQD0003_INCONSISTENT_PARSE_FRAGMENT_OPTIONS,
1457- ERROR_PARAMS(ZED(ParseFragmentOptionCombinationNotAllowed), "f", "F"), ERROR_LOC( loc ));
1458-
1459- if (options.find("e") != zstring::npos)
1460- opt.enableExternalEntitiesProcessing = true;
1461- if (options.find("d") != zstring::npos)
1462- opt.enableDTDValidation = true;
1463- if (options.find("s") != zstring::npos)
1464- opt.enableStrictSchemaValidation = true;
1465- if (options.find("l") != zstring::npos)
1466- opt.enableLaxSchemaValidation = true;
1467- if (options.find("w") != zstring::npos)
1468- opt.enableWhitespaceStripping = true;
1469- if (options.find("f") != zstring::npos)
1470- opt.enableFatelErrorProcessing = true;
1471-
1472- if (options.find("E") != zstring::npos)
1473- opt.enableExternalEntitiesProcessing = false;
1474- if (options.find("D") != zstring::npos)
1475- opt.enableDTDValidation = false;
1476- if (options.find("S") != zstring::npos)
1477- opt.enableStrictSchemaValidation = false;
1478- if (options.find("L") != zstring::npos)
1479- opt.enableLaxSchemaValidation = false;
1480- if (options.find("W") != zstring::npos)
1481- opt.enableWhitespaceStripping = false;
1482- if (options.find("F") != zstring::npos)
1483- opt.enableFatelErrorProcessing = false;
1484-
1485- if (opt.enableExternalEntitiesProcessing
1486- &&
1487- (opt.enableDTDValidation || opt.enableStrictSchemaValidation || opt.enableLaxSchemaValidation))
1488- {
1489- throw XQUERY_EXCEPTION(zerr::ZXQD0003_INCONSISTENT_PARSE_FRAGMENT_OPTIONS,
1490- ERROR_PARAMS(ZED(ParseFragmentOptionDSLNotAllowed)), ERROR_LOC( loc ));
1491- }
1492-
1493- return opt;
1494- }
1495-};
1496-
1497+store::Item_t getFirstAttribute(store::Item_t node)
1498+{
1499+ store::Item_t attr;
1500+ store::Iterator_t attributes = node->getAttributes();
1501+ attributes->open();
1502+ attributes->next(attr);
1503+ attributes->close();
1504+ return attr;
1505+}
1506+
1507+void processOptions(store::Item_t item, store::LoadProperties& props, static_context* theSctx, const QueryLoc& loc)
1508+{
1509+ URI lValidatedBaseUri;
1510+ store::Item_t child, tempItem;
1511+
1512+ if (item.getp() == NULL)
1513+ return;
1514+
1515+#ifndef ZORBA_NO_XMLSCHEMA
1516+ if (item->isValidated())
1517+ {
1518+ if (item->getNodeName() == NULL
1519+ ||
1520+ item->getNodeName()->getNamespace() != static_context::ZORBA_XML_FN_OPTIONS_NS)
1521+ {
1522+ throw XQUERY_EXCEPTION(zerr::ZXQD0003_INCONSISTENT_PARSE_FRAGMENT_OPTIONS,
1523+ ERROR_PARAMS(ZED(ParseFragmentInvalidOptions)), ERROR_LOC( loc ));
1524+ }
1525+ }
1526+ else
1527+ {
1528+ tempItem = NULL; // used as the effectiveValidationValue()'s typeName
1529+ Validator::effectiveValidationValue(
1530+ item,
1531+ item,
1532+ tempItem,
1533+ theSctx->get_typemanager(),
1534+ ParseConstants::val_strict,
1535+ theSctx,
1536+ loc);
1537+ }
1538+#endif
1539+
1540+ store::Iterator_t children = item->getChildren();
1541+ children->open();
1542+
1543+ while (children->next(child))
1544+ {
1545+ if (child->getNodeKind() != store::StoreConsts::elementNode)
1546+ continue;
1547+
1548+ if (child->getNodeName()->getLocalName() == "base-uri")
1549+ {
1550+ store::Item_t attr = getFirstAttribute(child);
1551+
1552+ try {
1553+ lValidatedBaseUri = URI(attr->getStringValue());
1554+ } catch (ZorbaException const& /* e */) {
1555+ throw XQUERY_EXCEPTION(
1556+ err::FODC0007,
1557+ ERROR_PARAMS( attr->getStringValue() ),
1558+ ERROR_LOC( loc )
1559+ );
1560+ }
1561+
1562+ if (!lValidatedBaseUri.is_absolute()) {
1563+ throw XQUERY_EXCEPTION(
1564+ err::FODC0007,
1565+ ERROR_PARAMS( lValidatedBaseUri.toString() ),
1566+ ERROR_LOC( loc )
1567+ );
1568+ }
1569+
1570+ props.setBaseUri(attr->getStringValue());
1571+ }
1572+ else if (child->getNodeName()->getLocalName() == "no-error")
1573+ props.setNoError(true);
1574+ else if (child->getNodeName()->getLocalName() == "strip-boundary-space")
1575+ props.setStripWhitespace(true);
1576+ else if (child->getNodeName()->getLocalName() == "schema-validate")
1577+ {
1578+ store::Item_t attr = getFirstAttribute(child);
1579+ if (attr->getStringValue() == "strict")
1580+ props.setSchemaStrictValidate(true);
1581+ else
1582+ props.setSchemaLaxValidate(true);
1583+ }
1584+ else if (child->getNodeName()->getLocalName() == "DTD-validate")
1585+ props.setDTDValidate(true);
1586+ else if (child->getNodeName()->getLocalName() == "DTD-load")
1587+ props.setDTDLoad(true);
1588+ else if (child->getNodeName()->getLocalName() == "default-DTD-attributes")
1589+ props.setDefaultDTDAttributes(true);
1590+ else if (child->getNodeName()->getLocalName() == "parse-external-parsed-entity")
1591+ {
1592+ props.setParseExternalParsedEntity(true);
1593+ store::Item_t attr;
1594+ store::Iterator_t attribs = child->getAttributes();
1595+ attribs->open();
1596+ while (attribs->next(attr))
1597+ {
1598+ if (attr->getNodeName()->getLocalName() == "skip-root-nodes")
1599+ props.setSkipRootNodes(ztd::aton<xs_int>(attr->getStringValue().c_str()));
1600+ else if (attr->getNodeName()->getLocalName() == "skip-top-level-text-nodes")
1601+ props.setSkipTopLevelTextNodes(true);
1602+ }
1603+ attribs->close();
1604+ }
1605+ else if (child->getNodeName()->getLocalName() == "substitute-entities")
1606+ props.setSubstituteEntities(true);
1607+ else if (child->getNodeName()->getLocalName() == "xinclude-substitutions")
1608+ props.setXincludeSubstitutions(true);
1609+ else if (child->getNodeName()->getLocalName() == "remove-redundant-ns")
1610+ props.setRemoveRedundantNS(true);
1611+ else if (child->getNodeName()->getLocalName() == "no-CDATA")
1612+ props.setNoCDATA(true);
1613+ else if (child->getNodeName()->getLocalName() == "no-xinclude-nodes")
1614+ props.setNoXIncludeNodes(true);
1615+ }
1616+
1617+ children->close();
1618+
1619+ if (props.getSchemaLaxValidate() + props.getSchemaStrictValidate() +
1620+ props.getDTDValidate() + props.getParseExternalParsedEntity() > 1)
1621+ {
1622+ throw XQUERY_EXCEPTION(zerr::ZXQD0003_INCONSISTENT_PARSE_FRAGMENT_OPTIONS,
1623+ ERROR_PARAMS(ZED(ParseFragmentOptionCombinationNotAllowed)), ERROR_LOC( loc ));
1624+ }
1625+}
1626
1627 /*******************************************************************************
1628
1629@@ -145,8 +178,7 @@
1630 {
1631 PlanIteratorState::reset(planState);
1632 theFragmentStream.reset();
1633- theProperties.setEnableDtd(false);
1634- theProperties.setEnableExtParsedEntity(false);
1635+ theProperties.reset();
1636 theProperties.setStoreDocument(false);
1637 baseUri = "";
1638 docUri = "";
1639@@ -161,9 +193,7 @@
1640 {
1641 store::Store& lStore = GENV.getStore();
1642 zstring docString;
1643- URI lValidatedBaseUri;
1644 store::Item_t tempItem;
1645- ParseXmlFragmentOptions parseOptions;
1646 bool validated = true;
1647
1648 FnParseXmlFragmentIteratorState* state;
1649@@ -182,87 +212,61 @@
1650 state->theFragmentStream.theStream = state->theFragmentStream.theIss;
1651 }
1652
1653- // optional base URI argument
1654- if (theChildren.size() == 3)
1655- {
1656- consumeNext(result, theChildren[1].getp(), planState);
1657- ZORBA_ASSERT(result);
1658-
1659- try {
1660- lValidatedBaseUri = URI(result->getStringValue());
1661- } catch (ZorbaException const& /* e */) {
1662- throw XQUERY_EXCEPTION(
1663- err::FODC0007,
1664- ERROR_PARAMS( result->getStringValue() ),
1665- ERROR_LOC( loc )
1666- );
1667- }
1668-
1669- if (!lValidatedBaseUri.is_absolute()) {
1670- throw XQUERY_EXCEPTION(
1671- err::FODC0007,
1672- ERROR_PARAMS( lValidatedBaseUri.toString() ),
1673- ERROR_LOC( loc )
1674- );
1675- }
1676-
1677- result->getStringValue2(state->baseUri);
1678-
1679- // read options
1680- consumeNext(tempItem, theChildren[2].getp(), planState);
1681- parseOptions = ParseXmlFragmentOptions::parseOptions(tempItem->getStringValue(), loc);
1682-
1683- } else {
1684- // read options
1685- consumeNext(tempItem, theChildren[1].getp(), planState);
1686- parseOptions = ParseXmlFragmentOptions::parseOptions(tempItem->getStringValue(), loc);
1687-
1688- state->baseUri = theSctx->get_base_uri();
1689- }
1690+ // read options
1691+ consumeNext(tempItem, theChildren[1].getp(), planState);
1692+ state->theProperties.setBaseUri(theSctx->get_base_uri());
1693+ state->theProperties.setStoreDocument(false);
1694+ processOptions(tempItem, state->theProperties, theSctx, loc);
1695
1696 // baseURI serves both as the base URI used by the XML parser
1697 // to resolve relative entity references within the document,
1698 // and as the base URI of the document node that is returned.
1699- state->docUri = state->baseUri;
1700-
1701- // The DTD and ExternalEntitiesProcessing options/props cannot both be true at the same time
1702- if (parseOptions.enableDTDValidation)
1703- state->theProperties.setEnableDtd(true);
1704- if (parseOptions.enableExternalEntitiesProcessing)
1705- state->theProperties.setEnableExtParsedEntity(true);
1706- state->theProperties.setStoreDocument(false);
1707-
1708- if (state->theProperties.getEnableExtParsedEntity())
1709+ state->baseUri = state->theProperties.getBaseUri();
1710+ state->docUri = state->theProperties.getBaseUri();
1711+
1712+
1713+ ////////////////////////////////////////////////////////////////////////
1714+ // External parsed entity processing
1715+ ////////////////////////////////////////////////////////////////////////
1716+ if (state->theProperties.getParseExternalParsedEntity())
1717 {
1718- // state->theFragmentStream.root_elements_to_skip = 0;
1719+ state->theFragmentStream.root_elements_to_skip = state->theProperties.getSkipRootNodes();
1720
1721- while (state->theFragmentStream.theBuffer == NULL
1722- ||
1723- state->theFragmentStream.current_offset < state->theFragmentStream.buffer_size)
1724+ while ( ! state->theFragmentStream.stream_is_consumed())
1725 {
1726 try {
1727 result = lStore.loadDocument(state->baseUri, state->docUri, state->theFragmentStream, state->theProperties);
1728 } catch (ZorbaException const& e) {
1729- if (parseOptions.enableFatelErrorProcessing)
1730- throw XQUERY_EXCEPTION( err::FODC0006, ERROR_PARAMS("parse-xml:parse-xml-fragment()", e.what()), ERROR_LOC( loc ));
1731+ if ( ! state->theProperties.getNoError())
1732+ throw XQUERY_EXCEPTION( err::FODC0006, ERROR_PARAMS("parse-xml:parse()", e.what()), ERROR_LOC( loc ));
1733 else
1734 result = NULL;
1735 }
1736
1737- if (result != NULL)
1738+ if (result == NULL)
1739+ continue;
1740+
1741+ // Return the children of document node
1742+ state->theFragmentStream.children = result->getChildren();
1743+ while (state->theFragmentStream.children->next(result) && result != NULL)
1744 {
1745- result->getChildren()->next(result);
1746+ if (state->theProperties.getSkipTopLevelTextNodes() && result->getNodeKind() == store::StoreConsts::textNode)
1747+ continue;
1748+
1749 STACK_PUSH(true, state);
1750 }
1751 }
1752 }
1753+ ////////////////////////////////////////////////////////////////////////
1754+ // XML document processing
1755+ ////////////////////////////////////////////////////////////////////////
1756 else // if (!state->theProperties.getEnableExtParsedEntity())
1757 {
1758 try {
1759 result = lStore.loadDocument(state->baseUri, state->docUri, *state->theFragmentStream.theStream, state->theProperties);
1760 } catch (ZorbaException const& e) {
1761- if (parseOptions.enableFatelErrorProcessing)
1762- throw XQUERY_EXCEPTION( err::FODC0006, ERROR_PARAMS("parse-xml:parse-xml-fragment()", e.what()), ERROR_LOC( loc ));
1763+ if ( ! state->theProperties.getNoError())
1764+ throw XQUERY_EXCEPTION( err::FODC0006, ERROR_PARAMS("parse-xml:parse()", e.what()), ERROR_LOC( loc ));
1765 else
1766 result = NULL;
1767 }
1768@@ -270,7 +274,7 @@
1769 if (result != NULL)
1770 {
1771 #ifndef ZORBA_NO_XMLSCHEMA
1772- if (parseOptions.enableStrictSchemaValidation || parseOptions.enableLaxSchemaValidation)
1773+ if (state->theProperties.getSchemaLaxValidate() || state->theProperties.getSchemaStrictValidate())
1774 {
1775 try
1776 {
1777@@ -280,13 +284,13 @@
1778 result,
1779 tempItem,
1780 theSctx->get_typemanager(),
1781- parseOptions.enableLaxSchemaValidation ? ParseConstants::val_lax : ParseConstants::val_strict,
1782+ state->theProperties.getSchemaLaxValidate() ? ParseConstants::val_lax : ParseConstants::val_strict,
1783 theSctx,
1784 this->loc);
1785 }
1786 catch (ZorbaException& /*e*/)
1787 {
1788- if (parseOptions.enableFatelErrorProcessing)
1789+ if ( ! state->theProperties.getNoError())
1790 throw;
1791 else
1792 {
1793@@ -298,11 +302,6 @@
1794 #endif
1795 // Ignore the schema validation options if Zorba is built without schema support
1796
1797- if (result != NULL && validated && parseOptions.enableWhitespaceStripping)
1798- {
1799- // TODO: whitespace stripping
1800- }
1801-
1802 STACK_PUSH(validated, state);
1803 } // if (result != NULL)
1804 } // if (state->theProperties.getEnableExtParsedEntity())
1805
1806=== modified file 'src/runtime/parsing_and_serializing/pregenerated/parse_fragment.cpp' (properties changed: +x to -x)
1807=== modified file 'src/runtime/parsing_and_serializing/pregenerated/parse_fragment.h' (properties changed: +x to -x)
1808--- src/runtime/parsing_and_serializing/pregenerated/parse_fragment.h 2011-10-19 15:28:51 +0000
1809+++ src/runtime/parsing_and_serializing/pregenerated/parse_fragment.h 2012-03-07 15:45:43 +0000
1810@@ -36,7 +36,7 @@
1811 namespace zorba {
1812
1813 /**
1814- * fn-zorba-xml:parse-xml-fragment
1815+ * fn-zorba-xml:parse
1816 * Author: Zorba Team
1817 */
1818 class FnParseXmlFragmentIteratorState : public PlanIteratorState
1819
1820=== modified file 'src/runtime/sequences/sequences_impl.cpp'
1821--- src/runtime/sequences/sequences_impl.cpp 2012-02-15 10:25:02 +0000
1822+++ src/runtime/sequences/sequences_impl.cpp 2012-03-07 15:45:43 +0000
1823@@ -464,13 +464,13 @@
1824 state->theIsChildReset = false;
1825
1826 CONSUME(startPosItem, 1);
1827- startPos =
1828+ startPos =
1829 static_cast<xs_long>(startPosItem->getDoubleValue().round().getNumber()) - 1;
1830
1831 if (theChildren.size() == 3)
1832 {
1833 CONSUME(lengthItem, 2);
1834- state->theRemaining =
1835+ state->theRemaining =
1836 static_cast<xs_long>(lengthItem->getDoubleValue().round().getNumber());
1837 }
1838
1839@@ -1033,7 +1033,7 @@
1840 }
1841
1842 bool FnDeepEqualIterator::nextImpl(
1843- store::Item_t& result,
1844+ store::Item_t& result,
1845 PlanState& planState) const
1846 {
1847 PlanIteratorState* state;
1848@@ -1061,7 +1061,7 @@
1849 break;
1850 }
1851
1852- if (arg1->isFunction() || arg2->isFunction())
1853+ if (arg1->isFunction() || arg2->isFunction())
1854 {
1855 throw XQUERY_EXCEPTION(
1856 err::FOTY0015,
1857@@ -1161,12 +1161,12 @@
1858 DEFAULT_STACK_INIT(PlanIteratorState, state, planState);
1859
1860
1861- for (;;)
1862+ for (;;)
1863 {
1864 // load items
1865- for (i = 0; i < 2; i++)
1866+ for (i = 0; i < 2; i++)
1867 {
1868- if (item [i] == NULL)
1869+ if (item [i] == NULL)
1870 {
1871 if (!CONSUME (item[i], i))
1872 {
1873@@ -1178,7 +1178,7 @@
1874
1875 // advance, output
1876 order = GENV_STORE.compareNodes(item[0].getp(), item[1].getp());
1877- if ( order == 0 )
1878+ if ( order == 0 )
1879 {
1880 result = item[0];
1881 STACK_PUSH (true, state);
1882@@ -1739,7 +1739,7 @@
1883 planState.theGlobalDynCtx->theDocLoadingUserTime +=
1884 zorbatm::get_cputime_elapsed(t0user, t1user);
1885
1886- planState.theGlobalDynCtx->theDocLoadingTime +=
1887+ planState.theGlobalDynCtx->theDocLoadingTime +=
1888 zorbatm::get_walltime_elapsed(t0, t1);
1889 }
1890
1891@@ -1833,7 +1833,7 @@
1892 // Prepare a LoadProperties for loading the stream into the store
1893 store::LoadProperties lLoadProperties;
1894 lLoadProperties.setStoreDocument(true);
1895- lLoadProperties.setEnableDtd( aSctx->is_feature_set( feature::dtd ) );
1896+ lLoadProperties.setDTDValidate( aSctx->is_feature_set( feature::dtd ) );
1897
1898 // Resolve URI to a stream
1899 zstring lErrorMessage;
1900
1901=== modified file 'src/runtime/spec/parsing_and_serializing/parse_fragment.xml'
1902--- src/runtime/spec/parsing_and_serializing/parse_fragment.xml 2011-07-15 16:39:51 +0000
1903+++ src/runtime/spec/parsing_and_serializing/parse_fragment.xml 2012-03-07 15:45:43 +0000
1904@@ -19,27 +19,20 @@
1905
1906 <!--
1907 /*******************************************************************************
1908- * 14.9.1 fn:parse-xml-fragment
1909+ * 14.9.1 parse-xml:parse
1910 ********************************************************************************/
1911 -->
1912 <zorba:iterator name="FnParseXmlFragmentIterator">
1913
1914- <zorba:description author="Zorba Team">fn-zorba-xml:parse-xml-fragment</zorba:description>
1915+ <zorba:description author="Zorba Team">fn-zorba-xml:parse</zorba:description>
1916
1917 <zorba:function>
1918- <zorba:signature localname="parse-xml-fragment" prefix="fn-zorba-xml">
1919- <zorba:param>xs:string?</zorba:param> <!-- string to parse -->
1920- <zorba:param>xs:string</zorba:param> <!-- parse-xml options -->
1921+ <zorba:signature localname="parse" prefix="fn-zorba-xml">
1922+ <zorba:param>xs:string?</zorba:param> <!-- string to parse -->
1923+ <zorba:param>element()?</zorba:param> <!-- parse() options -->
1924 <zorba:output>node()*</zorba:output>
1925 </zorba:signature>
1926
1927- <zorba:signature localname="parse-xml-fragment" prefix="fn-zorba-xml">
1928- <zorba:param>xs:string?</zorba:param> <!-- string to parse -->
1929- <zorba:param>xs:string</zorba:param> <!-- baseURI -->
1930- <zorba:param>xs:string</zorba:param> <!-- parse-xml options -->
1931- <zorba:output>node()*</zorba:output>
1932- </zorba:signature>
1933-
1934 <zorba:methods>
1935 <zorba:accessesDynCtx returnValue="true"/>
1936 </zorba:methods>
1937
1938=== modified file 'src/store/api/load_properties.h'
1939--- src/store/api/load_properties.h 2011-06-29 15:03:41 +0000
1940+++ src/store/api/load_properties.h 2012-03-07 15:45:43 +0000
1941@@ -35,12 +35,70 @@
1942 {
1943 private:
1944 bool theStoreDocument;
1945- bool theEnableDtdLoader;
1946- bool theEnableExtParsedEntityLoader;
1947+ zstring theBaseUri;
1948+ bool theNoError;
1949+ bool theStripWhitespace;
1950+ bool theSchemaLaxValidate;
1951+ bool theSchemaStrictValidate;
1952+ bool theDTDValidate;
1953+ bool theDTDLoad;
1954+ bool theDefaultDTDAttributes;
1955+ bool theParseExternalParsedEntity;
1956+ unsigned int theSkipRootNodes;
1957+ bool theSkipTopLevelTextNodes;
1958+ bool theSubstituteEntities;
1959+ bool theXincludeSubstitutions;
1960+ bool theRemoveRedundantNS;
1961+ bool theNoCDATA;
1962+ bool theNoXIncludeNodes;
1963
1964 public:
1965- LoadProperties() : theStoreDocument(true), theEnableDtdLoader(false), theEnableExtParsedEntityLoader(false) {}
1966- virtual ~LoadProperties() {}
1967+ LoadProperties()
1968+ :
1969+ theStoreDocument(true),
1970+ theBaseUri(""),
1971+ theNoError(false),
1972+ theStripWhitespace(false),
1973+ theSchemaLaxValidate(false),
1974+ theSchemaStrictValidate(false),
1975+ theDTDValidate(false),
1976+ theDTDLoad(false),
1977+ theDefaultDTDAttributes(false),
1978+ theParseExternalParsedEntity(false),
1979+ theSkipRootNodes(0),
1980+ theSkipTopLevelTextNodes(false),
1981+ theSubstituteEntities(false),
1982+ theXincludeSubstitutions(false),
1983+ theRemoveRedundantNS(false),
1984+ theNoCDATA(false),
1985+ theNoXIncludeNodes(false)
1986+ {
1987+ }
1988+
1989+ virtual ~LoadProperties()
1990+ {
1991+ }
1992+
1993+ void reset()
1994+ {
1995+ theStoreDocument = true;
1996+ theBaseUri = "";
1997+ theNoError = false;
1998+ theStripWhitespace = false;
1999+ theSchemaLaxValidate = false;
2000+ theSchemaStrictValidate = false;
2001+ theDTDValidate = false;
2002+ theDTDLoad = false;
2003+ theDefaultDTDAttributes = false;
2004+ theParseExternalParsedEntity = false;
2005+ theSkipRootNodes = 0;
2006+ theSkipTopLevelTextNodes = false;
2007+ theSubstituteEntities = false;
2008+ theXincludeSubstitutions = false;
2009+ theRemoveRedundantNS = false;
2010+ theNoCDATA = false;
2011+ theNoXIncludeNodes = false;
2012+ }
2013
2014 /**
2015 * Set the property storeDocument, it specifies whether the document
2016@@ -60,40 +118,168 @@
2017 return theStoreDocument;
2018 }
2019
2020- /**
2021- * Set the property enableDtd, it specifies whether the document's
2022- * dtd should be enabled when loading
2023- */
2024- void setEnableDtd(bool aEnableDtdLoader)
2025- {
2026- theEnableDtdLoader = aEnableDtdLoader;
2027- }
2028-
2029- /**
2030- * Get the property enableDtd, it specifies whether the document's
2031- * dtd should be enabled when loading
2032- */
2033- bool getEnableDtd() const
2034- {
2035- return theEnableDtdLoader;
2036- }
2037-
2038- /**
2039- * Set the property enableExtParsedEntity, it specifies whether the document
2040- * should be parsed as an enxternal general parsed entity
2041- */
2042- void setEnableExtParsedEntity(bool aEnableExtParsedEntityLoader)
2043- {
2044- theEnableExtParsedEntityLoader = aEnableExtParsedEntityLoader;
2045- }
2046-
2047- /**
2048- * Get the property enableDtd, it specifies whether the document
2049- * should be parsed as an enxternal general parsed entity
2050- */
2051- bool getEnableExtParsedEntity() const
2052- {
2053- return theEnableExtParsedEntityLoader;
2054+ // theBaseUri
2055+ void setBaseUri(const zstring& aBaseUri)
2056+ {
2057+ theBaseUri = aBaseUri;
2058+ }
2059+ zstring getBaseUri() const
2060+ {
2061+ return theBaseUri;
2062+ }
2063+
2064+ // theNoError
2065+ void setNoError(bool aNoError)
2066+ {
2067+ theNoError = aNoError;
2068+ }
2069+ bool getNoError() const
2070+ {
2071+ return theNoError;
2072+ }
2073+
2074+ // theStripWhitespace
2075+ void setStripWhitespace(bool aStripWhitespace)
2076+ {
2077+ theStripWhitespace = aStripWhitespace;
2078+ }
2079+ bool getStripWhitespace() const
2080+ {
2081+ return theStripWhitespace;
2082+ }
2083+
2084+ // theSchemaLaxValidate
2085+ void setSchemaLaxValidate(bool aSchemaLaxValidate)
2086+ {
2087+ theSchemaLaxValidate = aSchemaLaxValidate;
2088+ if (theSchemaLaxValidate)
2089+ theSchemaStrictValidate = false;
2090+ }
2091+ bool getSchemaLaxValidate() const
2092+ {
2093+ return theSchemaLaxValidate;
2094+ }
2095+
2096+ // theSchemaStrictValidate
2097+ void setSchemaStrictValidate(bool aSchemaStrictValidate)
2098+ {
2099+ theSchemaStrictValidate = aSchemaStrictValidate;
2100+ if (theSchemaStrictValidate)
2101+ theSchemaLaxValidate = false;
2102+ }
2103+ bool getSchemaStrictValidate() const
2104+ {
2105+ return theSchemaStrictValidate;
2106+ }
2107+
2108+ // theDTDValidate
2109+ void setDTDValidate(bool aDTDValidate)
2110+ {
2111+ theDTDValidate = aDTDValidate;
2112+ }
2113+ bool getDTDValidate() const
2114+ {
2115+ return theDTDValidate;
2116+ }
2117+
2118+ // theDTDLoad
2119+ void setDTDLoad(bool aDTDLoad)
2120+ {
2121+ theDTDLoad = aDTDLoad;
2122+ }
2123+ bool getDTDLoad() const
2124+ {
2125+ return theDTDLoad;
2126+ }
2127+
2128+ // theDefaultDTDAttributes
2129+ void setDefaultDTDAttributes(bool aDefaultDTDAttributes)
2130+ {
2131+ theDefaultDTDAttributes = aDefaultDTDAttributes;
2132+ }
2133+ bool getDefaultDTDAttributes() const
2134+ {
2135+ return theDefaultDTDAttributes;
2136+ }
2137+
2138+ // theParseExternalParsedEntity
2139+ void setParseExternalParsedEntity(bool aParseExternalParsedEntity)
2140+ {
2141+ theParseExternalParsedEntity = aParseExternalParsedEntity;
2142+ }
2143+ bool getParseExternalParsedEntity() const
2144+ {
2145+ return theParseExternalParsedEntity;
2146+ }
2147+
2148+ // theSkipRootNodes
2149+ void setSkipRootNodes(unsigned int aSkipRootNodes)
2150+ {
2151+ theSkipRootNodes = aSkipRootNodes;
2152+ }
2153+ unsigned int getSkipRootNodes() const
2154+ {
2155+ return theSkipRootNodes;
2156+ }
2157+
2158+ // theSkipTopLevelTextNodes
2159+ void setSkipTopLevelTextNodes(bool aSkipTopLevelTextNodes)
2160+ {
2161+ theSkipTopLevelTextNodes = aSkipTopLevelTextNodes;
2162+ }
2163+ bool getSkipTopLevelTextNodes() const
2164+ {
2165+ return theSkipTopLevelTextNodes;
2166+ }
2167+
2168+ // theSubstituteEntities
2169+ void setSubstituteEntities(bool aSubstituteEntities)
2170+ {
2171+ theSubstituteEntities = aSubstituteEntities;
2172+ }
2173+ bool getSubstituteEntities() const
2174+ {
2175+ return theSubstituteEntities;
2176+ }
2177+
2178+ // theXincludeSubstitutions
2179+ void setXincludeSubstitutions(bool aXincludeSubstitutions)
2180+ {
2181+ theXincludeSubstitutions = aXincludeSubstitutions;
2182+ }
2183+ bool getXincludeSubstitutions() const
2184+ {
2185+ return theXincludeSubstitutions;
2186+ }
2187+
2188+ // theRemoveRedundantNS
2189+ void setRemoveRedundantNS(bool aRemoveRedundantNS)
2190+ {
2191+ theRemoveRedundantNS = aRemoveRedundantNS;
2192+ }
2193+ bool getRemoveRedundantNS() const
2194+ {
2195+ return theRemoveRedundantNS;
2196+ }
2197+
2198+ // theNoCDATA
2199+ void setNoCDATA(bool aNoCDATA)
2200+ {
2201+ theNoCDATA = aNoCDATA;
2202+ }
2203+ bool getNoCDATA() const
2204+ {
2205+ return theNoCDATA;
2206+ }
2207+
2208+ // theNoXIncludeNodes
2209+ void setNoXIncludeNodes(bool aNoXIncludeNodes)
2210+ {
2211+ theNoXIncludeNodes = aNoXIncludeNodes;
2212+ }
2213+ bool getNoXIncludeNodes() const
2214+ {
2215+ return theNoXIncludeNodes;
2216 }
2217 };
2218
2219
2220=== modified file 'src/store/naive/loader.h'
2221--- src/store/naive/loader.h 2012-02-28 20:45:43 +0000
2222+++ src/store/naive/loader.h 2012-03-07 15:45:43 +0000
2223@@ -21,6 +21,7 @@
2224 #include <libxml/xmlstring.h>
2225
2226 #include "store/api/item.h"
2227+#include "store/api/load_properties.h"
2228
2229 #include "ordpath.h"
2230
2231@@ -74,6 +75,8 @@
2232 static const ulong INPUT_CHUNK_SIZE = 8192;
2233
2234 protected:
2235+ const store::LoadProperties & theLoadProperties;
2236+
2237 xmlParserCtxtPtr ctxt;
2238
2239 xmlSAXHandler theSaxHandler;
2240@@ -89,12 +92,19 @@
2241
2242 bool theBuildDataGuide;
2243
2244+
2245+protected:
2246+ void applyLoadOptions(const store::LoadProperties& props, xmlParserCtxtPtr ctxt);
2247+
2248+
2249 public:
2250 XmlLoader(
2251 BasicItemFactory* factory,
2252 XQueryDiagnostics* xqueryDiagnostics,
2253+ const store::LoadProperties& loadProperties,
2254 bool dataguide)
2255 :
2256+ theLoadProperties(loadProperties),
2257 ctxt(NULL),
2258 theFactory(factory),
2259 theXQueryDiagnostics(xqueryDiagnostics),
2260@@ -156,6 +166,7 @@
2261 FastXmlLoader(
2262 BasicItemFactory* factory,
2263 XQueryDiagnostics* xqueryDiagnostics,
2264+ const store::LoadProperties& loadProperties,
2265 bool dataguide);
2266
2267 ~FastXmlLoader();
2268@@ -245,6 +256,7 @@
2269 FragmentXmlLoader(
2270 BasicItemFactory* factory,
2271 XQueryDiagnostics* xqueryDiagnostics,
2272+ const store::LoadProperties& loadProperties,
2273 bool dataguide);
2274
2275 ~FragmentXmlLoader();
2276@@ -255,7 +267,15 @@
2277 std::istream& xmlStream);
2278
2279 protected:
2280- static void checkStopParsing(void* ctx);
2281+ bool fillBuffer(FragmentIStream* theFragmentStream);
2282+
2283+ unsigned long getCurrentInputOffset() const;
2284+
2285+ static void checkStopParsing(void* ctx, bool force = false);
2286+
2287+ static void startDocument(void * ctx);
2288+
2289+ static void endDocument(void * ctx);
2290
2291 static void startElement(
2292 void * ctx,
2293@@ -295,7 +315,6 @@
2294
2295 protected:
2296 FragmentIStream* theFragmentStream;
2297- int element_depth;
2298 };
2299
2300 /*******************************************************************************
2301@@ -331,8 +350,6 @@
2302 zorba::Stack<PathStepInfo> thePathStack;
2303 std::stack<NsBindingsContext*> theBindingsStack;
2304
2305- bool theParseExtParsedEntity;
2306-
2307 #ifdef DATAGUIDE
2308 zorba::Stack<ElementGuideNode*> theGuideStack;
2309 #endif
2310@@ -341,8 +358,8 @@
2311 DtdXmlLoader(
2312 BasicItemFactory* factory,
2313 XQueryDiagnostics* xqueryDiagnostics,
2314- bool dataguide,
2315- bool parseExtParsedEntity);
2316+ const store::LoadProperties& loadProperties,
2317+ bool dataguide);
2318
2319 ~DtdXmlLoader();
2320
2321
2322=== modified file 'src/store/naive/loader_dtd.cpp'
2323--- src/store/naive/loader_dtd.cpp 2012-02-15 10:25:02 +0000
2324+++ src/store/naive/loader_dtd.cpp 2012-03-07 15:45:43 +0000
2325@@ -76,12 +76,51 @@
2326 /*******************************************************************************
2327
2328 ********************************************************************************/
2329+void XmlLoader::applyLoadOptions(const store::LoadProperties& props, xmlParserCtxtPtr ctxt)
2330+{
2331+ int options = 0;
2332+
2333+ if (props.getStripWhitespace())
2334+ options |= XML_PARSE_NOBLANKS;
2335+
2336+ if (props.getDTDValidate())
2337+ options |= XML_PARSE_DTDVALID;
2338+
2339+ if (props.getDTDLoad())
2340+ options |= XML_PARSE_DTDLOAD;
2341+
2342+ if (props.getDefaultDTDAttributes())
2343+ options |= XML_PARSE_DTDATTR;
2344+
2345+ if (props.getSubstituteEntities())
2346+ options |= XML_PARSE_NOENT;
2347+
2348+ if (props.getXincludeSubstitutions())
2349+ options |= XML_PARSE_XINCLUDE;
2350+
2351+ if (props.getRemoveRedundantNS())
2352+ options |= XML_PARSE_NSCLEAN;
2353+
2354+ if (props.getNoCDATA())
2355+ options |= XML_PARSE_NOCDATA;
2356+
2357+ if (props.getNoXIncludeNodes())
2358+ options |= XML_PARSE_NOXINCNODE;
2359+
2360+ xmlCtxtUseOptions(ctxt, options);
2361+}
2362+
2363+
2364+/*******************************************************************************
2365+
2366+********************************************************************************/
2367 FragmentXmlLoader::FragmentXmlLoader(
2368 BasicItemFactory* factory,
2369 XQueryDiagnostics* xqueryDiagnostics,
2370+ const store::LoadProperties& loadProperties,
2371 bool dataguide)
2372 :
2373- FastXmlLoader(factory, xqueryDiagnostics, dataguide)
2374+ FastXmlLoader(factory, xqueryDiagnostics, loadProperties, dataguide)
2375 {
2376 theOrdPath.init();
2377
2378@@ -109,6 +148,39 @@
2379 {
2380 }
2381
2382+bool FragmentXmlLoader::fillBuffer(FragmentIStream* theFragmentStream)
2383+{
2384+ if (theFragmentStream->ctxt->input->length > 0 && theFragmentStream->current_offset < theFragmentStream->bytes_in_buffer)
2385+ {
2386+ memmove(theFragmentStream->theBuffer, theFragmentStream->theBuffer + theFragmentStream->current_offset,
2387+ theFragmentStream->bytes_in_buffer - theFragmentStream->current_offset);
2388+ }
2389+ theFragmentStream->bytes_in_buffer -= theFragmentStream->current_offset;
2390+
2391+ std::streamsize numChars = readPacket(*theFragmentStream->theStream, theFragmentStream->theBuffer + theFragmentStream->bytes_in_buffer,
2392+ FragmentIStream::BUFFER_SIZE+FragmentIStream::LOOKAHEAD_BYTES - theFragmentStream->bytes_in_buffer);
2393+ if (numChars < 0)
2394+ {
2395+ theXQueryDiagnostics->add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0020_LOADER_IO_ERROR));
2396+ throw 0; // the argument to throw is not used by the catch clause
2397+ }
2398+
2399+ if (theFragmentStream->theStream->eof())
2400+ theFragmentStream->reached_eof = true;
2401+
2402+ theFragmentStream->bytes_in_buffer += numChars;
2403+ theFragmentStream->current_offset = 0;
2404+ theFragmentStream->ctxt->input->base = (xmlChar*)(theFragmentStream->theBuffer);
2405+ theFragmentStream->ctxt->input->length = (theFragmentStream->bytes_in_buffer < FragmentIStream::BUFFER_SIZE? theFragmentStream->bytes_in_buffer : FragmentIStream::BUFFER_SIZE);
2406+ theFragmentStream->ctxt->input->cur = theFragmentStream->ctxt->input->base;
2407+ theFragmentStream->ctxt->input->end = theFragmentStream->ctxt->input->base + theFragmentStream->ctxt->input->length;
2408+ theFragmentStream->ctxt->checkIndex = 0;
2409+
2410+ if (theFragmentStream->bytes_in_buffer < FragmentIStream::BUFFER_SIZE+FragmentIStream::LOOKAHEAD_BYTES)
2411+ theFragmentStream->theBuffer[theFragmentStream->bytes_in_buffer] = 0;
2412+
2413+ return !theFragmentStream->stream_is_consumed();
2414+}
2415
2416 store::Item_t FragmentXmlLoader::loadXml(
2417 const zstring& baseUri,
2418@@ -138,88 +210,105 @@
2419 {
2420 theFragmentStream = static_cast<FragmentIStream*>(&stream);
2421
2422- // Prepare the input buffer
2423+ // Prepare the input buffer and the parser context
2424 if (theFragmentStream->theBuffer == NULL)
2425 {
2426- theFragmentStream->theStream->seekg(0, std::ios::end);
2427- std::streamoff fileSize = theFragmentStream->theStream->tellg();
2428- theFragmentStream->theStream->seekg(0, std::ios::beg);
2429-
2430- theFragmentStream->theBuffer = new char[static_cast<unsigned int>(fileSize+1)];
2431- theFragmentStream->theBuffer[fileSize] = 0;
2432-
2433- std::streamsize numChars = readPacket(*theFragmentStream->theStream,
2434- theFragmentStream->theBuffer,
2435- fileSize);
2436- theFragmentStream->buffer_size = numChars;
2437- if (numChars < 0)
2438- {
2439- theXQueryDiagnostics->
2440- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0020_LOADER_IO_ERROR));
2441-
2442- abortload();
2443- return NULL;
2444- }
2445- else if (numChars == 0)
2446- {
2447- theXQueryDiagnostics->
2448- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0020_LOADER_IO_ERROR,
2449- ERROR_PARAMS(ZED(NoInputData))));
2450-
2451- abortload();
2452- return NULL;
2453- }
2454- }
2455-
2456- // Create the LibXml parser context
2457- ctxt = xmlCreatePushParserCtxt(&theSaxHandler, this, NULL, 0, 0);
2458- // ctxt = xmlCreate
2459- if (ctxt == NULL)
2460- {
2461- theXQueryDiagnostics->
2462- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2463- ERROR_PARAMS(ZED(ParserInitFailed))));
2464-
2465- abortload();
2466- return NULL;
2467- }
2468-
2469- // Delete the initial empty input stream
2470- xmlFreeInputStream(inputPop(ctxt));
2471-
2472- // Create the LibXml parser input
2473- xmlParserInputPtr input = xmlNewInputStream(ctxt);
2474- if (input == NULL)
2475- {
2476- theXQueryDiagnostics->
2477- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2478- ERROR_PARAMS(ZED(ParserInitFailed))));
2479-
2480- abortload();
2481- return NULL;
2482- }
2483-
2484- // Initialize the parser input
2485- input->filename = (const char*)(xmlCanonicPath((const xmlChar*)theDocUri.c_str()));
2486- input->base = (xmlChar*)(theFragmentStream->theBuffer + theFragmentStream->current_offset);
2487- input->cur = (xmlChar*)(theFragmentStream->theBuffer + theFragmentStream->current_offset);
2488- input->length = theFragmentStream->buffer_size - theFragmentStream->current_offset;
2489- input->end = input->base + input->length;
2490- xmlPushInput(ctxt, input);
2491-
2492- // Reset element_depth
2493- element_depth = 0;
2494-
2495- // Finally call the parser
2496- if (xmlParseExtParsedEnt(ctxt)==-1)
2497- {
2498- theXQueryDiagnostics->
2499- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2500- ERROR_PARAMS(ZED(ParserNoCreateTree))));
2501-
2502- abortload();
2503- return NULL;
2504- }
2505+ // Allocate input buffer
2506+ theFragmentStream->theBuffer = new char[FragmentIStream::BUFFER_SIZE + FragmentIStream::LOOKAHEAD_BYTES+1];
2507+ theFragmentStream->theBuffer[FragmentIStream::BUFFER_SIZE + FragmentIStream::LOOKAHEAD_BYTES] = 0;
2508+
2509+ // Create the LibXml parser context
2510+ theFragmentStream->ctxt = xmlCreatePushParserCtxt(&theSaxHandler, this, NULL, 0, 0);
2511+ if (theFragmentStream->ctxt == NULL)
2512+ {
2513+ theXQueryDiagnostics->add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR, ERROR_PARAMS( ZED( ParserInitFailed ) )));
2514+ throw 0; // the argument to throw is not used by the catch clause
2515+ }
2516+
2517+ // Apply parser options
2518+ applyLoadOptions(theLoadProperties, theFragmentStream->ctxt);
2519+
2520+ // Delete the initial empty input stream
2521+ xmlFreeInputStream(inputPop(theFragmentStream->ctxt));
2522+
2523+ // Create the LibXml parser input
2524+ xmlParserInputPtr input = xmlNewInputStream(theFragmentStream->ctxt);
2525+ if (input == NULL)
2526+ {
2527+ theXQueryDiagnostics->add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR, ERROR_PARAMS( ZED( ParserInitFailed ) )));
2528+ throw 0; // the argument to throw is not used by the catch clause
2529+ }
2530+
2531+ // Initialize the parser input (only filename and the pointer to the current char)
2532+ theFragmentStream->theBuffer[0] = ' '; // This assignment is needed for LibXml2-2.7.6, which tries to read the buffer when xmlPushInput() is called
2533+ input->cur = (xmlChar*)(theFragmentStream->theBuffer);
2534+ input->filename = (const char*)(xmlCanonicPath((const xmlChar*)theDocUri.c_str()));
2535+ xmlPushInput(theFragmentStream->ctxt, input);
2536+ }
2537+
2538+ theFragmentStream->ctxt->userData = this; // the loader has changed, update the address
2539+ theFragmentStream->ctxt->disableSAX = false; // xmlStopParser() sets disableSAX to true
2540+ theFragmentStream->parsed_nodes_count = 0;
2541+ theFragmentStream->forced_parser_stop = false;
2542+
2543+ if ( ! theFragmentStream->first_start_doc)
2544+ {
2545+ theFragmentStream->ctxt->instate = XML_PARSER_CONTENT;
2546+ FragmentXmlLoader::startDocument(theFragmentStream->ctxt->userData);
2547+ }
2548+
2549+ while ( ! theFragmentStream->forced_parser_stop && fillBuffer(theFragmentStream))
2550+ {
2551+ // std::cerr << "\n==================\n--> skip_root: " << theFragmentStream->root_elements_to_skip << " current_depth: " << theFragmentStream->current_element_depth << " about to parse: [" << theFragmentStream->ctxt->input->cur << "] " << std::endl;
2552+
2553+ // This case needs to be handled here, otherwise LibXml2 will segfault
2554+ if (theFragmentStream->ctxt->input->cur[0] == '<' &&
2555+ theFragmentStream->ctxt->input->cur[1] == '/' &&
2556+ theFragmentStream->current_element_depth == 0)
2557+ {
2558+ theXQueryDiagnostics->add_error(theDocUri.empty() ?
2559+ NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR, ERROR_PARAMS( ZED( BadXMLNoOpeningTag ))) :
2560+ NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR, ERROR_PARAMS( ZED( BadXMLNoOpeningTag ), theDocUri))
2561+ );
2562+ throw 0; // the argument to throw is not used by the catch clause
2563+ }
2564+
2565+ xmlParseChunk(theFragmentStream->ctxt, (const char*)theFragmentStream->ctxt->input->cur,
2566+ theFragmentStream->ctxt->input->length, 0);
2567+
2568+ if (theFragmentStream->ctxt->input->base == (xmlChar*)(theFragmentStream->theBuffer)
2569+ &&
2570+ theFragmentStream->current_offset < getCurrentInputOffset())
2571+ theFragmentStream->current_offset = getCurrentInputOffset();
2572+
2573+ // If we didn't get an error and we haven't moved, we might have some freestanding text. Parse it as element character data.
2574+ if (theXQueryDiagnostics->errors().empty()
2575+ &&
2576+ theFragmentStream->current_offset == 0)
2577+ {
2578+ // The input has been reset by xmlStopParser()
2579+ theFragmentStream->ctxt->input->base = (xmlChar*)(theFragmentStream->theBuffer);
2580+ theFragmentStream->ctxt->input->cur = theFragmentStream->ctxt->input->base;
2581+ xmlParseCharData(theFragmentStream->ctxt, 0);
2582+ }
2583+
2584+ if ( ! theXQueryDiagnostics->errors().empty())
2585+ throw 0; // the argument to throw is not used by the catch clause
2586+ }
2587+
2588+ // this happens when there are tags that have not been closed
2589+ if (theFragmentStream->stream_is_consumed()
2590+ &&
2591+ theFragmentStream->current_element_depth > 0)
2592+ {
2593+ theXQueryDiagnostics->add_error(theDocUri.empty() ?
2594+ NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR, ERROR_PARAMS( ZED( BadXMLDocument_2o ))) :
2595+ NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR, ERROR_PARAMS( ZED( BadXMLDocument_2o ), theDocUri))
2596+ );
2597+ throw 0;
2598+ }
2599+
2600+ FragmentXmlLoader::endDocument(theFragmentStream->ctxt->userData); // this would not be called otherwise
2601 }
2602 catch (...)
2603 {
2604@@ -228,49 +317,36 @@
2605 return NULL;
2606 }
2607
2608- bool ok = ctxt->wellFormed != 0;
2609-
2610 // The doc may be well formed, but it may have other kinds of errors, e.g., unresolved ns prefixes.
2611 if (!theXQueryDiagnostics->errors().empty())
2612 {
2613 abortload();
2614 return NULL;
2615 }
2616- else if (!ok )
2617+ else if ( ! theFragmentStream->ctxt->wellFormed)
2618 {
2619- if (!theDocUri.empty())
2620- {
2621- theXQueryDiagnostics->
2622- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2623- ERROR_PARAMS(ZED(BadXMLDocument_2o), theDocUri)));
2624- }
2625- else
2626- {
2627- theXQueryDiagnostics->
2628- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2629- ERROR_PARAMS(ZED(BadXMLDocument_2o))));
2630- }
2631+ theXQueryDiagnostics->add_error(theDocUri.empty() ?
2632+ NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR, ERROR_PARAMS( ZED( BadXMLDocument_2o ))) :
2633+ NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR, ERROR_PARAMS( ZED( BadXMLDocument_2o ), theDocUri))
2634+ );
2635 abortload();
2636 return NULL;
2637 }
2638- else if ( ctxt->lastError.code != XML_ERR_OK )
2639+ else if (theFragmentStream->ctxt->lastError.code != XML_ERR_OK)
2640 {
2641- if ( ctxt->lastError.code == XML_NS_ERR_UNDEFINED_NAMESPACE ||
2642- ctxt->lastError.code != XML_ERR_NO_DTD )
2643+ if (theFragmentStream->ctxt->lastError.code == XML_NS_ERR_UNDEFINED_NAMESPACE
2644+ ||
2645+ theFragmentStream->ctxt->lastError.code != XML_ERR_NO_DTD )
2646 {
2647- theXQueryDiagnostics->
2648- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2649- ERROR_PARAMS(ZED(BadXMLDocument_2o))));
2650-
2651+ theXQueryDiagnostics->add_error(theDocUri.empty() ?
2652+ NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR, ERROR_PARAMS( ZED( BadXMLDocument_2o ))) :
2653+ NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR, ERROR_PARAMS( ZED( BadXMLDocument_2o ), theDocUri))
2654+ );
2655 abortload();
2656 return NULL;
2657 }
2658 }
2659
2660- xmlCtxtReset(ctxt);
2661- xmlFreeParserCtxt(ctxt);
2662- ctxt = NULL;
2663-
2664 thePathStack.pop();
2665 assert(thePathStack.empty());
2666
2667@@ -280,23 +356,59 @@
2668 return resultNode;
2669 }
2670
2671-
2672-void FragmentXmlLoader::checkStopParsing(void* ctx)
2673-{
2674- FragmentXmlLoader& loader = *(static_cast<FragmentXmlLoader*>(ctx));
2675- ZORBA_LOADER_CHECK_ERROR(loader);
2676-
2677- if (loader.element_depth == 0)
2678- {
2679- /* if (loader.ctxt->inputNr <= 1)
2680- loader.theFragmentStream->current_offset = loader.theFragmentStream->buffer_size;
2681- else */
2682- loader.theFragmentStream->current_offset += (loader.ctxt->input->cur - loader.ctxt->input->base)
2683- + loader.ctxt->input->consumed;
2684- xmlStopParser(loader.ctxt);
2685- }
2686-}
2687-
2688+unsigned long FragmentXmlLoader::getCurrentInputOffset() const
2689+{
2690+ unsigned long offset = theFragmentStream->ctxt->input->cur
2691+ - theFragmentStream->ctxt->input->base
2692+ + theFragmentStream->ctxt->input->consumed;
2693+
2694+ return offset;
2695+}
2696+
2697+void FragmentXmlLoader::checkStopParsing(void* ctx, bool force)
2698+{
2699+ FragmentXmlLoader& loader = *(static_cast<FragmentXmlLoader*>(ctx));
2700+ ZORBA_LOADER_CHECK_ERROR(loader);
2701+
2702+ unsigned long offset = loader.getCurrentInputOffset();
2703+
2704+ if (force
2705+ ||
2706+ loader.theFragmentStream->current_element_depth == 0
2707+ ||
2708+ (offset >= loader.theFragmentStream->bytes_in_buffer
2709+ &&
2710+ loader.theFragmentStream->reached_eof)
2711+ ||
2712+ (loader.theFragmentStream->current_element_depth <= loader.theFragmentStream->root_elements_to_skip
2713+ &&
2714+ loader.theFragmentStream->parsed_nodes_count >= FragmentIStream::PARSED_NODES_BATCH_SIZE))
2715+ {
2716+ loader.theFragmentStream->current_offset = offset;
2717+ xmlStopParser(loader.theFragmentStream->ctxt);
2718+ loader.theFragmentStream->ctxt->errNo = XML_SCHEMAV_MISC; // fake error to force stopping
2719+ loader.theFragmentStream->forced_parser_stop = true;
2720+ }
2721+
2722+ loader.theFragmentStream->parsed_nodes_count++;
2723+}
2724+
2725+void FragmentXmlLoader::startDocument(void * ctx)
2726+{
2727+ FragmentXmlLoader& loader = *(static_cast<FragmentXmlLoader*>(ctx));
2728+ ZORBA_LOADER_CHECK_ERROR(loader);
2729+ FastXmlLoader::startDocument(ctx);
2730+ if (loader.theFragmentStream->first_start_doc)
2731+ {
2732+ loader.theFragmentStream->first_start_doc = false;
2733+ FragmentXmlLoader::checkStopParsing(ctx, true);
2734+ }
2735+}
2736+
2737+void FragmentXmlLoader::endDocument(void * ctx)
2738+{
2739+ FastXmlLoader::endDocument(ctx);
2740+}
2741
2742 void FragmentXmlLoader::startElement(
2743 void * ctx,
2744@@ -309,27 +421,34 @@
2745 int nb_defaulted,
2746 const xmlChar ** attributes)
2747 {
2748- FastXmlLoader::startElement(ctx, localname, prefix, URI, nb_namespaces, namespaces, nb_attributes, nb_defaulted, attributes);
2749-
2750 FragmentXmlLoader& loader = *(static_cast<FragmentXmlLoader*>(ctx));
2751 ZORBA_LOADER_CHECK_ERROR(loader);
2752- loader.element_depth++;
2753+ loader.theFragmentStream->current_element_depth++;
2754+ if (loader.theFragmentStream->current_element_depth > loader.theFragmentStream->root_elements_to_skip)
2755+ {
2756+ const xmlChar** nsTab = namespaces;
2757+
2758+ if (loader.theFragmentStream->current_element_depth == loader.theFragmentStream->root_elements_to_skip + 1)
2759+ {
2760+ nsTab = loader.theFragmentStream->ctxt->nsTab;
2761+ nb_namespaces = loader.theFragmentStream->ctxt->nsNr/2;
2762+ }
2763+
2764+ FastXmlLoader::startElement(ctx, localname, prefix, URI, nb_namespaces, nsTab, nb_attributes, nb_defaulted, attributes);
2765+ }
2766 }
2767
2768-
2769 void FragmentXmlLoader::endElement(
2770 void * ctx,
2771 const xmlChar * localname,
2772 const xmlChar * prefix,
2773 const xmlChar * URI)
2774 {
2775- FastXmlLoader::endElement(ctx, localname, prefix, URI);
2776-
2777 FragmentXmlLoader& loader = *(static_cast<FragmentXmlLoader*>(ctx));
2778 ZORBA_LOADER_CHECK_ERROR(loader);
2779-
2780- loader.element_depth--;
2781-
2782+ if (loader.theFragmentStream->current_element_depth > loader.theFragmentStream->root_elements_to_skip)
2783+ FastXmlLoader::endElement(ctx, localname, prefix, URI);
2784+ loader.theFragmentStream->current_element_depth--;
2785 checkStopParsing(ctx);
2786 }
2787
2788@@ -338,7 +457,10 @@
2789 const xmlChar * ch,
2790 int len)
2791 {
2792- FastXmlLoader::characters(ctx, ch, len);
2793+ FragmentXmlLoader& loader = *(static_cast<FragmentXmlLoader*>(ctx));
2794+ ZORBA_LOADER_CHECK_ERROR(loader);
2795+ if (loader.theFragmentStream->current_element_depth >= loader.theFragmentStream->root_elements_to_skip)
2796+ FastXmlLoader::characters(ctx, ch, len);
2797 checkStopParsing(ctx);
2798 }
2799
2800@@ -347,7 +469,10 @@
2801 void * ctx,
2802 const xmlChar * value)
2803 {
2804- FastXmlLoader::comment(ctx, value);
2805+ FragmentXmlLoader& loader = *(static_cast<FragmentXmlLoader*>(ctx));
2806+ ZORBA_LOADER_CHECK_ERROR(loader);
2807+ if (loader.theFragmentStream->current_element_depth >= loader.theFragmentStream->root_elements_to_skip)
2808+ FastXmlLoader::comment(ctx, value);
2809 checkStopParsing(ctx);
2810 }
2811
2812@@ -357,7 +482,10 @@
2813 const xmlChar * value,
2814 int len)
2815 {
2816- FastXmlLoader::cdataBlock(ctx, value, len);
2817+ FragmentXmlLoader& loader = *(static_cast<FragmentXmlLoader*>(ctx));
2818+ ZORBA_LOADER_CHECK_ERROR(loader);
2819+ if (loader.theFragmentStream->current_element_depth >= loader.theFragmentStream->root_elements_to_skip)
2820+ FastXmlLoader::cdataBlock(ctx, value, len);
2821 checkStopParsing(ctx);
2822 }
2823
2824@@ -367,7 +495,10 @@
2825 const xmlChar * target,
2826 const xmlChar * data)
2827 {
2828- FastXmlLoader::processingInstruction(ctx, target, data);
2829+ FragmentXmlLoader& loader = *(static_cast<FragmentXmlLoader*>(ctx));
2830+ ZORBA_LOADER_CHECK_ERROR(loader);
2831+ if (loader.theFragmentStream->current_element_depth >= loader.theFragmentStream->root_elements_to_skip)
2832+ FastXmlLoader::processingInstruction(ctx, target, data);
2833 checkStopParsing(ctx);
2834 }
2835
2836@@ -378,14 +509,13 @@
2837 DtdXmlLoader::DtdXmlLoader(
2838 BasicItemFactory* factory,
2839 XQueryDiagnostics* xqueryDiagnostics,
2840- bool dataguide,
2841- bool parseExtParsedEntity)
2842+ const store::LoadProperties& loadProperties,
2843+ bool dataguide)
2844 :
2845- XmlLoader(factory, xqueryDiagnostics, dataguide),
2846+ XmlLoader(factory, xqueryDiagnostics, loadProperties, dataguide),
2847 theTree(NULL),
2848 theRootNode(NULL),
2849- theNodeStack(2048),
2850- theParseExtParsedEntity(parseExtParsedEntity)
2851+ theNodeStack(2048)
2852 {
2853 theOrdPath.init();
2854
2855@@ -511,10 +641,7 @@
2856 Return the number of bytes actually read, throw an exception if any I/O
2857 error occured.
2858 ********************************************************************************/
2859-std::streamsize DtdXmlLoader::readPacket(
2860- std::istream& stream,
2861- char* buf,
2862- std::streamoff size)
2863+std::streamsize DtdXmlLoader::readPacket(std::istream& stream, char* buf, std::streamoff size)
2864 {
2865 try
2866 {
2867@@ -626,23 +753,26 @@
2868 }
2869
2870 // Set the LibXml DTD validation options
2871+ /*
2872 int options = XML_PARSE_COMPACT;
2873 options |= XML_PARSE_DTDVALID;
2874 options |= XML_PARSE_DTDLOAD;
2875+ */
2876 //options |= XML_PARSE_SAX1;
2877 //xmlSAXDefaultVersion(1);
2878
2879+ // xmlCtxtUseOptions(ctxt, options);
2880+
2881 xmlLoadExtDtdDefaultValue |= XML_DETECT_IDS;
2882 xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS;
2883
2884- xmlCtxtUseOptions(ctxt, options);
2885+ // Apply loader options
2886+ applyLoadOptions(theLoadProperties, ctxt);
2887
2888 if ( xmlParseDocument(ctxt)==-1 )
2889 {
2890 // std::cout << " xmlParseDocument: Error: Unable to create tree: " << ctxt->lastError.message << std::endl;
2891- theXQueryDiagnostics->
2892- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2893- ERROR_PARAMS(ZED(ParserNoCreateTree))));
2894+ theXQueryDiagnostics->add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,ERROR_PARAMS( ZED( ParserNoCreateTree ) )));
2895 abortload();
2896 return NULL;
2897 }
2898@@ -667,15 +797,21 @@
2899 {
2900 if (!theDocUri.empty())
2901 {
2902- theXQueryDiagnostics->
2903- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2904- ERROR_PARAMS(ZED(BadXMLDocument_2o), theDocUri)));
2905+ theXQueryDiagnostics->add_error(
2906+ NEW_ZORBA_EXCEPTION(
2907+ zerr::ZSTR0021_LOADER_PARSING_ERROR,
2908+ ERROR_PARAMS( ZED( BadXMLDocument_2o ), theDocUri )
2909+ )
2910+ );
2911 }
2912 else
2913 {
2914- theXQueryDiagnostics->
2915- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2916- ERROR_PARAMS(ZED(BadXMLDocument_2o))));
2917+ theXQueryDiagnostics->add_error(
2918+ NEW_ZORBA_EXCEPTION(
2919+ zerr::ZSTR0021_LOADER_PARSING_ERROR,
2920+ ERROR_PARAMS( ZED( BadXMLDocument_2o ) )
2921+ )
2922+ );
2923 }
2924
2925 abortload();
2926@@ -691,9 +827,12 @@
2927 if ( ctxt->lastError.code == XML_NS_ERR_UNDEFINED_NAMESPACE ||
2928 ctxt->lastError.code != XML_ERR_NO_DTD )
2929 {
2930- theXQueryDiagnostics->
2931- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2932- ERROR_PARAMS(ZED(BadXMLDocument_2o))));
2933+ theXQueryDiagnostics->add_error(
2934+ NEW_ZORBA_EXCEPTION(
2935+ zerr::ZSTR0021_LOADER_PARSING_ERROR,
2936+ ERROR_PARAMS( ZED( BadXMLDocument_2o ) )
2937+ )
2938+ );
2939 abortload();
2940 return NULL;
2941
2942@@ -704,10 +843,12 @@
2943 xmlDoc *doc = ctxt->myDoc;
2944 if (doc == NULL)
2945 {
2946- theXQueryDiagnostics->
2947- add_error(NEW_ZORBA_EXCEPTION(zerr::ZSTR0021_LOADER_PARSING_ERROR,
2948- ERROR_PARAMS(ZED(ParserNoCreateTree))));
2949-
2950+ theXQueryDiagnostics->add_error(
2951+ NEW_ZORBA_EXCEPTION(
2952+ zerr::ZSTR0021_LOADER_PARSING_ERROR,
2953+ ERROR_PARAMS( ZED( ParserNoCreateTree ) )
2954+ )
2955+ );
2956 abortload();
2957 return NULL;
2958 }
2959@@ -859,8 +1000,9 @@
2960 }
2961 catch (...)
2962 {
2963- loader.theXQueryDiagnostics->
2964- add_error(NEW_ZORBA_EXCEPTION(zerr::ZXQP0003_INTERNAL_ERROR));
2965+ loader.theXQueryDiagnostics->add_error(
2966+ NEW_ZORBA_EXCEPTION( zerr::ZXQP0003_INTERNAL_ERROR )
2967+ );
2968 }
2969 }
2970
2971
2972=== modified file 'src/store/naive/loader_fast.cpp'
2973--- src/store/naive/loader_fast.cpp 2012-02-15 10:25:02 +0000
2974+++ src/store/naive/loader_fast.cpp 2012-03-07 15:45:43 +0000
2975@@ -76,9 +76,10 @@
2976 FastXmlLoader::FastXmlLoader(
2977 BasicItemFactory* factory,
2978 XQueryDiagnostics* xqueryDiagnostics,
2979+ const store::LoadProperties& loadProperties,
2980 bool dataguide)
2981 :
2982- XmlLoader(factory, xqueryDiagnostics, dataguide),
2983+ XmlLoader(factory, xqueryDiagnostics, loadProperties, dataguide),
2984 theTree(NULL),
2985 theRootNode(NULL),
2986 theNodeStack(2048)
2987@@ -298,6 +299,13 @@
2988 static_cast<int>(numChars),
2989 docUri.c_str());
2990
2991+ // Apply loader options
2992+ store::LoadProperties new_props = theLoadProperties;
2993+ new_props.setSubstituteEntities(true); // This is required for some Zorba tests,
2994+ // e.g. rbkt/Queries/zorba/entity/entity.xq
2995+ // It should probably be handled in a different way
2996+ applyLoadOptions(new_props, ctxt);
2997+
2998 if (ctxt == NULL)
2999 {
3000 theXQueryDiagnostics->
3001
3002=== modified file 'src/store/naive/simple_store.cpp'
3003--- src/store/naive/simple_store.cpp 2012-02-28 20:45:43 +0000
3004+++ src/store/naive/simple_store.cpp 2012-03-07 15:45:43 +0000
3005@@ -354,7 +354,7 @@
3006 std::cerr << "Reference: " << (*iter).second
3007 << "is still in the nodes to references map" << std::endl;
3008 }
3009- ZORBA_FATAL(0, theNodeToReferencesMap.size() +
3010+ ZORBA_FATAL(0, theNodeToReferencesMap.size() +
3011 " node references still in the nodes to references map");
3012 }
3013
3014@@ -364,7 +364,7 @@
3015 RefNodeMap::iterator end = theReferencesToNodeMap.end();
3016 for (; iter != end; ++iter)
3017 {
3018- std::cerr << "Reference: " << (*iter).first
3019+ std::cerr << "Reference: " << (*iter).first
3020 << "is still in the references to nodes map" << std::endl;
3021 }
3022 ZORBA_FATAL(0, theReferencesToNodeMap.size() +
3023@@ -490,18 +490,20 @@
3024 XmlLoader* SimpleStore::getXmlLoader(XQueryDiagnostics* aXQueryDiagnostics,
3025 const store::LoadProperties& loadProperties)
3026 {
3027- if (loadProperties.getEnableExtParsedEntity())
3028+ if (loadProperties.getParseExternalParsedEntity())
3029 return new FragmentXmlLoader(theItemFactory,
3030 aXQueryDiagnostics,
3031+ loadProperties,
3032 store::Properties::instance()->buildDataguide());
3033- else if (loadProperties.getEnableDtd())
3034+ else if (loadProperties.getDTDValidate())
3035 return new DtdXmlLoader(theItemFactory,
3036 aXQueryDiagnostics,
3037- store::Properties::instance()->buildDataguide(),
3038- loadProperties.getEnableExtParsedEntity());
3039+ loadProperties,
3040+ store::Properties::instance()->buildDataguide());
3041 else
3042 return new FastXmlLoader(theItemFactory,
3043 aXQueryDiagnostics,
3044+ loadProperties,
3045 store::Properties::instance()->buildDataguide());
3046 }
3047
3048@@ -987,7 +989,7 @@
3049 return NULL;
3050
3051 store::Collection_t collection;
3052- if (theCollections->get(aName, collection, aDynamicCollection))
3053+ if (theCollections->get(aName, collection, aDynamicCollection))
3054 {
3055 return collection;
3056 }
3057@@ -1315,7 +1317,7 @@
3058 Computes the Structural Reference for the given node.
3059 ********************************************************************************/
3060 bool SimpleStore::getStructuralInformation(
3061- store::Item_t& result,
3062+ store::Item_t& result,
3063 const store::Item* node)
3064 {
3065 #ifdef TEXT_ORDPATH
3066@@ -1355,7 +1357,7 @@
3067
3068 /*******************************************************************************
3069 Computes the reference of the given node.
3070-
3071+
3072 @param node XDM node
3073 @return the identifier as an item of type xs:anyURI
3074 ********************************************************************************/
3075@@ -1388,7 +1390,7 @@
3076
3077 /*******************************************************************************
3078 Returns the node which is identified by the given reference.
3079-
3080+
3081 @param reference an xs:anyURI item
3082 @result the node identified by the reference, or NULL if no node with the given
3083 reference exists
3084@@ -1417,7 +1419,7 @@
3085
3086 /*******************************************************************************
3087 Returns whether a reference has already been generated for the given node.
3088-
3089+
3090 @param item XDM node
3091 @return whether a reference has already been generated for the given node.
3092 ********************************************************************************/
3093@@ -1429,7 +1431,7 @@
3094
3095 /*******************************************************************************
3096 Removes a node from the reference-to-nodes and nodes-to-references maps.
3097-
3098+
3099 @param node XDM node
3100 @return whether the node was registered or not.
3101 ********************************************************************************/
3102
3103=== modified file 'src/types/typeimpl.cpp'
3104--- src/types/typeimpl.cpp 2012-01-10 10:52:15 +0000
3105+++ src/types/typeimpl.cpp 2012-03-07 15:45:43 +0000
3106@@ -361,7 +361,7 @@
3107
3108
3109 bool NodeXQType::is_subtype(
3110- const TypeManager* tm,
3111+ const TypeManager* tm,
3112 const NodeXQType& supertype,
3113 const QueryLoc& loc) const
3114 {
3115@@ -443,7 +443,7 @@
3116
3117
3118 bool NodeXQType::is_supertype(
3119- const TypeManager* tm,
3120+ const TypeManager* tm,
3121 const store::Item* subitem,
3122 const QueryLoc& loc) const
3123 {
3124@@ -488,14 +488,30 @@
3125 }
3126 }
3127
3128- if (m_node_kind != store::StoreConsts::elementNode &&
3129- m_node_kind != store::StoreConsts::attributeNode)
3130+ // document-node( E ) matches any document node that contains exactly one element
3131+ // node, optionally accompanied by one or more comment and processing instruction
3132+ // nodes, if E is an ElementTest or SchemaElementTest that matches the element node.
3133+ bool is_element_test = (
3134+ m_node_kind == store::StoreConsts::documentNode &&
3135+ m_content_type != NULL &&
3136+ m_content_type->type_kind() == XQType::NODE_TYPE_KIND &&
3137+ dynamic_cast<const NodeXQType*>(m_content_type.getp())->m_schema_test == false);
3138+
3139+ if (m_node_kind != store::StoreConsts::elementNode &&
3140+ m_node_kind != store::StoreConsts::attributeNode &&
3141+ !is_element_test)
3142 return true;
3143
3144 if (m_content_type == NULL ||
3145 m_content_type->type_kind() == XQType::ANY_TYPE_KIND)
3146 return true;
3147
3148+ if (is_element_test)
3149+ {
3150+ xqtref_t documentNodeType = tm->create_value_type(subitem, loc);
3151+ return TypeOps::is_subtype(tm, *documentNodeType, *this);
3152+ }
3153+
3154 xqtref_t subContentType = tm->create_named_type(subitem->getType(),
3155 TypeConstants::QUANT_ONE,
3156 loc,
3157
3158=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-01.xml.res'
3159--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-01.xml.res 1970-01-01 00:00:00 +0000
3160+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-01.xml.res 2012-03-07 15:45:43 +0000
3161@@ -0,0 +1,2 @@
3162+<?xml version="1.0" encoding="UTF-8"?>
3163+<from1>Jani</from1>
3164\ No newline at end of file
3165
3166=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-02.xml.res'
3167--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-02.xml.res 1970-01-01 00:00:00 +0000
3168+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-02.xml.res 2012-03-07 15:45:43 +0000
3169@@ -0,0 +1,6 @@
3170+<?xml version="1.0" encoding="UTF-8"?>
3171+
3172+ <from1>Jani1</from1>
3173+ <from2>Jani2</from2>
3174+ <from3>Jani3</from3>
3175+
3176
3177=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-03.xml.res'
3178--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-03.xml.res 1970-01-01 00:00:00 +0000
3179+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-03.xml.res 2012-03-07 15:45:43 +0000
3180@@ -0,0 +1,2 @@
3181+<?xml version="1.0" encoding="UTF-8"?>
3182+Jani1Jani2Jani3
3183
3184=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-04.xml.res'
3185--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-04.xml.res 1970-01-01 00:00:00 +0000
3186+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-04.xml.res 2012-03-07 15:45:43 +0000
3187@@ -0,0 +1,12 @@
3188+<?xml version="1.0" encoding="UTF-8"?>
3189+<root>
3190+ <root2>
3191+ <from1>Jani1</from1>
3192+ </root2>
3193+ <root2>
3194+ <from2>Jani2</from2>
3195+ </root2>
3196+ <root2>
3197+ <from3>Jani3</from3>
3198+ </root2>
3199+</root>
3200
3201=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-05.xml.res'
3202--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-05.xml.res 1970-01-01 00:00:00 +0000
3203+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-05.xml.res 2012-03-07 15:45:43 +0000
3204@@ -0,0 +1,12 @@
3205+<?xml version="1.0" encoding="UTF-8"?>
3206+
3207+ <root2>
3208+ <from1>Jani1</from1>
3209+ </root2>
3210+ <root2>
3211+ <from2>Jani2</from2>
3212+ </root2>
3213+ <root2>
3214+ <from3>Jani3</from3>
3215+ </root2>
3216+
3217
3218=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-06.xml.res'
3219--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-06.xml.res 1970-01-01 00:00:00 +0000
3220+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-06.xml.res 2012-03-07 15:45:43 +0000
3221@@ -0,0 +1,8 @@
3222+<?xml version="1.0" encoding="UTF-8"?>
3223+
3224+ <from1>Jani1</from1>
3225+
3226+ <from2>Jani2</from2>
3227+
3228+ <from3>Jani3</from3>
3229+
3230
3231=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-07.xml.res'
3232--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-07.xml.res 1970-01-01 00:00:00 +0000
3233+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-07.xml.res 2012-03-07 15:45:43 +0000
3234@@ -0,0 +1,2 @@
3235+<?xml version="1.0" encoding="UTF-8"?>
3236+Jani1Jani2Jani3
3237
3238=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-08.xml.res'
3239--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-08.xml.res 1970-01-01 00:00:00 +0000
3240+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-08.xml.res 2012-03-07 15:45:43 +0000
3241@@ -0,0 +1,2 @@
3242+<?xml version="1.0" encoding="UTF-8"?>
3243+<root><from1>Jani1</from1></root>
3244
3245=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-09.xml.res'
3246--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-09.xml.res 1970-01-01 00:00:00 +0000
3247+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-09.xml.res 2012-03-07 15:45:43 +0000
3248@@ -0,0 +1,2 @@
3249+<?xml version="1.0" encoding="UTF-8"?>
3250+<from1>Jani1</from1>
3251
3252=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-10.xml.res'
3253--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-10.xml.res 1970-01-01 00:00:00 +0000
3254+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-10.xml.res 2012-03-07 15:45:43 +0000
3255@@ -0,0 +1,2 @@
3256+<?xml version="1.0" encoding="UTF-8"?>
3257+Jani1
3258
3259=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-11.xml.res'
3260--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-11.xml.res 1970-01-01 00:00:00 +0000
3261+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-11.xml.res 2012-03-07 15:45:43 +0000
3262@@ -0,0 +1,2 @@
3263+<?xml version="1.0" encoding="UTF-8"?>
3264+
3265
3266=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-12.xml.res'
3267--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-12.xml.res 1970-01-01 00:00:00 +0000
3268+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-12.xml.res 2012-03-07 15:45:43 +0000
3269@@ -0,0 +1,2 @@
3270+<?xml version="1.0" encoding="UTF-8"?>
3271+Jani1
3272
3273=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-13.xml.res'
3274--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-13.xml.res 1970-01-01 00:00:00 +0000
3275+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-13.xml.res 2012-03-07 15:45:43 +0000
3276@@ -0,0 +1,2 @@
3277+<?xml version="1.0" encoding="UTF-8"?>
3278+<from1>Jani1</from1>
3279
3280=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-14.xml.res'
3281--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-14.xml.res 1970-01-01 00:00:00 +0000
3282+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-14.xml.res 2012-03-07 15:45:43 +0000
3283@@ -0,0 +1,2 @@
3284+<?xml version="1.0" encoding="UTF-8"?>
3285+Jani1
3286
3287=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-15.xml.res'
3288--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-15.xml.res 1970-01-01 00:00:00 +0000
3289+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-15.xml.res 2012-03-07 15:45:43 +0000
3290@@ -0,0 +1,2 @@
3291+<?xml version="1.0" encoding="UTF-8"?>
3292+Jani1
3293
3294=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-16.xml.res'
3295--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-16.xml.res 1970-01-01 00:00:00 +0000
3296+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-16.xml.res 2012-03-07 15:45:43 +0000
3297@@ -0,0 +1,2 @@
3298+<?xml version="1.0" encoding="UTF-8"?>
3299+Jani1
3300
3301=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-17.xml.res'
3302--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-17.xml.res 1970-01-01 00:00:00 +0000
3303+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-17.xml.res 2012-03-07 15:45:43 +0000
3304@@ -0,0 +1,2 @@
3305+<?xml version="1.0" encoding="UTF-8"?>
3306+root3 text<from1>Jani1</from1>
3307
3308=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-18.xml.res'
3309--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-18.xml.res 1970-01-01 00:00:00 +0000
3310+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-18.xml.res 2012-03-07 15:45:43 +0000
3311@@ -0,0 +1,2 @@
3312+<?xml version="1.0" encoding="UTF-8"?>
3313+Jani1
3314
3315=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-19.xml.res'
3316--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-19.xml.res 1970-01-01 00:00:00 +0000
3317+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-19.xml.res 2012-03-07 15:45:43 +0000
3318@@ -0,0 +1,8 @@
3319+<?xml version="1.0" encoding="UTF-8"?>
3320+<level1>
3321+ <level2>
3322+ <level3>
3323+ <level4>level4 text</level4>
3324+ </level3>
3325+ </level2>
3326+</level1>
3327
3328=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-20.xml.res'
3329--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-20.xml.res 1970-01-01 00:00:00 +0000
3330+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-20.xml.res 2012-03-07 15:45:43 +0000
3331@@ -0,0 +1,8 @@
3332+<?xml version="1.0" encoding="UTF-8"?>
3333+
3334+ <level2>
3335+ <level3>
3336+ <level4>level4 text</level4>
3337+ </level3>
3338+ </level2>
3339+
3340
3341=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-21.xml.res'
3342--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-21.xml.res 1970-01-01 00:00:00 +0000
3343+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-21.xml.res 2012-03-07 15:45:43 +0000
3344@@ -0,0 +1,6 @@
3345+<?xml version="1.0" encoding="UTF-8"?>
3346+
3347+ <level3>
3348+ <level4>level4 text</level4>
3349+ </level3>
3350+
3351
3352=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-22.xml.res'
3353--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-22.xml.res 1970-01-01 00:00:00 +0000
3354+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-22.xml.res 2012-03-07 15:45:43 +0000
3355@@ -0,0 +1,4 @@
3356+<?xml version="1.0" encoding="UTF-8"?>
3357+
3358+ <level4>level4 text</level4>
3359+
3360
3361=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-23.xml.res'
3362--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-23.xml.res 1970-01-01 00:00:00 +0000
3363+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-23.xml.res 2012-03-07 15:45:43 +0000
3364@@ -0,0 +1,2 @@
3365+<?xml version="1.0" encoding="UTF-8"?>
3366+level4 text
3367
3368=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-24.xml.res'
3369--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-24.xml.res 1970-01-01 00:00:00 +0000
3370+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-24.xml.res 2012-03-07 15:45:43 +0000
3371@@ -0,0 +1,5 @@
3372+<?xml version="1.0" encoding="UTF-8"?>
3373+
3374+ <level4>level4 text</level4>
3375+ level3 end
3376+
3377
3378=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-25.xml.res'
3379--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-25.xml.res 1970-01-01 00:00:00 +0000
3380+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-25.xml.res 2012-03-07 15:45:43 +0000
3381@@ -0,0 +1,14 @@
3382+<?xml version="1.0" encoding="UTF-8"?>
3383+<level1>
3384+ level1 text start
3385+ <level2>
3386+ level2 text start
3387+ <level3>
3388+ level3 text start
3389+ <level4>level4 text</level4>
3390+ level3 text end
3391+ </level3>
3392+ level2 text end
3393+ </level2>
3394+ level1 text end
3395+</level1>
3396
3397=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-26.xml.res'
3398--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-26.xml.res 1970-01-01 00:00:00 +0000
3399+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-26.xml.res 2012-03-07 15:45:43 +0000
3400@@ -0,0 +1,14 @@
3401+<?xml version="1.0" encoding="UTF-8"?>
3402+
3403+ level1 text start
3404+ <level2>
3405+ level2 text start
3406+ <level3>
3407+ level3 text start
3408+ <level4>level4 text</level4>
3409+ level3 text end
3410+ </level3>
3411+ level2 text end
3412+ </level2>
3413+ level1 text end
3414+
3415
3416=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-27.xml.res'
3417--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-27.xml.res 1970-01-01 00:00:00 +0000
3418+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-27.xml.res 2012-03-07 15:45:43 +0000
3419@@ -0,0 +1,10 @@
3420+<?xml version="1.0" encoding="UTF-8"?>
3421+
3422+ level2 text start
3423+ <level3>
3424+ level3 text start
3425+ <level4>level4 text</level4>
3426+ level3 text end
3427+ </level3>
3428+ level2 text end
3429+
3430
3431=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-28.xml.res'
3432--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-28.xml.res 1970-01-01 00:00:00 +0000
3433+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-28.xml.res 2012-03-07 15:45:43 +0000
3434@@ -0,0 +1,6 @@
3435+<?xml version="1.0" encoding="UTF-8"?>
3436+
3437+ level3 text start
3438+ <level4>level4 text</level4>
3439+ level3 text end
3440+
3441
3442=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-29.xml.res'
3443--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-29.xml.res 1970-01-01 00:00:00 +0000
3444+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-29.xml.res 2012-03-07 15:45:43 +0000
3445@@ -0,0 +1,2 @@
3446+<?xml version="1.0" encoding="UTF-8"?>
3447+level4 text
3448
3449=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-30.xml.res'
3450--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-30.xml.res 1970-01-01 00:00:00 +0000
3451+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-30.xml.res 2012-03-07 15:45:43 +0000
3452@@ -0,0 +1,2 @@
3453+<?xml version="1.0" encoding="UTF-8"?>
3454+
3455
3456=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-31.xml.res'
3457--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-31.xml.res 1970-01-01 00:00:00 +0000
3458+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-31.xml.res 2012-03-07 15:45:43 +0000
3459@@ -0,0 +1,59 @@
3460+<?xml version="1.0" encoding="UTF-8"?>
3461+
3462+level0 text
3463+<level1>
3464+ level1 text start
3465+ <level2>
3466+ level2 text start
3467+ <level3>
3468+ level3 text start
3469+ <level4>level4 text</level4>
3470+ level3 text end
3471+ </level3>
3472+ level2 text end
3473+ </level2>
3474+ level1 text end
3475+</level1>
3476+level0 text
3477+<level1>
3478+ level1 text start
3479+ <level2>
3480+ level2 text start
3481+ <level3>
3482+ level3 text start
3483+ <level4>level4 text</level4>
3484+ level3 text end
3485+ </level3>
3486+ level2 text end
3487+ </level2>
3488+ level1 text end
3489+</level1>
3490+level0 text
3491+<level1>
3492+ level1 text start
3493+ <level2>
3494+ level2 text start
3495+ <level3>
3496+ level3 text start
3497+ <level4>level4 text</level4>
3498+ level3 text end
3499+ </level3>
3500+ level2 text end
3501+ </level2>
3502+ level1 text end
3503+</level1>
3504+level0 text
3505+<level1>
3506+ level1 text start
3507+ <level2>
3508+ level2 text start
3509+ <level3>
3510+ level3 text start
3511+ <level4>level4 text</level4>
3512+ level3 text end
3513+ </level3>
3514+ level2 text end
3515+ </level2>
3516+ level1 text end
3517+</level1>
3518+level0 text
3519
3520=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-32.xml.res'
3521--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-32.xml.res 1970-01-01 00:00:00 +0000
3522+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-32.xml.res 2012-03-07 15:45:43 +0000
3523@@ -0,0 +1,50 @@
3524+<?xml version="1.0" encoding="UTF-8"?>
3525+
3526+ level1 text start
3527+ <level2>
3528+ level2 text start
3529+ <level3>
3530+ level3 text start
3531+ <level4>level4 text</level4>
3532+ level3 text end
3533+ </level3>
3534+ level2 text end
3535+ </level2>
3536+ level1 text end
3537+
3538+ level1 text start
3539+ <level2>
3540+ level2 text start
3541+ <level3>
3542+ level3 text start
3543+ <level4>level4 text</level4>
3544+ level3 text end
3545+ </level3>
3546+ level2 text end
3547+ </level2>
3548+ level1 text end
3549+
3550+ level1 text start
3551+ <level2>
3552+ level2 text start
3553+ <level3>
3554+ level3 text start
3555+ <level4>level4 text</level4>
3556+ level3 text end
3557+ </level3>
3558+ level2 text end
3559+ </level2>
3560+ level1 text end
3561+
3562+ level1 text start
3563+ <level2>
3564+ level2 text start
3565+ <level3>
3566+ level3 text start
3567+ <level4>level4 text</level4>
3568+ level3 text end
3569+ </level3>
3570+ level2 text end
3571+ </level2>
3572+ level1 text end
3573+
3574
3575=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-33.xml.res'
3576--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-33.xml.res 1970-01-01 00:00:00 +0000
3577+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-33.xml.res 2012-03-07 15:45:43 +0000
3578@@ -0,0 +1,34 @@
3579+<?xml version="1.0" encoding="UTF-8"?>
3580+
3581+ level2 text start
3582+ <level3>
3583+ level3 text start
3584+ <level4>level4 text</level4>
3585+ level3 text end
3586+ </level3>
3587+ level2 text end
3588+
3589+ level2 text start
3590+ <level3>
3591+ level3 text start
3592+ <level4>level4 text</level4>
3593+ level3 text end
3594+ </level3>
3595+ level2 text end
3596+
3597+ level2 text start
3598+ <level3>
3599+ level3 text start
3600+ <level4>level4 text</level4>
3601+ level3 text end
3602+ </level3>
3603+ level2 text end
3604+
3605+ level2 text start
3606+ <level3>
3607+ level3 text start
3608+ <level4>level4 text</level4>
3609+ level3 text end
3610+ </level3>
3611+ level2 text end
3612+
3613
3614=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-34.xml.res'
3615--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-34.xml.res 1970-01-01 00:00:00 +0000
3616+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-34.xml.res 2012-03-07 15:45:43 +0000
3617@@ -0,0 +1,18 @@
3618+<?xml version="1.0" encoding="UTF-8"?>
3619+
3620+ level3 text start
3621+ <level4>level4 text</level4>
3622+ level3 text end
3623+
3624+ level3 text start
3625+ <level4>level4 text</level4>
3626+ level3 text end
3627+
3628+ level3 text start
3629+ <level4>level4 text</level4>
3630+ level3 text end
3631+
3632+ level3 text start
3633+ <level4>level4 text</level4>
3634+ level3 text end
3635+
3636
3637=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-35.xml.res'
3638--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-35.xml.res 1970-01-01 00:00:00 +0000
3639+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-35.xml.res 2012-03-07 15:45:43 +0000
3640@@ -0,0 +1,2 @@
3641+<?xml version="1.0" encoding="UTF-8"?>
3642+level4 textlevel4 textlevel4 textlevel4 text
3643
3644=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-36.xml.res'
3645--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-36.xml.res 1970-01-01 00:00:00 +0000
3646+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-36.xml.res 2012-03-07 15:45:43 +0000
3647@@ -0,0 +1,2 @@
3648+<?xml version="1.0" encoding="UTF-8"?>
3649+
3650
3651=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-37.xml.res'
3652--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-37.xml.res 1970-01-01 00:00:00 +0000
3653+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-37.xml.res 2012-03-07 15:45:43 +0000
3654@@ -0,0 +1,14 @@
3655+<?xml version="1.0" encoding="UTF-8"?>
3656+<doc>
3657+ <foo>0</foo>
3658+ <foo>1</foo>
3659+ <foo>2</foo>
3660+ <foo>3</foo>
3661+ <foo>4</foo>
3662+ <foo>5</foo>
3663+ <foo>6</foo>
3664+ <foo>7</foo>
3665+ <foo>8</foo>
3666+ <foo>9</foo>
3667+ <foo>10</foo>
3668+</doc>
3669
3670=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-38.xml.res'
3671--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-38.xml.res 1970-01-01 00:00:00 +0000
3672+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-38.xml.res 2012-03-07 15:45:43 +0000
3673@@ -0,0 +1,14 @@
3674+<?xml version="1.0" encoding="UTF-8"?>
3675+
3676+ <foo>0</foo>
3677+ <foo>1</foo>
3678+ <foo>2</foo>
3679+ <foo>3</foo>
3680+ <foo>4</foo>
3681+ <foo>5</foo>
3682+ <foo>6</foo>
3683+ <foo>7</foo>
3684+ <foo>8</foo>
3685+ <foo>9</foo>
3686+ <foo>10</foo>
3687+
3688
3689=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-39.xml.res'
3690--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-39.xml.res 1970-01-01 00:00:00 +0000
3691+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-39.xml.res 2012-03-07 15:45:43 +0000
3692@@ -0,0 +1,2 @@
3693+<?xml version="1.0" encoding="UTF-8"?>
3694+012345678910
3695
3696=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-40.xml.res'
3697--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-40.xml.res 1970-01-01 00:00:00 +0000
3698+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-40.xml.res 2012-03-07 15:45:43 +0000
3699@@ -0,0 +1,3 @@
3700+<?xml version="1.0" encoding="UTF-8"?>
3701+
3702+<n1:root xmlns:n1="ns" xmlns:m1="ms"><n2:root2 xmlns:n2="ns2" xmlns:m2="ms2"><n1:from1 xmlns:n3="ns3"><from2>Text from2</from2></n1:from1></n2:root2></n1:root>
3703
3704=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-41.xml.res'
3705--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-41.xml.res 1970-01-01 00:00:00 +0000
3706+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-41.xml.res 2012-03-07 15:45:43 +0000
3707@@ -0,0 +1,2 @@
3708+<?xml version="1.0" encoding="UTF-8"?>
3709+<n2:root2 xmlns:n1="ns" xmlns:m1="ms" xmlns:n2="ns2" xmlns:m2="ms2"><n1:from1 xmlns:n3="ns3"><from2>Text from2</from2></n1:from1></n2:root2>
3710
3711=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-42.xml.res'
3712--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-42.xml.res 1970-01-01 00:00:00 +0000
3713+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-42.xml.res 2012-03-07 15:45:43 +0000
3714@@ -0,0 +1,2 @@
3715+<?xml version="1.0" encoding="UTF-8"?>
3716+<n1:from1 xmlns:n1="ns" xmlns:m1="ms" xmlns:n2="ns2" xmlns:m2="ms2" xmlns:n3="ns3"><from2>Text from2</from2></n1:from1>
3717\ No newline at end of file
3718
3719=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-43.xml.res'
3720--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-43.xml.res 1970-01-01 00:00:00 +0000
3721+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-43.xml.res 2012-03-07 15:45:43 +0000
3722@@ -0,0 +1,2 @@
3723+<?xml version="1.0" encoding="UTF-8"?>
3724+<from2 xmlns:n1="ns" xmlns:m1="ms" xmlns:n2="ns2" xmlns:m2="ms2" xmlns:n3="ns3">Text from2</from2>
3725\ No newline at end of file
3726
3727=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-44.xml.res'
3728--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-44.xml.res 1970-01-01 00:00:00 +0000
3729+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-44.xml.res 2012-03-07 15:45:43 +0000
3730@@ -0,0 +1,2 @@
3731+<?xml version="1.0" encoding="UTF-8"?>
3732+Text from2
3733\ No newline at end of file
3734
3735=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-45.xml.res'
3736--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-45.xml.res 1970-01-01 00:00:00 +0000
3737+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-45.xml.res 2012-03-07 15:45:43 +0000
3738@@ -0,0 +1,2 @@
3739+<?xml version="1.0" encoding="UTF-8"?>
3740+
3741
3742=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-46.xml.res'
3743--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-46.xml.res 1970-01-01 00:00:00 +0000
3744+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-46.xml.res 2012-03-07 15:45:43 +0000
3745@@ -0,0 +1,31 @@
3746+<?xml version="1.0" encoding="UTF-8"?>
3747+
3748+level0 text
3749+<level1/>
3750+level0 text
3751+<level1/>
3752+level0 text
3753+<level1/>
3754+level0 text
3755+<level1/>
3756+level0 text
3757+<level1/>
3758+level0 text
3759+<level1/>
3760+level0 text
3761+<level1/>
3762+level0 text
3763+<level1/>
3764+level0 text
3765+<level1/>
3766+level0 text
3767+<level1/>
3768+level0 text
3769+<level1/>
3770+level0 text
3771+<level1/>
3772+level0 text
3773+<level1/>
3774+level0 text
3775+<level1/>
3776+level0 text
3777\ No newline at end of file
3778
3779=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-53.xml.res'
3780--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-53.xml.res 1970-01-01 00:00:00 +0000
3781+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-53.xml.res 2012-03-07 15:45:43 +0000
3782@@ -0,0 +1,8 @@
3783+<?xml version="1.0" encoding="UTF-8"?>
3784+<mediawiki>
3785+ <page>
3786+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3787+
3788+ </page>
3789+</mediawiki>
3790+
3791
3792=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-54.xml.res'
3793--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-54.xml.res 1970-01-01 00:00:00 +0000
3794+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-54.xml.res 2012-03-07 15:45:43 +0000
3795@@ -0,0 +1,7 @@
3796+<?xml version="1.0" encoding="UTF-8"?>
3797+
3798+ <page>
3799+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
3800+
3801+ </page>
3802+
3803
3804=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-55.xml.res'
3805--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-55.xml.res 1970-01-01 00:00:00 +0000
3806+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-55.xml.res 2012-03-07 15:45:43 +0000
3807@@ -0,0 +1,8 @@
3808+<?xml version="1.0" encoding="UTF-8"?>
3809+<mediawiki>
3810+ <page>
3811+abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab
3812+
3813+ </page>
3814+</mediawiki>
3815+
3816
3817=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-56.xml.res'
3818--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-56.xml.res 1970-01-01 00:00:00 +0000
3819+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-56.xml.res 2012-03-07 15:45:43 +0000
3820@@ -0,0 +1,7 @@
3821+<?xml version="1.0" encoding="UTF-8"?>
3822+
3823+ <page>
3824+abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab
3825+
3826+ </page>
3827+
3828
3829=== modified file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-01.xml.res' (properties changed: +x to -x)
3830=== modified file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-03.xml.res' (properties changed: +x to -x)
3831=== modified file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-04.xml.res' (properties changed: +x to -x)
3832=== modified file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-05.xml.res' (properties changed: +x to -x)
3833=== modified file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-07.xml.res' (properties changed: +x to -x)
3834=== modified file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-10.xml.res' (properties changed: +x to -x)
3835=== modified file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-11.xml.res' (properties changed: +x to -x)
3836=== modified file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-12.xml.res' (properties changed: +x to -x)
3837--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-12.xml.res 2011-07-15 16:39:51 +0000
3838+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-12.xml.res 2012-03-07 15:45:43 +0000
3839@@ -1,4 +1,4 @@
3840 <?xml version="1.0" encoding="UTF-8"?>
3841 <fragment><from1>Jani</from1>
3842 <from2>Jani</from2>
3843-<from3>Jani</from3><count>5</count></fragment>
3844\ No newline at end of file
3845+<from3>Jani</from3><count>6</count></fragment>
3846\ No newline at end of file
3847
3848=== modified file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-14.xml.res' (properties changed: +x to -x)
3849=== modified file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-15.xml.res' (properties changed: +x to -x)
3850=== renamed file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-18.xml.res' => 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-xml-fragment-16.xml.res'
3851=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-01.xq'
3852--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-01.xq 1970-01-01 00:00:00 +0000
3853+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-01.xq 2012-03-07 15:45:43 +0000
3854@@ -0,0 +1,8 @@
3855+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
3856+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
3857+
3858+z:parse("<?xml version='1.0'?><root><from1>Jani</from1></root>",
3859+ <opt:options>
3860+ <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/>
3861+ </opt:options>
3862+)
3863
3864=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-02.xq'
3865--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-02.xq 1970-01-01 00:00:00 +0000
3866+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-02.xq 2012-03-07 15:45:43 +0000
3867@@ -0,0 +1,13 @@
3868+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
3869+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
3870+
3871+z:parse("<?xml version='1.0'?>
3872+<root>
3873+ <from1>Jani1</from1>
3874+ <from2>Jani2</from2>
3875+ <from3>Jani3</from3>
3876+</root>",
3877+ <opt:options>
3878+ <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/>
3879+ </opt:options>
3880+)
3881
3882=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-03.xq'
3883--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-03.xq 1970-01-01 00:00:00 +0000
3884+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-03.xq 2012-03-07 15:45:43 +0000
3885@@ -0,0 +1,13 @@
3886+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
3887+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
3888+
3889+z:parse("<?xml version='1.0'?>
3890+<root>
3891+ <from1>Jani1</from1>
3892+ <from2>Jani2</from2>
3893+ <from3>Jani3</from3>
3894+</root>",
3895+ <opt:options>
3896+ <opt:parse-external-parsed-entity opt:skip-root-nodes="2"/>
3897+ </opt:options>
3898+)
3899
3900=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-04.xq'
3901--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-04.xq 1970-01-01 00:00:00 +0000
3902+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-04.xq 2012-03-07 15:45:43 +0000
3903@@ -0,0 +1,19 @@
3904+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
3905+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
3906+
3907+z:parse("<?xml version='1.0'?>
3908+<root>
3909+ <root2>
3910+ <from1>Jani1</from1>
3911+ </root2>
3912+ <root2>
3913+ <from2>Jani2</from2>
3914+ </root2>
3915+ <root2>
3916+ <from3>Jani3</from3>
3917+ </root2>
3918+</root>",
3919+ <opt:options>
3920+ <opt:parse-external-parsed-entity opt:skip-root-nodes="0"/>
3921+ </opt:options>
3922+)
3923
3924=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-05.xq'
3925--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-05.xq 1970-01-01 00:00:00 +0000
3926+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-05.xq 2012-03-07 15:45:43 +0000
3927@@ -0,0 +1,19 @@
3928+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
3929+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
3930+
3931+z:parse("<?xml version='1.0'?>
3932+<root>
3933+ <root2>
3934+ <from1>Jani1</from1>
3935+ </root2>
3936+ <root2>
3937+ <from2>Jani2</from2>
3938+ </root2>
3939+ <root2>
3940+ <from3>Jani3</from3>
3941+ </root2>
3942+</root>",
3943+ <opt:options>
3944+ <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/>
3945+ </opt:options>
3946+)
3947
3948=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-06.xq'
3949--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-06.xq 1970-01-01 00:00:00 +0000
3950+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-06.xq 2012-03-07 15:45:43 +0000
3951@@ -0,0 +1,19 @@
3952+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
3953+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
3954+
3955+z:parse("<?xml version='1.0'?>
3956+<root>
3957+ <root2>
3958+ <from1>Jani1</from1>
3959+ </root2>
3960+ <root2>
3961+ <from2>Jani2</from2>
3962+ </root2>
3963+ <root2>
3964+ <from3>Jani3</from3>
3965+ </root2>
3966+</root>",
3967+ <opt:options>
3968+ <opt:parse-external-parsed-entity opt:skip-root-nodes="2"/>
3969+ </opt:options>
3970+)
3971
3972=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-07.xq'
3973--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-07.xq 1970-01-01 00:00:00 +0000
3974+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-07.xq 2012-03-07 15:45:43 +0000
3975@@ -0,0 +1,19 @@
3976+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
3977+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
3978+
3979+z:parse("<?xml version='1.0'?>
3980+<root>
3981+ <root2>
3982+ <from1>Jani1</from1>
3983+ </root2>
3984+ <root2>
3985+ <from2>Jani2</from2>
3986+ </root2>
3987+ <root2>
3988+ <from3>Jani3</from3>
3989+ </root2>
3990+</root>",
3991+ <opt:options>
3992+ <opt:parse-external-parsed-entity opt:skip-root-nodes="3"/>
3993+ </opt:options>
3994+)
3995
3996=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-08.xq'
3997--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-08.xq 1970-01-01 00:00:00 +0000
3998+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-08.xq 2012-03-07 15:45:43 +0000
3999@@ -0,0 +1,9 @@
4000+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4001+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4002+
4003+z:parse("<?xml version='1.0'?>
4004+<root><from1>Jani1</from1></root>",
4005+ <opt:options>
4006+ <opt:parse-external-parsed-entity opt:skip-root-nodes="0"/>
4007+ </opt:options>
4008+)
4009
4010=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-09.xq'
4011--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-09.xq 1970-01-01 00:00:00 +0000
4012+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-09.xq 2012-03-07 15:45:43 +0000
4013@@ -0,0 +1,9 @@
4014+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4015+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4016+
4017+z:parse("<?xml version='1.0'?>
4018+<root><from1>Jani1</from1></root>",
4019+ <opt:options>
4020+ <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/>
4021+ </opt:options>
4022+)
4023
4024=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-10.xq'
4025--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-10.xq 1970-01-01 00:00:00 +0000
4026+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-10.xq 2012-03-07 15:45:43 +0000
4027@@ -0,0 +1,9 @@
4028+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4029+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4030+
4031+z:parse("<?xml version='1.0'?>
4032+<root><from1>Jani1</from1></root>",
4033+ <opt:options>
4034+ <opt:parse-external-parsed-entity opt:skip-root-nodes="2"/>
4035+ </opt:options>
4036+)
4037
4038=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-11.xq'
4039--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-11.xq 1970-01-01 00:00:00 +0000
4040+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-11.xq 2012-03-07 15:45:43 +0000
4041@@ -0,0 +1,9 @@
4042+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4043+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4044+
4045+z:parse("<?xml version='1.0'?>
4046+<root><from1>Jani1</from1></root>",
4047+ <opt:options>
4048+ <opt:parse-external-parsed-entity opt:skip-root-nodes="3"/>
4049+ </opt:options>
4050+)
4051
4052=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-12.xq'
4053--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-12.xq 1970-01-01 00:00:00 +0000
4054+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-12.xq 2012-03-07 15:45:43 +0000
4055@@ -0,0 +1,9 @@
4056+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4057+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4058+
4059+z:parse("<?xml version='1.0'?>
4060+<root><root2><from1>Jani1</from1></root2></root>",
4061+ <opt:options>
4062+ <opt:parse-external-parsed-entity opt:skip-root-nodes="3"/>
4063+ </opt:options>
4064+)
4065
4066=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-13.xq'
4067--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-13.xq 1970-01-01 00:00:00 +0000
4068+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-13.xq 2012-03-07 15:45:43 +0000
4069@@ -0,0 +1,9 @@
4070+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4071+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4072+
4073+z:parse("<?xml version='1.0'?>
4074+<root><root2><root3><from1>Jani1</from1></root3></root2></root>",
4075+ <opt:options>
4076+ <opt:parse-external-parsed-entity opt:skip-root-nodes="3"/>
4077+ </opt:options>
4078+)
4079
4080=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-14.xq'
4081--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-14.xq 1970-01-01 00:00:00 +0000
4082+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-14.xq 2012-03-07 15:45:43 +0000
4083@@ -0,0 +1,9 @@
4084+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4085+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4086+
4087+z:parse("<?xml version='1.0'?>
4088+<root><root2><root3><from1>Jani1</from1></root3></root2></root>",
4089+ <opt:options>
4090+ <opt:parse-external-parsed-entity opt:skip-root-nodes="4"/>
4091+ </opt:options>
4092+)
4093
4094=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-15.xq'
4095--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-15.xq 1970-01-01 00:00:00 +0000
4096+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-15.xq 2012-03-07 15:45:43 +0000
4097@@ -0,0 +1,8 @@
4098+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4099+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4100+
4101+z:parse("<?xml version='1.0'?><root>root1 text<root2>root2 text<root3>root3 text<from1>Jani1</from1></root3></root2></root>",
4102+ <opt:options>
4103+ <opt:parse-external-parsed-entity opt:skip-root-nodes="4"/>
4104+ </opt:options>
4105+)
4106
4107=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-16.xq'
4108--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-16.xq 1970-01-01 00:00:00 +0000
4109+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-16.xq 2012-03-07 15:45:43 +0000
4110@@ -0,0 +1,8 @@
4111+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4112+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4113+
4114+z:parse("<?xml version='1.0'?><root>root1 text<root15>root15 text</root15><root2>root2 text<root3>root3 text<from1>Jani1</from1></root3></root2></root>",
4115+ <opt:options>
4116+ <opt:parse-external-parsed-entity opt:skip-root-nodes="4"/>
4117+ </opt:options>
4118+)
4119
4120=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-17.xq'
4121--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-17.xq 1970-01-01 00:00:00 +0000
4122+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-17.xq 2012-03-07 15:45:43 +0000
4123@@ -0,0 +1,8 @@
4124+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4125+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4126+
4127+z:parse("<?xml version='1.0'?><root>root1 text<root15>root15 text</root15><root2>root2 text<root3>root3 text<from1>Jani1</from1></root3></root2></root>",
4128+ <opt:options>
4129+ <opt:parse-external-parsed-entity opt:skip-root-nodes="3"/>
4130+ </opt:options>
4131+)
4132
4133=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-18.xq'
4134--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-18.xq 1970-01-01 00:00:00 +0000
4135+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-18.xq 2012-03-07 15:45:43 +0000
4136@@ -0,0 +1,9 @@
4137+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4138+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4139+
4140+z:parse("<?xml version='1.0'?>
4141+<root>Jani0<from1>Jani1</from1></root>",
4142+ <opt:options>
4143+ <opt:parse-external-parsed-entity opt:skip-root-nodes="2"/>
4144+ </opt:options>
4145+)
4146
4147=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-19.xq'
4148--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-19.xq 1970-01-01 00:00:00 +0000
4149+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-19.xq 2012-03-07 15:45:43 +0000
4150@@ -0,0 +1,15 @@
4151+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4152+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4153+
4154+z:parse("<?xml version='1.0'?>
4155+<level1>
4156+ <level2>
4157+ <level3>
4158+ <level4>level4 text</level4>
4159+ </level3>
4160+ </level2>
4161+</level1>",
4162+ <opt:options>
4163+ <opt:parse-external-parsed-entity opt:skip-root-nodes="0"/>
4164+ </opt:options>
4165+)
4166
4167=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-20.xq'
4168--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-20.xq 1970-01-01 00:00:00 +0000
4169+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-20.xq 2012-03-07 15:45:43 +0000
4170@@ -0,0 +1,15 @@
4171+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4172+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4173+
4174+z:parse("<?xml version='1.0'?>
4175+<level1>
4176+ <level2>
4177+ <level3>
4178+ <level4>level4 text</level4>
4179+ </level3>
4180+ </level2>
4181+</level1>",
4182+ <opt:options>
4183+ <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/>
4184+ </opt:options>
4185+)
4186
4187=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-21.xq'
4188--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-21.xq 1970-01-01 00:00:00 +0000
4189+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-21.xq 2012-03-07 15:45:43 +0000
4190@@ -0,0 +1,15 @@
4191+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4192+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4193+
4194+z:parse("<?xml version='1.0'?>
4195+<level1>
4196+ <level2>
4197+ <level3>
4198+ <level4>level4 text</level4>
4199+ </level3>
4200+ </level2>
4201+</level1>",
4202+ <opt:options>
4203+ <opt:parse-external-parsed-entity opt:skip-root-nodes="2"/>
4204+ </opt:options>
4205+)
4206
4207=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-22.xq'
4208--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-22.xq 1970-01-01 00:00:00 +0000
4209+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-22.xq 2012-03-07 15:45:43 +0000
4210@@ -0,0 +1,15 @@
4211+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4212+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4213+
4214+z:parse("<?xml version='1.0'?>
4215+<level1>
4216+ <level2>
4217+ <level3>
4218+ <level4>level4 text</level4>
4219+ </level3>
4220+ </level2>
4221+</level1>",
4222+ <opt:options>
4223+ <opt:parse-external-parsed-entity opt:skip-root-nodes="3"/>
4224+ </opt:options>
4225+)
4226
4227=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-23.xq'
4228--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-23.xq 1970-01-01 00:00:00 +0000
4229+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-23.xq 2012-03-07 15:45:43 +0000
4230@@ -0,0 +1,15 @@
4231+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4232+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4233+
4234+z:parse("<?xml version='1.0'?>
4235+<level1>
4236+ <level2>
4237+ <level3>
4238+ <level4>level4 text</level4>
4239+ </level3>
4240+ </level2>
4241+</level1>",
4242+ <opt:options>
4243+ <opt:parse-external-parsed-entity opt:skip-root-nodes="4"/>
4244+ </opt:options>
4245+)
4246
4247=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-24.xq'
4248--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-24.xq 1970-01-01 00:00:00 +0000
4249+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-24.xq 2012-03-07 15:45:43 +0000
4250@@ -0,0 +1,16 @@
4251+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4252+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4253+
4254+z:parse("<?xml version='1.0'?>
4255+<level1>
4256+ <level2>
4257+ <level3>
4258+ <level4>level4 text</level4>
4259+ level3 end
4260+ </level3>
4261+ </level2>
4262+</level1>",
4263+ <opt:options>
4264+ <opt:parse-external-parsed-entity opt:skip-root-nodes="3"/>
4265+ </opt:options>
4266+)
4267
4268=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-25.xq'
4269--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-25.xq 1970-01-01 00:00:00 +0000
4270+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-25.xq 2012-03-07 15:45:43 +0000
4271@@ -0,0 +1,21 @@
4272+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4273+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4274+
4275+z:parse("<?xml version='1.0'?>
4276+<level1>
4277+ level1 text start
4278+ <level2>
4279+ level2 text start
4280+ <level3>
4281+ level3 text start
4282+ <level4>level4 text</level4>
4283+ level3 text end
4284+ </level3>
4285+ level2 text end
4286+ </level2>
4287+ level1 text end
4288+</level1>",
4289+ <opt:options>
4290+ <opt:parse-external-parsed-entity opt:skip-root-nodes="0"/>
4291+ </opt:options>
4292+)
4293
4294=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-26.xq'
4295--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-26.xq 1970-01-01 00:00:00 +0000
4296+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-26.xq 2012-03-07 15:45:43 +0000
4297@@ -0,0 +1,21 @@
4298+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4299+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4300+
4301+z:parse("<?xml version='1.0'?>
4302+<level1>
4303+ level1 text start
4304+ <level2>
4305+ level2 text start
4306+ <level3>
4307+ level3 text start
4308+ <level4>level4 text</level4>
4309+ level3 text end
4310+ </level3>
4311+ level2 text end
4312+ </level2>
4313+ level1 text end
4314+</level1>",
4315+ <opt:options>
4316+ <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/>
4317+ </opt:options>
4318+)
4319
4320=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-27.xq'
4321--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-27.xq 1970-01-01 00:00:00 +0000
4322+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-27.xq 2012-03-07 15:45:43 +0000
4323@@ -0,0 +1,21 @@
4324+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4325+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4326+
4327+z:parse("<?xml version='1.0'?>
4328+<level1>
4329+ level1 text start
4330+ <level2>
4331+ level2 text start
4332+ <level3>
4333+ level3 text start
4334+ <level4>level4 text</level4>
4335+ level3 text end
4336+ </level3>
4337+ level2 text end
4338+ </level2>
4339+ level1 text end
4340+</level1>",
4341+ <opt:options>
4342+ <opt:parse-external-parsed-entity opt:skip-root-nodes="2"/>
4343+ </opt:options>
4344+)
4345
4346=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-28.xq'
4347--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-28.xq 1970-01-01 00:00:00 +0000
4348+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-28.xq 2012-03-07 15:45:43 +0000
4349@@ -0,0 +1,21 @@
4350+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4351+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4352+
4353+z:parse("<?xml version='1.0'?>
4354+<level1>
4355+ level1 text start
4356+ <level2>
4357+ level2 text start
4358+ <level3>
4359+ level3 text start
4360+ <level4>level4 text</level4>
4361+ level3 text end
4362+ </level3>
4363+ level2 text end
4364+ </level2>
4365+ level1 text end
4366+</level1>",
4367+ <opt:options>
4368+ <opt:parse-external-parsed-entity opt:skip-root-nodes="3"/>
4369+ </opt:options>
4370+)
4371
4372=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-29.xq'
4373--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-29.xq 1970-01-01 00:00:00 +0000
4374+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-29.xq 2012-03-07 15:45:43 +0000
4375@@ -0,0 +1,21 @@
4376+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4377+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4378+
4379+z:parse("<?xml version='1.0'?>
4380+<level1>
4381+ level1 text start
4382+ <level2>
4383+ level2 text start
4384+ <level3>
4385+ level3 text start
4386+ <level4>level4 text</level4>
4387+ level3 text end
4388+ </level3>
4389+ level2 text end
4390+ </level2>
4391+ level1 text end
4392+</level1>",
4393+ <opt:options>
4394+ <opt:parse-external-parsed-entity opt:skip-root-nodes="4"/>
4395+ </opt:options>
4396+)
4397
4398=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-30.xq'
4399--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-30.xq 1970-01-01 00:00:00 +0000
4400+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-30.xq 2012-03-07 15:45:43 +0000
4401@@ -0,0 +1,21 @@
4402+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4403+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4404+
4405+z:parse("<?xml version='1.0'?>
4406+<level1>
4407+ level1 text start
4408+ <level2>
4409+ level2 text start
4410+ <level3>
4411+ level3 text start
4412+ <level4>level4 text</level4>
4413+ level3 text end
4414+ </level3>
4415+ level2 text end
4416+ </level2>
4417+ level1 text end
4418+</level1>",
4419+ <opt:options>
4420+ <opt:parse-external-parsed-entity opt:skip-root-nodes="5"/>
4421+ </opt:options>
4422+)
4423
4424=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-31.xq'
4425--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-31.xq 1970-01-01 00:00:00 +0000
4426+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-31.xq 2012-03-07 15:45:43 +0000
4427@@ -0,0 +1,65 @@
4428+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4429+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4430+
4431+z:parse("<?xml version='1.0'?>
4432+level0 text
4433+<level1>
4434+ level1 text start
4435+ <level2>
4436+ level2 text start
4437+ <level3>
4438+ level3 text start
4439+ <level4>level4 text</level4>
4440+ level3 text end
4441+ </level3>
4442+ level2 text end
4443+ </level2>
4444+ level1 text end
4445+</level1>
4446+level0 text
4447+<level1>
4448+ level1 text start
4449+ <level2>
4450+ level2 text start
4451+ <level3>
4452+ level3 text start
4453+ <level4>level4 text</level4>
4454+ level3 text end
4455+ </level3>
4456+ level2 text end
4457+ </level2>
4458+ level1 text end
4459+</level1>
4460+level0 text
4461+<level1>
4462+ level1 text start
4463+ <level2>
4464+ level2 text start
4465+ <level3>
4466+ level3 text start
4467+ <level4>level4 text</level4>
4468+ level3 text end
4469+ </level3>
4470+ level2 text end
4471+ </level2>
4472+ level1 text end
4473+</level1>
4474+level0 text
4475+<level1>
4476+ level1 text start
4477+ <level2>
4478+ level2 text start
4479+ <level3>
4480+ level3 text start
4481+ <level4>level4 text</level4>
4482+ level3 text end
4483+ </level3>
4484+ level2 text end
4485+ </level2>
4486+ level1 text end
4487+</level1>
4488+level0 text",
4489+ <opt:options>
4490+ <opt:parse-external-parsed-entity opt:skip-root-nodes="0"/>
4491+ </opt:options>
4492+)
4493
4494=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-32.xq'
4495--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-32.xq 1970-01-01 00:00:00 +0000
4496+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-32.xq 2012-03-07 15:45:43 +0000
4497@@ -0,0 +1,65 @@
4498+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4499+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4500+
4501+z:parse("<?xml version='1.0'?>
4502+level0 text
4503+<level1>
4504+ level1 text start
4505+ <level2>
4506+ level2 text start
4507+ <level3>
4508+ level3 text start
4509+ <level4>level4 text</level4>
4510+ level3 text end
4511+ </level3>
4512+ level2 text end
4513+ </level2>
4514+ level1 text end
4515+</level1>
4516+level0 text
4517+<level1>
4518+ level1 text start
4519+ <level2>
4520+ level2 text start
4521+ <level3>
4522+ level3 text start
4523+ <level4>level4 text</level4>
4524+ level3 text end
4525+ </level3>
4526+ level2 text end
4527+ </level2>
4528+ level1 text end
4529+</level1>
4530+level0 text
4531+<level1>
4532+ level1 text start
4533+ <level2>
4534+ level2 text start
4535+ <level3>
4536+ level3 text start
4537+ <level4>level4 text</level4>
4538+ level3 text end
4539+ </level3>
4540+ level2 text end
4541+ </level2>
4542+ level1 text end
4543+</level1>
4544+level0 text
4545+<level1>
4546+ level1 text start
4547+ <level2>
4548+ level2 text start
4549+ <level3>
4550+ level3 text start
4551+ <level4>level4 text</level4>
4552+ level3 text end
4553+ </level3>
4554+ level2 text end
4555+ </level2>
4556+ level1 text end
4557+</level1>
4558+level0 text",
4559+ <opt:options>
4560+ <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/>
4561+ </opt:options>
4562+)
4563
4564=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-33.xq'
4565--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-33.xq 1970-01-01 00:00:00 +0000
4566+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-33.xq 2012-03-07 15:45:43 +0000
4567@@ -0,0 +1,65 @@
4568+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4569+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4570+
4571+z:parse("<?xml version='1.0'?>
4572+level0 text
4573+<level1>
4574+ level1 text start
4575+ <level2>
4576+ level2 text start
4577+ <level3>
4578+ level3 text start
4579+ <level4>level4 text</level4>
4580+ level3 text end
4581+ </level3>
4582+ level2 text end
4583+ </level2>
4584+ level1 text end
4585+</level1>
4586+level0 text
4587+<level1>
4588+ level1 text start
4589+ <level2>
4590+ level2 text start
4591+ <level3>
4592+ level3 text start
4593+ <level4>level4 text</level4>
4594+ level3 text end
4595+ </level3>
4596+ level2 text end
4597+ </level2>
4598+ level1 text end
4599+</level1>
4600+level0 text
4601+<level1>
4602+ level1 text start
4603+ <level2>
4604+ level2 text start
4605+ <level3>
4606+ level3 text start
4607+ <level4>level4 text</level4>
4608+ level3 text end
4609+ </level3>
4610+ level2 text end
4611+ </level2>
4612+ level1 text end
4613+</level1>
4614+level0 text
4615+<level1>
4616+ level1 text start
4617+ <level2>
4618+ level2 text start
4619+ <level3>
4620+ level3 text start
4621+ <level4>level4 text</level4>
4622+ level3 text end
4623+ </level3>
4624+ level2 text end
4625+ </level2>
4626+ level1 text end
4627+</level1>
4628+level0 text",
4629+ <opt:options>
4630+ <opt:parse-external-parsed-entity opt:skip-root-nodes="2"/>
4631+ </opt:options>
4632+)
4633
4634=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-34.xq'
4635--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-34.xq 1970-01-01 00:00:00 +0000
4636+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-34.xq 2012-03-07 15:45:43 +0000
4637@@ -0,0 +1,65 @@
4638+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4639+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4640+
4641+z:parse("<?xml version='1.0'?>
4642+level0 text
4643+<level1>
4644+ level1 text start
4645+ <level2>
4646+ level2 text start
4647+ <level3>
4648+ level3 text start
4649+ <level4>level4 text</level4>
4650+ level3 text end
4651+ </level3>
4652+ level2 text end
4653+ </level2>
4654+ level1 text end
4655+</level1>
4656+level0 text
4657+<level1>
4658+ level1 text start
4659+ <level2>
4660+ level2 text start
4661+ <level3>
4662+ level3 text start
4663+ <level4>level4 text</level4>
4664+ level3 text end
4665+ </level3>
4666+ level2 text end
4667+ </level2>
4668+ level1 text end
4669+</level1>
4670+level0 text
4671+<level1>
4672+ level1 text start
4673+ <level2>
4674+ level2 text start
4675+ <level3>
4676+ level3 text start
4677+ <level4>level4 text</level4>
4678+ level3 text end
4679+ </level3>
4680+ level2 text end
4681+ </level2>
4682+ level1 text end
4683+</level1>
4684+level0 text
4685+<level1>
4686+ level1 text start
4687+ <level2>
4688+ level2 text start
4689+ <level3>
4690+ level3 text start
4691+ <level4>level4 text</level4>
4692+ level3 text end
4693+ </level3>
4694+ level2 text end
4695+ </level2>
4696+ level1 text end
4697+</level1>
4698+level0 text",
4699+ <opt:options>
4700+ <opt:parse-external-parsed-entity opt:skip-root-nodes="3"/>
4701+ </opt:options>
4702+)
4703
4704=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-35.xq'
4705--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-35.xq 1970-01-01 00:00:00 +0000
4706+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-35.xq 2012-03-07 15:45:43 +0000
4707@@ -0,0 +1,65 @@
4708+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4709+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4710+
4711+z:parse("<?xml version='1.0'?>
4712+level0 text
4713+<level1>
4714+ level1 text start
4715+ <level2>
4716+ level2 text start
4717+ <level3>
4718+ level3 text start
4719+ <level4>level4 text</level4>
4720+ level3 text end
4721+ </level3>
4722+ level2 text end
4723+ </level2>
4724+ level1 text end
4725+</level1>
4726+level0 text
4727+<level1>
4728+ level1 text start
4729+ <level2>
4730+ level2 text start
4731+ <level3>
4732+ level3 text start
4733+ <level4>level4 text</level4>
4734+ level3 text end
4735+ </level3>
4736+ level2 text end
4737+ </level2>
4738+ level1 text end
4739+</level1>
4740+level0 text
4741+<level1>
4742+ level1 text start
4743+ <level2>
4744+ level2 text start
4745+ <level3>
4746+ level3 text start
4747+ <level4>level4 text</level4>
4748+ level3 text end
4749+ </level3>
4750+ level2 text end
4751+ </level2>
4752+ level1 text end
4753+</level1>
4754+level0 text
4755+<level1>
4756+ level1 text start
4757+ <level2>
4758+ level2 text start
4759+ <level3>
4760+ level3 text start
4761+ <level4>level4 text</level4>
4762+ level3 text end
4763+ </level3>
4764+ level2 text end
4765+ </level2>
4766+ level1 text end
4767+</level1>
4768+level0 text",
4769+ <opt:options>
4770+ <opt:parse-external-parsed-entity opt:skip-root-nodes="4"/>
4771+ </opt:options>
4772+)
4773
4774=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-36.xq'
4775--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-36.xq 1970-01-01 00:00:00 +0000
4776+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-36.xq 2012-03-07 15:45:43 +0000
4777@@ -0,0 +1,65 @@
4778+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4779+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4780+
4781+z:parse("<?xml version='1.0'?>
4782+level0 text
4783+<level1>
4784+ level1 text start
4785+ <level2>
4786+ level2 text start
4787+ <level3>
4788+ level3 text start
4789+ <level4>level4 text</level4>
4790+ level3 text end
4791+ </level3>
4792+ level2 text end
4793+ </level2>
4794+ level1 text end
4795+</level1>
4796+level0 text
4797+<level1>
4798+ level1 text start
4799+ <level2>
4800+ level2 text start
4801+ <level3>
4802+ level3 text start
4803+ <level4>level4 text</level4>
4804+ level3 text end
4805+ </level3>
4806+ level2 text end
4807+ </level2>
4808+ level1 text end
4809+</level1>
4810+level0 text
4811+<level1>
4812+ level1 text start
4813+ <level2>
4814+ level2 text start
4815+ <level3>
4816+ level3 text start
4817+ <level4>level4 text</level4>
4818+ level3 text end
4819+ </level3>
4820+ level2 text end
4821+ </level2>
4822+ level1 text end
4823+</level1>
4824+level0 text
4825+<level1>
4826+ level1 text start
4827+ <level2>
4828+ level2 text start
4829+ <level3>
4830+ level3 text start
4831+ <level4>level4 text</level4>
4832+ level3 text end
4833+ </level3>
4834+ level2 text end
4835+ </level2>
4836+ level1 text end
4837+</level1>
4838+level0 text",
4839+ <opt:options>
4840+ <opt:parse-external-parsed-entity opt:skip-root-nodes="5"/>
4841+ </opt:options>
4842+)
4843
4844=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-37.xq'
4845--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-37.xq 1970-01-01 00:00:00 +0000
4846+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-37.xq 2012-03-07 15:45:43 +0000
4847@@ -0,0 +1,20 @@
4848+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4849+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4850+
4851+z:parse("<doc>
4852+ <foo>0</foo>
4853+ <foo>1</foo>
4854+ <foo>2</foo>
4855+ <foo>3</foo>
4856+ <foo>4</foo>
4857+ <foo>5</foo>
4858+ <foo>6</foo>
4859+ <foo>7</foo>
4860+ <foo>8</foo>
4861+ <foo>9</foo>
4862+ <foo>10</foo>
4863+</doc>",
4864+ <opt:options>
4865+ <opt:parse-external-parsed-entity opt:skip-root-nodes="0"/>
4866+ </opt:options>
4867+)
4868
4869=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-38.xq'
4870--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-38.xq 1970-01-01 00:00:00 +0000
4871+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-38.xq 2012-03-07 15:45:43 +0000
4872@@ -0,0 +1,20 @@
4873+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4874+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4875+
4876+z:parse("<doc>
4877+ <foo>0</foo>
4878+ <foo>1</foo>
4879+ <foo>2</foo>
4880+ <foo>3</foo>
4881+ <foo>4</foo>
4882+ <foo>5</foo>
4883+ <foo>6</foo>
4884+ <foo>7</foo>
4885+ <foo>8</foo>
4886+ <foo>9</foo>
4887+ <foo>10</foo>
4888+</doc>",
4889+ <opt:options>
4890+ <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/>
4891+ </opt:options>
4892+)
4893
4894=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-39.xq'
4895--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-39.xq 1970-01-01 00:00:00 +0000
4896+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-39.xq 2012-03-07 15:45:43 +0000
4897@@ -0,0 +1,20 @@
4898+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4899+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4900+
4901+z:parse("<doc>
4902+ <foo>0</foo>
4903+ <foo>1</foo>
4904+ <foo>2</foo>
4905+ <foo>3</foo>
4906+ <foo>4</foo>
4907+ <foo>5</foo>
4908+ <foo>6</foo>
4909+ <foo>7</foo>
4910+ <foo>8</foo>
4911+ <foo>9</foo>
4912+ <foo>10</foo>
4913+</doc>",
4914+ <opt:options>
4915+ <opt:parse-external-parsed-entity opt:skip-root-nodes="2"/>
4916+ </opt:options>
4917+)
4918
4919=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-40.xq'
4920--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-40.xq 1970-01-01 00:00:00 +0000
4921+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-40.xq 2012-03-07 15:45:43 +0000
4922@@ -0,0 +1,9 @@
4923+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4924+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4925+
4926+z:parse("<?xml version='1.0'?>
4927+<n1:root xmlns:n1='ns' xmlns:m1='ms'><n2:root2 xmlns:n2='ns2' xmlns:m2='ms2'><n1:from1 xmlns:n3='ns3'><from2>Text from2</from2></n1:from1></n2:root2></n1:root>",
4928+ <opt:options>
4929+ <opt:parse-external-parsed-entity opt:skip-root-nodes="0"/>
4930+ </opt:options>
4931+)
4932
4933=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-41.xq'
4934--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-41.xq 1970-01-01 00:00:00 +0000
4935+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-41.xq 2012-03-07 15:45:43 +0000
4936@@ -0,0 +1,9 @@
4937+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4938+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4939+
4940+z:parse("<?xml version='1.0'?>
4941+<n1:root xmlns:n1='ns' xmlns:m1='ms'><n2:root2 xmlns:n2='ns2' xmlns:m2='ms2'><n1:from1 xmlns:n3='ns3'><from2>Text from2</from2></n1:from1></n2:root2></n1:root>",
4942+ <opt:options>
4943+ <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/>
4944+ </opt:options>
4945+)
4946
4947=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-42.xq'
4948--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-42.xq 1970-01-01 00:00:00 +0000
4949+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-42.xq 2012-03-07 15:45:43 +0000
4950@@ -0,0 +1,9 @@
4951+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4952+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4953+
4954+z:parse("<?xml version='1.0'?>
4955+<n1:root xmlns:n1='ns' xmlns:m1='ms'><n2:root2 xmlns:n2='ns2' xmlns:m2='ms2'><n1:from1 xmlns:n3='ns3'><from2>Text from2</from2></n1:from1></n2:root2></n1:root>",
4956+ <opt:options>
4957+ <opt:parse-external-parsed-entity opt:skip-root-nodes="2"/>
4958+ </opt:options>
4959+)
4960
4961=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-43.xq'
4962--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-43.xq 1970-01-01 00:00:00 +0000
4963+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-43.xq 2012-03-07 15:45:43 +0000
4964@@ -0,0 +1,9 @@
4965+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4966+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4967+
4968+z:parse("<?xml version='1.0'?>
4969+<n1:root xmlns:n1='ns' xmlns:m1='ms'><n2:root2 xmlns:n2='ns2' xmlns:m2='ms2'><n1:from1 xmlns:n3='ns3'><from2>Text from2</from2></n1:from1></n2:root2></n1:root>",
4970+ <opt:options>
4971+ <opt:parse-external-parsed-entity opt:skip-root-nodes="3"/>
4972+ </opt:options>
4973+)
4974
4975=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-44.xq'
4976--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-44.xq 1970-01-01 00:00:00 +0000
4977+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-44.xq 2012-03-07 15:45:43 +0000
4978@@ -0,0 +1,9 @@
4979+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4980+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4981+
4982+z:parse("<?xml version='1.0'?>
4983+<n1:root xmlns:n1='ns' xmlns:m1='ms'><n2:root2 xmlns:n2='ns2' xmlns:m2='ms2'><n1:from1 xmlns:n3='ns3'><from2>Text from2</from2></n1:from1></n2:root2></n1:root>",
4984+ <opt:options>
4985+ <opt:parse-external-parsed-entity opt:skip-root-nodes="4"/>
4986+ </opt:options>
4987+)
4988
4989=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-45.xq'
4990--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-45.xq 1970-01-01 00:00:00 +0000
4991+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-45.xq 2012-03-07 15:45:43 +0000
4992@@ -0,0 +1,9 @@
4993+import module namespace z = "http://www.zorba-xquery.com/modules/xml";
4994+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
4995+
4996+z:parse("<?xml version='1.0'?>
4997+<n1:root xmlns:n1='ns' xmlns:m1='ms'><n2:root2 xmlns:n2='ns2' xmlns:m2='ms2'><n1:from1 xmlns:n3='ns3'><from2>Text from2</from2></n1:from1></n2:root2></n1:root>",
4998+ <opt:options>
4999+ <opt:parse-external-parsed-entity opt:skip-root-nodes="5"/>
5000+ </opt:options>
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches