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