Merge lp:~zorba-coders/zorba/bug-1188048 into lp:zorba/html-module

Proposed by Luis Rodriguez Gonzalez
Status: Needs review
Proposed branch: lp:~zorba-coders/zorba/bug-1188048
Merge into: lp:zorba/html-module
Diff against target: 239 lines (+32/-31)
13 files modified
src/CMakeLists.txt (+2/-2)
src/html-options.xsd (+3/-3)
src/html.xq (+6/-5)
src/html.xq.src/html.h (+1/-1)
src/html.xq.src/tidy_wrapper.h (+2/-2)
test/Queries/link_crawler2.xq2 (+2/-2)
test/Queries/tidy_1.xq (+3/-3)
test/Queries/tidy_2.xq (+2/-2)
test/Queries/tidy_3.xq (+2/-2)
test/Queries/tidy_4.xq (+2/-2)
test/Queries/tidy_5_wrong_options.spec (+1/-1)
test/Queries/tidy_5_wrong_options.xq (+3/-3)
test/Queries/tidy_6_wrong_options.xq (+3/-3)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1188048
Reviewer Review Type Date Requested Status
Chris Hillery Approve
Luis Rodriguez Gonzalez Approve
Review via email: mp+191730@code.launchpad.net

Commit message

Changes for Zorba 3.0 for HTML module

To post a comment you must log in.
Revision history for this message
Luis Rodriguez Gonzalez (kuraru) :
review: Approve
Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for the following merge proposals:
https://code.launchpad.net/~zorba-coders/zorba/bug-1188048/+merge/191730

Progress dashboard at http://jenkins.lambda.nu/view/ValidationQueue

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/bug-1188048/+merge/191730

Stage "TestZorbaUbuntu" failed.
19 tests failed (8576 total tests run).

Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/392/testReport/ to view the results.

Revision history for this message
Chris Hillery (ceejatec) wrote :

Luis - need to update the implementation of the non-core http-client module (and possibly tests) for the new URI of the html module, and link that proposal to this one.

Unmerged revisions

98. By Luis Rodriguez Gonzalez

