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

Proposed by Nicolae Brinza on 2013-01-20
Status: Merged
Approved by: Chris Hillery on 2013-01-30
Approved revision: 10547
Merged at revision: 11208
Proposed branch: lp:~nbrinza/zorba/parse-fragment
Merge into: lp:zorba
Diff against target: 459 lines (+362/-6)
6 files modified
ChangeLog (+8/-0)
src/store/naive/loader.h (+2/-1)
src/store/naive/loader_dtd.cpp (+22/-5)
test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-57.xml.res (+159/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/bad.xml (+158/-0)
test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-57.xq (+13/-0)
To merge this branch: bzr merge lp:~nbrinza/zorba/parse-fragment
Reviewer Review Type Date Requested Status
Chris Hillery 2013-01-20 Approve on 2013-01-30
Nicolae Brinza Approve on 2013-01-20
Review via email: mp+144007@code.launchpad.net

This proposal supersedes a proposal from 2013-01-16.

Commit Message

Fix for bugs #1099535 #1099648 and #1088886

Description of the Change

Fix for bugs #1099535 #1099648 and #1088886

To post a comment you must log in.
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Validation queue job parse-fragment-2013-01-16T14-41-25.479Z is finished. The final status was:

All tests succeeded!

Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Pending.

Nicolae Brinza (nbrinza) : Posted in a previous version of this proposal
review: Approve
Nicolae Brinza (nbrinza) :
review: Approve
Zorba Build Bot (zorba-buildbot) wrote :

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

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job parse-fragment-2013-01-20T01-35-16.016Z is finished.
  The final status was:

  21 tests did not succeed - changes not commited.

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

Zorba Build Bot (zorba-buildbot) wrote :

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

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job parse-fragment-2013-01-20T02-23-09.94Z is finished.
  The final status was:

  22 tests did not succeed - changes not commited.

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

Zorba Build Bot (zorba-buildbot) wrote :

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

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job parse-fragment-2013-01-20T14-06-13.72Z is finished.
  The final status was:

  21 tests did not succeed - changes not commited.

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

I can confirm that all "parse" and "parse-xml-fragment" tests pass on my Fedora x64 bit machine.

Chris Hillery (ceejatec) wrote :

I've fixed the RQ problem that caused the JDBC and Oracle NoSQL failures. However, the 4 XQXQ failures I don't understand yet.

Chris Hillery (ceejatec) wrote :

Think I've fixed it; trying again.

Nicolae Brinza (nbrinza) wrote :

Yeah, there were some weird failures in the RQ -- the JDBC ones and around 3 URI tests that did not fail on my machine.

Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job parse-fragment-2013-01-21T08-58-10.778Z is finished. The final status was:

All tests succeeded!

Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.

Chris Hillery (ceejatec) wrote :

Confirmed that this fixes both outstanding Fedora bugs (tested on Fedora) as well as the infinite-loop bug (tested on Ubuntu). Yay!

review: Approve
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job parse-fragment-2013-01-30T01-53-04.029Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2013-01-14 09:46:44 +0000
3+++ ChangeLog 2013-01-20 00:28:21 +0000
4@@ -1,6 +1,14 @@
5 Zorba - The XQuery Processor
6
7
8+version 2.9
9+
10+Bug Fixes/Other Changes:
11+ * Fixed bug #1099648 and #1088886 (XML parsing failures on Red Hat)
12+ * Fixed bug #1099535 (xml:parse endless loop)
13+
14+
15+
16 version 2.8
17
18 New Features:
19
20=== modified file 'src/store/naive/loader.h'
21--- src/store/naive/loader.h 2012-09-19 21:16:15 +0000
22+++ src/store/naive/loader.h 2013-01-20 00:28:21 +0000
23@@ -261,7 +261,8 @@
24 const FragmentIStream* getFragmentStream() const { return theFragmentStream; };
25
26 protected:
27- bool fillBuffer(FragmentIStream* theFragmentStream);
28+ // returns true if the input buffer is not yet fully consumed
29+ bool fillBuffer(FragmentIStream* theFragmentStream);
30
31 unsigned long getCurrentInputOffset() const;
32
33
34=== modified file 'src/store/naive/loader_dtd.cpp'
35--- src/store/naive/loader_dtd.cpp 2012-09-19 21:16:15 +0000
36+++ src/store/naive/loader_dtd.cpp 2013-01-20 00:28:21 +0000
37@@ -149,6 +149,7 @@
38 {
39 }
40
41+// returns true if the input buffer is not yet fully consumed
42 bool FragmentXmlLoader::fillBuffer(FragmentIStream* theFragmentStream)
43 {
44 if (theFragmentStream->ctxt->input->length > 0 && theFragmentStream->current_offset < theFragmentStream->bytes_in_buffer)
45@@ -175,6 +176,7 @@
46 theFragmentStream->ctxt->input->length = (theFragmentStream->bytes_in_buffer < (theFragmentStream->theBuffer.size()-1) ? theFragmentStream->bytes_in_buffer : (theFragmentStream->theBuffer.size()-1));
47 theFragmentStream->ctxt->input->cur = theFragmentStream->ctxt->input->base;
48 theFragmentStream->ctxt->input->end = theFragmentStream->ctxt->input->base + theFragmentStream->ctxt->input->length;
49+ theFragmentStream->ctxt->checkIndex = 0; // this needs to be reset to force LibXml2 to rescan the buffer. Otherwise it might fail to detect opening/closing tags in certain inputs
50
51 if (theFragmentStream->bytes_in_buffer < theFragmentStream->theBuffer.size()-1)
52 theFragmentStream->theBuffer[theFragmentStream->bytes_in_buffer] = 0;
53@@ -241,7 +243,9 @@
54
55 // Initialize the parser input (only filename and the pointer to the current char)
56 theFragmentStream->theBuffer[0] = ' '; // This assignment is needed for LibXml2-2.7.6, which tries to read the buffer when xmlPushInput() is called
57- input->cur = (xmlChar*)(&theFragmentStream->theBuffer[0]);
58+ input->base = (xmlChar*)(&theFragmentStream->theBuffer[0]);
59+ input->cur = input->base;
60+ // input->cur = (xmlChar*)(&theFragmentStream->theBuffer[0]);
61 input->filename = (const char*)(xmlCanonicPath((const xmlChar*)theDocUri.c_str()));
62 xmlPushInput(theFragmentStream->ctxt, input);
63 }
64@@ -250,6 +254,8 @@
65 theFragmentStream->ctxt->disableSAX = false; // xmlStopParser() sets disableSAX to true
66 theFragmentStream->parsed_nodes_count = 0;
67 theFragmentStream->forced_parser_stop = false;
68+
69+ // theFragmentStream->ctxt->progressive = 1;
70
71 if (theFragmentStream->state != FragmentIStream::FRAGMENT_FIRST_START_DOC)
72 {
73@@ -257,7 +263,8 @@
74 FragmentXmlLoader::startDocument(theFragmentStream->ctxt->userData);
75 }
76
77- while ( ! theFragmentStream->forced_parser_stop && fillBuffer(theFragmentStream))
78+ bool buffer_not_consumed;
79+ while ( ! theFragmentStream->forced_parser_stop && (buffer_not_consumed = fillBuffer(theFragmentStream)))
80 {
81 if (theFragmentStream->only_one_doc_node && theFragmentStream->state != FragmentIStream::FRAGMENT_FIRST_START_DOC)
82 {
83@@ -316,9 +323,17 @@
84 }
85
86 /*
87+ std::string buffer = (char*)theFragmentStream->ctxt->input->cur;
88+ if (theFragmentStream->ctxt->input->length < buffer.size())
89+ buffer = buffer.substr(0, theFragmentStream->ctxt->input->length);
90 std::cerr << "\n==================\n--> skip_root: " << theFragmentStream->root_elements_to_skip << " current_depth: " << theFragmentStream->current_element_depth
91- << " state: " << theFragmentStream->ctxt->instate
92- << " about to parse: [" << theFragmentStream->ctxt->input->cur << "] " << std::endl;
93+ << " state: " << theFragmentStream->ctxt->instate
94+ << " about to parse: [";
95+ if (buffer.size() > 500)
96+ std::cerr << buffer.substr(0, 160) << "\n...\n" << buffer.substr(buffer.size()-160);
97+ else
98+ std::cerr << theFragmentStream->ctxt->input->cur;
99+ std::cerr << "] " << std::endl;
100 */
101
102 xmlParseChunk(theFragmentStream->ctxt, (const char*)theFragmentStream->ctxt->input->cur,
103@@ -332,8 +347,10 @@
104 xmlParseCharData(theFragmentStream->ctxt, 0);
105 theFragmentStream->current_offset = getCurrentInputOffset(); // update current offset
106
107- if (theXQueryDiagnostics->errors().empty() && theFragmentStream->current_offset == 0 && theFragmentStream->ctxt->checkIndex > 0)
108+ if (theXQueryDiagnostics->errors().empty() && theFragmentStream->current_offset == 0)
109 {
110+ assert(buffer_not_consumed == true);
111+
112 // we still haven't moved, double the buffer size
113 theFragmentStream->theBuffer.resize((theFragmentStream->theBuffer.size()-1) * 2 + 1);
114 theFragmentStream->ctxt->input->base = (xmlChar*)(&theFragmentStream->theBuffer[0]);
115
116=== added file 'test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-57.xml.res'
117--- test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-57.xml.res 1970-01-01 00:00:00 +0000
118+++ test/rbkt/ExpQueryResults/zorba/parsing_and_serializing/parse-fragment-skip-root-57.xml.res 2013-01-20 00:28:21 +0000
119@@ -0,0 +1,159 @@
120+<?xml version="1.0" encoding="UTF-8"?>
121+
122+<record xmlns="http://www.loc.gov/MARC21/slim">
123+ <leader>01428cam a2200313 a 4500</leader>
124+ <controlfield tag="001">2</controlfield>
125+ <controlfield tag="005">20060629073726.0</controlfield>
126+ <controlfield tag="007">cr |||||||||||</controlfield>
127+ <controlfield tag="008">990629s1900 maua 000 1 eng </controlfield>
128+ <datafield tag="906" ind1=" " ind2=" ">
129+ <subfield code="a">7</subfield>
130+ <subfield code="b">ibc</subfield>
131+ <subfield code="c">orignew</subfield>
132+ <subfield code="d">u</subfield>
133+ <subfield code="e">ocip</subfield>
134+ <subfield code="f">19</subfield>
135+ <subfield code="g">y-gencatlg</subfield>
136+ </datafield>
137+ <datafield tag="955" ind1=" " ind2=" ">
138+ <subfield code="a">NEW INPUT vj36 06-29-99</subfield>
139+ <subfield code="e">vj05 2002-04-03</subfield>
140+ </datafield>
141+ <datafield tag="035" ind1=" " ind2=" ">
142+ <subfield code="9">(DLC) 00002266</subfield>
143+ </datafield>
144+ <datafield tag="010" ind1=" " ind2=" ">
145+ <subfield code="a"> 00002266 </subfield>
146+ </datafield>
147+ <datafield tag="040" ind1=" " ind2=" ">
148+ <subfield code="a">DLC</subfield>
149+ <subfield code="c">DLC</subfield>
150+ <subfield code="d">DLC</subfield>
151+ </datafield>
152+ <datafield tag="050" ind1="0" ind2="0">
153+ <subfield code="a">PZ3.L846</subfield>
154+ <subfield code="b">So</subfield>
155+ </datafield>
156+ <datafield tag="051" ind1=" " ind2=" ">
157+ <subfield code="a">PS3523.O46</subfield>
158+ <subfield code="b">S72 1900</subfield>
159+ </datafield>
160+ <datafield tag="100" ind1="1" ind2=" ">
161+ <subfield code="a">London, Jack,</subfield>
162+ <subfield code="d">1876-1916.</subfield>
163+ </datafield>
164+ <datafield tag="245" ind1="1" ind2="4">
165+ <subfield code="a">The son of the wolf :</subfield>
166+ <subfield code="b">tales of the far North /</subfield>
167+ <subfield code="c">by Jack London.</subfield>
168+ </datafield>
169+ <datafield tag="246" ind1="3" ind2="0">
170+ <subfield code="a">Tales of the far North</subfield>
171+ </datafield>
172+ <datafield tag="260" ind1=" " ind2=" ">
173+ <subfield code="a">Boston :</subfield>
174+ <subfield code="b">Houghton, Mifflin,</subfield>
175+ <subfield code="c">1900.</subfield>
176+ </datafield>
177+ <datafield tag="300" ind1=" " ind2=" ">
178+ <subfield code="a">251 p. :</subfield>
179+ <subfield code="b">1 ill. ;</subfield>
180+ <subfield code="c">20 cm.</subfield>
181+ </datafield>
182+ <datafield tag="500" ind1=" " ind2=" ">
183+ <subfield code="a">These tales appeared previously in the Overland monthly, 1899, and the Atlantic monthly.</subfield>
184+ </datafield>
185+ <datafield tag="505" ind1="0" ind2=" ">
186+ <subfield code="a">The white silence -- The son of the wolf -- The men of Forty-Mile -- In a far country -- To the man on trail -- The priestly prerogative -- The wisdom of the trail -- The wife of a king -- An odyssey of the North.</subfield>
187+ </datafield>
188+ <datafield tag="530" ind1=" " ind2=" ">
189+ <subfield code="a">Also available in digital form on the Library of Congress Web site.</subfield>
190+ </datafield>
191+ <datafield tag="856" ind1="4" ind2="1">
192+ <subfield code="d">mtfrb</subfield>
193+ <subfield code="f">02266</subfield>
194+ <subfield code="q">h</subfield>
195+ <subfield code="u">http://hdl.loc.gov/loc.rbc/mtfrb.02266</subfield>
196+ </datafield>
197+ <datafield tag="859" ind1="4" ind2="2">
198+ <subfield code="3">Meeting of Frontiers: Siberia, Alaska, and the American West - "Rare Book Collections" Collection Description</subfield>
199+ <subfield code="u">http://hdl.loc.gov/loc.eur/mtfhtml.0054</subfield>
200+ </datafield>
201+ <datafield tag="984" ind1=" " ind2=" ">
202+ <subfield code="a">gsl</subfield>
203+ </datafield>
204+ <datafield tag="985" ind1=" " ind2=" ">
205+ <subfield code="a">mtfront/mtfrb/tx</subfield>
206+ <subfield code="e">intldl</subfield>
207+ </datafield>
208+ <datafield tag="985" ind1=" " ind2=" ">
209+ <subfield code="a">pmpull</subfield>
210+ <subfield code="e">intldl</subfield>
211+ </datafield>
212+</record>
213+<record xmlns="http://www.loc.gov/MARC21/slim">
214+ <leader>00757cam a22002171 4500</leader>
215+ <controlfield tag="001">3</controlfield>
216+ <controlfield tag="005">20080606094929.0</controlfield>
217+ <controlfield tag="008">980227s1900 iluc 000 0 eng </controlfield>
218+ <datafield tag="035" ind1=" " ind2=" ">
219+ <subfield code="9">(DLC) 00004790</subfield>
220+ </datafield>
221+ <datafield tag="906" ind1=" " ind2=" ">
222+ <subfield code="a">0</subfield>
223+ <subfield code="b">ibc</subfield>
224+ <subfield code="c">orignew</subfield>
225+ <subfield code="d">3</subfield>
226+ <subfield code="e">ocip</subfield>
227+ <subfield code="f">19</subfield>
228+ <subfield code="g">y-gencatlg</subfield>
229+ </datafield>
230+ <datafield tag="955" ind1=" " ind2=" ">
231+ <subfield code="a">jd99 02-27-98</subfield>
232+ </datafield>
233+ <datafield tag="010" ind1=" " ind2=" ">
234+ <subfield code="a"> 00004790 </subfield>
235+ </datafield>
236+ <datafield tag="040" ind1=" " ind2=" ">
237+ <subfield code="a">DLC</subfield>
238+ <subfield code="c">DLC</subfield>
239+ </datafield>
240+ <datafield tag="050" ind1="0" ind2="0">
241+ <subfield code="a">PG3385</subfield>
242+ <subfield code="b">.S85</subfield>
243+ </datafield>
244+ <datafield tag="100" ind1="1" ind2=" ">
245+ <subfield code="a">Stockham, Alice B.</subfield>
246+ <subfield code="q">(Alice Bunker),</subfield>
247+ <subfield code="d">1833-1912.</subfield>
248+ </datafield>
249+ <datafield tag="245" ind1="1" ind2="0">
250+ <subfield code="a">Tolstoi, a man of peace,</subfield>
251+ <subfield code="c">by Alice B. Stockham. The new spirit by H. Havelock Ellis.</subfield>
252+ </datafield>
253+ <datafield tag="260" ind1=" " ind2=" ">
254+ <subfield code="a">Chicago,</subfield>
255+ <subfield code="b">A.B. Stockham,</subfield>
256+ <subfield code="c">[1900]</subfield>
257+ </datafield>
258+ <datafield tag="300" ind1=" " ind2=" ">
259+ <subfield code="a">140 p.</subfield>
260+ <subfield code="b">ports.</subfield>
261+ <subfield code="c">18 cm.</subfield>
262+ </datafield>
263+ <datafield tag="500" ind1=" " ind2=" ">
264+ <subfield code="a">"The new spirit" (p. [85]-140) has special t.-p.</subfield>
265+ </datafield>
266+ <datafield tag="600" ind1="1" ind2="0">
267+ <subfield code="a">Tolstoy, Leo,</subfield>
268+ <subfield code="c">graf,</subfield>
269+ <subfield code="d">1828-1910.</subfield>
270+ </datafield>
271+ <datafield tag="700" ind1="1" ind2="2">
272+ <subfield code="a">Ellis, Havelock,</subfield>
273+ <subfield code="d">1859-1939.</subfield>
274+ <subfield code="t">New spirit.</subfield>
275+ <subfield code="f">1900.</subfield>
276+ </datafield>
277+</record>
278+
279
280=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/bad.xml'
281--- test/rbkt/Queries/zorba/parsing_and_serializing/bad.xml 1970-01-01 00:00:00 +0000
282+++ test/rbkt/Queries/zorba/parsing_and_serializing/bad.xml 2013-01-20 00:28:21 +0000
283@@ -0,0 +1,158 @@
284+<collection xmlns="http://www.loc.gov/MARC21/slim">
285+<record>
286+ <leader>01428cam a2200313 a 4500</leader>
287+ <controlfield tag="001">2</controlfield>
288+ <controlfield tag="005">20060629073726.0</controlfield>
289+ <controlfield tag="007">cr |||||||||||</controlfield>
290+ <controlfield tag="008">990629s1900 maua 000 1 eng </controlfield>
291+ <datafield tag="906" ind1=" " ind2=" ">
292+ <subfield code="a">7</subfield>
293+ <subfield code="b">ibc</subfield>
294+ <subfield code="c">orignew</subfield>
295+ <subfield code="d">u</subfield>
296+ <subfield code="e">ocip</subfield>
297+ <subfield code="f">19</subfield>
298+ <subfield code="g">y-gencatlg</subfield>
299+ </datafield>
300+ <datafield tag="955" ind1=" " ind2=" ">
301+ <subfield code="a">NEW INPUT vj36 06-29-99</subfield>
302+ <subfield code="e">vj05 2002-04-03</subfield>
303+ </datafield>
304+ <datafield tag="035" ind1=" " ind2=" ">
305+ <subfield code="9">(DLC) 00002266</subfield>
306+ </datafield>
307+ <datafield tag="010" ind1=" " ind2=" ">
308+ <subfield code="a"> 00002266 </subfield>
309+ </datafield>
310+ <datafield tag="040" ind1=" " ind2=" ">
311+ <subfield code="a">DLC</subfield>
312+ <subfield code="c">DLC</subfield>
313+ <subfield code="d">DLC</subfield>
314+ </datafield>
315+ <datafield tag="050" ind1="0" ind2="0">
316+ <subfield code="a">PZ3.L846</subfield>
317+ <subfield code="b">So</subfield>
318+ </datafield>
319+ <datafield tag="051" ind1=" " ind2=" ">
320+ <subfield code="a">PS3523.O46</subfield>
321+ <subfield code="b">S72 1900</subfield>
322+ </datafield>
323+ <datafield tag="100" ind1="1" ind2=" ">
324+ <subfield code="a">London, Jack,</subfield>
325+ <subfield code="d">1876-1916.</subfield>
326+ </datafield>
327+ <datafield tag="245" ind1="1" ind2="4">
328+ <subfield code="a">The son of the wolf :</subfield>
329+ <subfield code="b">tales of the far North /</subfield>
330+ <subfield code="c">by Jack London.</subfield>
331+ </datafield>
332+ <datafield tag="246" ind1="3" ind2="0">
333+ <subfield code="a">Tales of the far North</subfield>
334+ </datafield>
335+ <datafield tag="260" ind1=" " ind2=" ">
336+ <subfield code="a">Boston :</subfield>
337+ <subfield code="b">Houghton, Mifflin,</subfield>
338+ <subfield code="c">1900.</subfield>
339+ </datafield>
340+ <datafield tag="300" ind1=" " ind2=" ">
341+ <subfield code="a">251 p. :</subfield>
342+ <subfield code="b">1 ill. ;</subfield>
343+ <subfield code="c">20 cm.</subfield>
344+ </datafield>
345+ <datafield tag="500" ind1=" " ind2=" ">
346+ <subfield code="a">These tales appeared previously in the Overland monthly, 1899, and the Atlantic monthly.</subfield>
347+ </datafield>
348+ <datafield tag="505" ind1="0" ind2=" ">
349+ <subfield code="a">The white silence -- The son of the wolf -- The men of Forty-Mile -- In a far country -- To the man on trail -- The priestly prerogative -- The wisdom of the trail -- The wife of a king -- An odyssey of the North.</subfield>
350+ </datafield>
351+ <datafield tag="530" ind1=" " ind2=" ">
352+ <subfield code="a">Also available in digital form on the Library of Congress Web site.</subfield>
353+ </datafield>
354+ <datafield tag="856" ind1="4" ind2="1">
355+ <subfield code="d">mtfrb</subfield>
356+ <subfield code="f">02266</subfield>
357+ <subfield code="q">h</subfield>
358+ <subfield code="u">http://hdl.loc.gov/loc.rbc/mtfrb.02266</subfield>
359+ </datafield>
360+ <datafield tag="859" ind1="4" ind2="2">
361+ <subfield code="3">Meeting of Frontiers: Siberia, Alaska, and the American West - &quot;Rare Book Collections&quot; Collection Description</subfield>
362+ <subfield code="u">http://hdl.loc.gov/loc.eur/mtfhtml.0054</subfield>
363+ </datafield>
364+ <datafield tag="984" ind1=" " ind2=" ">
365+ <subfield code="a">gsl</subfield>
366+ </datafield>
367+ <datafield tag="985" ind1=" " ind2=" ">
368+ <subfield code="a">mtfront/mtfrb/tx</subfield>
369+ <subfield code="e">intldl</subfield>
370+ </datafield>
371+ <datafield tag="985" ind1=" " ind2=" ">
372+ <subfield code="a">pmpull</subfield>
373+ <subfield code="e">intldl</subfield>
374+ </datafield>
375+</record>
376+<record>
377+ <leader>00757cam a22002171 4500</leader>
378+ <controlfield tag="001">3</controlfield>
379+ <controlfield tag="005">20080606094929.0</controlfield>
380+ <controlfield tag="008">980227s1900 iluc 000 0 eng </controlfield>
381+ <datafield tag="035" ind1=" " ind2=" ">
382+ <subfield code="9">(DLC) 00004790</subfield>
383+ </datafield>
384+ <datafield tag="906" ind1=" " ind2=" ">
385+ <subfield code="a">0</subfield>
386+ <subfield code="b">ibc</subfield>
387+ <subfield code="c">orignew</subfield>
388+ <subfield code="d">3</subfield>
389+ <subfield code="e">ocip</subfield>
390+ <subfield code="f">19</subfield>
391+ <subfield code="g">y-gencatlg</subfield>
392+ </datafield>
393+ <datafield tag="955" ind1=" " ind2=" ">
394+ <subfield code="a">jd99 02-27-98</subfield>
395+ </datafield>
396+ <datafield tag="010" ind1=" " ind2=" ">
397+ <subfield code="a"> 00004790 </subfield>
398+ </datafield>
399+ <datafield tag="040" ind1=" " ind2=" ">
400+ <subfield code="a">DLC</subfield>
401+ <subfield code="c">DLC</subfield>
402+ </datafield>
403+ <datafield tag="050" ind1="0" ind2="0">
404+ <subfield code="a">PG3385</subfield>
405+ <subfield code="b">.S85</subfield>
406+ </datafield>
407+ <datafield tag="100" ind1="1" ind2=" ">
408+ <subfield code="a">Stockham, Alice B.</subfield>
409+ <subfield code="q">(Alice Bunker),</subfield>
410+ <subfield code="d">1833-1912.</subfield>
411+ </datafield>
412+ <datafield tag="245" ind1="1" ind2="0">
413+ <subfield code="a">Tolstoi, a man of peace,</subfield>
414+ <subfield code="c">by Alice B. Stockham. The new spirit by H. Havelock Ellis.</subfield>
415+ </datafield>
416+ <datafield tag="260" ind1=" " ind2=" ">
417+ <subfield code="a">Chicago,</subfield>
418+ <subfield code="b">A.B. Stockham,</subfield>
419+ <subfield code="c">[1900]</subfield>
420+ </datafield>
421+ <datafield tag="300" ind1=" " ind2=" ">
422+ <subfield code="a">140 p.</subfield>
423+ <subfield code="b">ports.</subfield>
424+ <subfield code="c">18 cm.</subfield>
425+ </datafield>
426+ <datafield tag="500" ind1=" " ind2=" ">
427+ <subfield code="a">&quot;The new spirit&quot; (p. [85]-140) has special t.-p.</subfield>
428+ </datafield>
429+ <datafield tag="600" ind1="1" ind2="0">
430+ <subfield code="a">Tolstoy, Leo,</subfield>
431+ <subfield code="c">graf,</subfield>
432+ <subfield code="d">1828-1910.</subfield>
433+ </datafield>
434+ <datafield tag="700" ind1="1" ind2="2">
435+ <subfield code="a">Ellis, Havelock,</subfield>
436+ <subfield code="d">1859-1939.</subfield>
437+ <subfield code="t">New spirit.</subfield>
438+ <subfield code="f">1900.</subfield>
439+ </datafield>
440+</record>
441+</collection>
442
443=== added file 'test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-57.xq'
444--- test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-57.xq 1970-01-01 00:00:00 +0000
445+++ test/rbkt/Queries/zorba/parsing_and_serializing/parse-fragment-skip-root-57.xq 2013-01-20 00:28:21 +0000
446@@ -0,0 +1,13 @@
447+import module namespace parse-xml = "http://www.zorba-xquery.com/modules/xml";
448+import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options";
449+import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch";
450+
451+variable $xmlcontents := fetch:content(resolve-uri("bad.xml"));
452+
453+let $contents := parse-xml:parse(
454+ $xmlcontents,
455+ <opt:options>
456+ <opt:parse-external-parsed-entity opt:skip-root-nodes="1"/>
457+ </opt:options>)
458+
459+return $contents

Subscribers

People subscribed via source and target branches