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