Changes for Zorba 3.0 for HTML module

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/CMakeLists.txt'
2--- src/CMakeLists.txt 2013-03-28 01:02:11 +0000
3+++ src/CMakeLists.txt 2013-10-17 21:45:52 +0000
4@@ -29,8 +29,8 @@
5 INCLUDE_DIRECTORIES (${LIBTIDY_INCLUDE_DIR})
6 INCLUDE_DIRECTORIES ("html.xq.src")
7 DECLARE_ZORBA_SCHEMA (FILE "html-options.xsd"
8- URI "http://www.zorba-xquery.com/modules/converters/html-options")
9- DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/converters/html" VERSION 1.0 FILE "html.xq" LINK_LIBRARIES "${LIBTIDY_LIBRARIES}")
10+ URI "http://zorba.io/modules/html-options")
11+ DECLARE_ZORBA_MODULE (URI "http://zorba.io/modules/html" VERSION 1.0 FILE "html.xq" LINK_LIBRARIES "${LIBTIDY_LIBRARIES}")
12 ADD_TEST_DIRECTORY ("${PROJECT_SOURCE_DIR}/test")
13
14 ADD_TEST(zorba_html_module/link_crawler_test_for_compilation "${ZORBA_EXE}" -f -q "${PROJECT_SOURCE_DIR}/test/Queries/link_crawler2.xq2" --compile-only)
15
16=== modified file 'src/html-options.xsd'
17--- src/html-options.xsd 2012-08-04 02:18:50 +0000
18+++ src/html-options.xsd 2013-10-17 21:45:52 +0000
19@@ -1,6 +1,6 @@
20 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
21- xmlns:ho="http://www.zorba-xquery.com/modules/converters/html-options"
22- targetNamespace="http://www.zorba-xquery.com/modules/converters/html-options"
23+ xmlns:ho="http://zorba.io/modules/html-options"
24+ targetNamespace="http://zorba.io/modules/html-options"
25 elementFormDefault="qualified" attributeFormDefault="unqualified"
26 >
27 <!--
28@@ -37,4 +37,4 @@
29 </xs:sequence>
30 </xs:complexType>
31 </xs:element>
32-</xs:schema>
33\ No newline at end of file
34+</xs:schema>
35
36=== modified file 'src/html.xq'
37--- src/html.xq 2013-09-26 21:33:49 +0000
38+++ src/html.xq 2013-10-17 21:45:52 +0000
39@@ -18,7 +18,8 @@
40
41 (:~
42 : <p>
43- : This module provides functions to <a href="http://www.w3.org/People/Raggett/tidy/" target="_blank">tidy</a> a HTML document. <br />
44+ : This module provides functions to <a href="http://www.w3.org/People/Raggett/tidy/" target="_blank">tidy</a> a HTML document. </p>
45+ : <p>
46 : The functions in this module take an HTML document (a string) as parameter,
47 : tidy it in order to result in valid XHTML, and return this XHTML document as a document-node.
48 : </p>
49@@ -29,14 +30,14 @@
50 : @project Zorba/Data Converters/HTML
51 :
52 :)
53-module namespace html = "http://www.zorba-xquery.com/modules/converters/html";
54+module namespace html = "http://zorba.io/modules/html";
55
56 (:~
57 : Import module for checking if html options element is validated.
58 :)
59 import module namespace schema = "http://zorba.io/modules/schema";
60
61-import schema namespace html-options = "http://www.zorba-xquery.com/modules/converters/html-options";
62+import schema namespace html-options = "http://zorba.io/modules/html-options";
63
64 declare namespace err = "http://ww.w3.org/2005/xqt-errors";
65
66@@ -72,7 +73,7 @@
67 {
68 let $validated-options :=
69 validate {
70- <options xmlns="http://www.zorba-xquery.com/modules/converters/html-options" >
71+ <options xmlns="http://zorba.io/modules/html-options" >
72 <tidyParam name="output-xml" value="yes" />
73 <tidyParam name="doctype" value="omit" />
74 <tidyParam name="quote-nbsp" value="no" />
75@@ -98,7 +99,7 @@
76 : @param $html the HTML string to tidy
77 : @param $options a set of name and value pairs that provide options
78 : to configure the tidy process that have to be validated against the
79- : "http://www.zorba-xquery.com/modules/converters/html-options" schema.
80+ : "http://zorba.io/modules/html-options" schema.
81 : @return the tidied XHTML document node
82 :
83 : @error err:XQDY0027 if $options can not be validated against the
84
85=== modified file 'src/html.xq.src/html.h'
86--- src/html.xq.src/html.h 2013-08-05 14:21:05 +0000
87+++ src/html.xq.src/html.h 2013-10-17 21:45:52 +0000
88@@ -54,7 +54,7 @@
89 virtual ~HtmlModule();
90
91 virtual String
92- getURI() const { return "http://www.zorba-xquery.com/modules/converters/html"; }
93+ getURI() const { return "http://zorba.io/modules/html"; }
94
95 virtual ExternalFunction*
96 getExternalFunction(const String& aLocalname);
97
98=== modified file 'src/html.xq.src/tidy_wrapper.h'
99--- src/html.xq.src/tidy_wrapper.h 2013-08-05 15:14:21 +0000
100+++ src/html.xq.src/tidy_wrapper.h 2013-10-17 21:45:52 +0000
101@@ -91,7 +91,7 @@
102 if (rc > 1)
103 {
104 zorba::Item lError = Zorba::getInstance(0)->getItemFactory()->
105- createQName("http://www.zorba-xquery.com/modules/converters/html",
106+ createQName("http://zorba.io/modules/html",
107 "InternalError");
108
109 throw USER_EXCEPTION(lError, errMsg );
110@@ -109,7 +109,7 @@
111 if (ok != yes)
112 {
113 zorba::Item lError = Zorba::getInstance(0)->getItemFactory()->
114- createQName("http://www.zorba-xquery.com/modules/converters/html",
115+ createQName("http://zorba.io/modules/html",
116 "TidyOption");
117
118 std::ostringstream lErrorMsg;
119
120=== modified file 'test/Queries/link_crawler2.xq2'
121--- test/Queries/link_crawler2.xq2 2013-09-03 13:33:20 +0000
122+++ test/Queries/link_crawler2.xq2 2013-10-17 21:45:52 +0000
123@@ -16,7 +16,7 @@
124
125 import module namespace http = "http://www.zorba-xquery.com/modules/http-client";
126 import module namespace map = "http://zorba.io/modules/unordered-maps";
127-import module namespace html = "http://www.zorba-xquery.com/modules/converters/html";
128+import module namespace html = "http://zorba.io/modules/html";
129 import module namespace x = "http://zorba.io/modules/xml";
130 import schema namespace opt = "http://zorba.io/modules/xml-options";
131 import module namespace file = "http://expath.org/ns/file";
132@@ -34,7 +34,7 @@
133
134 declare variable $local:processed-internal-links := "processed-internal-links";
135 declare variable $local:processed-external-links := "processed-external-links";
136-declare variable $local:tidy-options := <options xmlns="http://www.zorba-xquery.com/modules/converters/html-options" >
137+declare variable $local:tidy-options := <options xmlns="http://zorba.io/modules/html-options" >
138 <tidyParam name="output-xml" value="yes" />
139 <tidyParam name="doctype" value="omit" />
140 <tidyParam name="quote-nbsp" value="no" />
141
142=== modified file 'test/Queries/tidy_1.xq'
143--- test/Queries/tidy_1.xq 2012-08-04 02:23:35 +0000
144+++ test/Queries/tidy_1.xq 2013-10-17 21:45:52 +0000
145@@ -1,10 +1,10 @@
146 (: tidy a html using different tidy options :)
147
148-import module namespace html="http://www.zorba-xquery.com/modules/converters/html";
149-import schema namespace html-options="http://www.zorba-xquery.com/modules/converters/html-options";
150+import module namespace html="http://zorba.io/modules/html";
151+import schema namespace html-options="http://zorba.io/modules/html-options";
152
153 html:parse('<title>Foo</title><p>Foo!',
154- <options xmlns="http://www.zorba-xquery.com/modules/converters/html-options" >
155+ <options xmlns="http://zorba.io/modules/html-options" >
156 <tidyParam name="output-xml" value="yes" />
157 <tidyParam name="doctype" value="omit" />
158 <tidyParam name="quote-nbsp" value="no" />
159
160=== modified file 'test/Queries/tidy_2.xq'
161--- test/Queries/tidy_2.xq 2012-08-04 02:23:35 +0000
162+++ test/Queries/tidy_2.xq 2013-10-17 21:45:52 +0000
163@@ -1,6 +1,6 @@
164 (: tidy a html using default tidy options :)
165
166-import module namespace html="http://www.zorba-xquery.com/modules/converters/html";
167-import schema namespace html-options="http://www.zorba-xquery.com/modules/converters/html-options";
168+import module namespace html="http://zorba.io/modules/html";
169+import schema namespace html-options="http://zorba.io/modules/html-options";
170
171 html:parse('<title>Foo</title><p>Foo!')
172\ No newline at end of file
173
174=== modified file 'test/Queries/tidy_3.xq'
175--- test/Queries/tidy_3.xq 2012-08-04 02:23:35 +0000
176+++ test/Queries/tidy_3.xq 2013-10-17 21:45:52 +0000
177@@ -1,5 +1,5 @@
178-import module namespace html="http://www.zorba-xquery.com/modules/converters/html";
179-import schema namespace html-options="http://www.zorba-xquery.com/modules/converters/html-options";
180+import module namespace html="http://zorba.io/modules/html";
181+import schema namespace html-options="http://zorba.io/modules/html-options";
182
183 html:parse('<HTML>
184 <HEAD>
185
186=== modified file 'test/Queries/tidy_4.xq'
187--- test/Queries/tidy_4.xq 2012-08-04 02:23:35 +0000
188+++ test/Queries/tidy_4.xq 2013-10-17 21:45:52 +0000
189@@ -1,5 +1,5 @@
190-import module namespace html="http://www.zorba-xquery.com/modules/converters/html";
191-import schema namespace html-options="http://www.zorba-xquery.com/modules/converters/html-options";
192+import module namespace html="http://zorba.io/modules/html";
193+import schema namespace html-options="http://zorba.io/modules/html-options";
194
195 html:parse('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
196 <html>
197
198=== modified file 'test/Queries/tidy_5_wrong_options.spec'
199--- test/Queries/tidy_5_wrong_options.spec 2012-08-04 02:23:35 +0000
200+++ test/Queries/tidy_5_wrong_options.spec 2013-10-17 21:45:52 +0000
201@@ -1,1 +1,1 @@
202-Error: http://www.zorba-xquery.com/modules/converters/html:TidyOption
203+Error: http://zorba.io/modules/html:TidyOption
204
205=== modified file 'test/Queries/tidy_5_wrong_options.xq'
206--- test/Queries/tidy_5_wrong_options.xq 2012-08-04 02:23:35 +0000
207+++ test/Queries/tidy_5_wrong_options.xq 2013-10-17 21:45:52 +0000
208@@ -1,9 +1,9 @@
209 (: tidy a html using wrong tidy option for a value :)
210
211-import module namespace html="http://www.zorba-xquery.com/modules/converters/html";
212-import schema namespace html-options="http://www.zorba-xquery.com/modules/converters/html-options";
213+import module namespace html="http://zorba.io/modules/html";
214+import schema namespace html-options="http://zorba.io/modules/html-options";
215
216 html:parse('<title>Foo</title><p>Foo!',
217- <options xmlns="http://www.zorba-xquery.com/modules/converters/html-options" >
218+ <options xmlns="http://zorba.io/modules/html-options" >
219 <tidyParam name="output-xml" value="maybe" />
220 </options>)
221\ No newline at end of file
222
223=== modified file 'test/Queries/tidy_6_wrong_options.xq'
224--- test/Queries/tidy_6_wrong_options.xq 2012-08-04 02:23:35 +0000
225+++ test/Queries/tidy_6_wrong_options.xq 2013-10-17 21:45:52 +0000
226@@ -1,10 +1,10 @@
227 (: tidy a html using correct tidy options/values but wrongly formated as html-options :)
228
229-import module namespace html="http://www.zorba-xquery.com/modules/converters/html";
230-import schema namespace html-options="http://www.zorba-xquery.com/modules/converters/html-options";
231+import module namespace html="http://zorba.io/modules/html";
232+import schema namespace html-options="http://zorba.io/modules/html-options";
233
234 html:parse('<title>Foo</title><p>Foo!',
235- <options xmlns="http://www.zorba-xquery.com/modules/converters/html-options" >
236+ <options xmlns="http://zorba.io/modules/html-options" >
237 <tidyaram name="output-xml" value="yes" />
238 <tidyParam name="doctype" value="omit" />
239 <tidyParam name="quote-nbsp" value="no" />

Subscribers

People subscribed via source and target branches

to all changes: