Merge lp:~zorba-coders/zorba/bug-1188041 into lp:zorba/data-formatting-module
- bug-1188041
- Merge into data-formatting-module
Proposed by
Luis Rodriguez Gonzalez
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 48 | ||||
Proposed branch: | lp:~zorba-coders/zorba/bug-1188041 | ||||
Merge into: | lp:zorba/data-formatting-module | ||||
Diff against target: |
254 lines (+30/-91) 7 files modified
src/CMakeLists.txt (+1/-1) src/com/CMakeLists.txt (+0/-17) src/com/zorba-xquery/CMakeLists.txt (+0/-17) src/com/zorba-xquery/www/CMakeLists.txt (+0/-17) src/xsl-fo.xq (+24/-34) src/xsl-fo.xq.src/xslfo.cpp (+4/-4) test/Queries/data-formatting/xslfo.xq (+1/-1) |
||||
To merge this branch: | bzr merge lp:~zorba-coders/zorba/bug-1188041 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chris Hillery | Approve | ||
Luis Rodriguez Gonzalez | Approve | ||
Review via email: mp+183023@code.launchpad.net |
Commit message
Changes for Zorba 3.0 for data formatting internal module.
Description of the change
To post a comment you must log in.
- 49. By Luis Rodriguez Gonzalez
-
Deprecated function removed
Revision history for this message
Luis Rodriguez Gonzalez (kuraru) wrote : | # |
> I think it makes sense to remove the Deprecated functions entirely at this
> point.
Deprecated function is now removed.
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:/
Progress dashboard at http://
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue succeeded - proposal merged!
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === removed file 'src/CMakeLists.txt' |
2 | --- src/CMakeLists.txt 2011-07-26 10:43:11 +0000 |
3 | +++ src/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
4 | @@ -1,20 +0,0 @@ |
5 | -# Copyright 2006-2008 The FLWOR Foundation. |
6 | -# |
7 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
8 | -# you may not use this file except in compliance with the License. |
9 | -# You may obtain a copy of the License at |
10 | -# |
11 | -# http://www.apache.org/licenses/LICENSE-2.0 |
12 | -# |
13 | -# Unless required by applicable law or agreed to in writing, software |
14 | -# distributed under the License is distributed on an "AS IS" BASIS, |
15 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
16 | -# See the License for the specific language governing permissions and |
17 | -# limitations under the License. |
18 | - |
19 | -# all external module libraries are generated in the directory |
20 | -# of the corresponding .xq file |
21 | -MESSAGE(STATUS "Add com") |
22 | -ADD_SUBDIRECTORY(com) |
23 | - |
24 | -MESSAGE(STATUS "End modules") |
25 | |
26 | === renamed file 'src/com/zorba-xquery/www/modules/CMakeLists.txt' => 'src/CMakeLists.txt' |
27 | --- src/com/zorba-xquery/www/modules/CMakeLists.txt 2013-01-22 13:19:42 +0000 |
28 | +++ src/CMakeLists.txt 2013-09-19 20:45:27 +0000 |
29 | @@ -76,7 +76,7 @@ |
30 | |
31 | INCLUDE_DIRECTORIES (${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) |
32 | INCLUDE_DIRECTORIES (${JAVA_INCLUDE_PATH}) |
33 | - DECLARE_ZORBA_MODULE (URI "http://www.zorba-xquery.com/modules/xsl-fo" |
34 | + DECLARE_ZORBA_MODULE (URI "http://zorba.io/modules/xsl-fo" |
35 | VERSION 1.0 FILE "xsl-fo.xq" |
36 | LINK_LIBRARIES "${JAVA_JVM_LIBRARY}" ${zorba_util-jvm_module_LIBRARIES}) |
37 | |
38 | |
39 | === removed directory 'src/com' |
40 | === removed file 'src/com/CMakeLists.txt' |
41 | --- src/com/CMakeLists.txt 2011-10-06 08:17:52 +0000 |
42 | +++ src/com/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
43 | @@ -1,17 +0,0 @@ |
44 | -# Copyright 2006-2008 The FLWOR Foundation. |
45 | -# |
46 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
47 | -# you may not use this file except in compliance with the License. |
48 | -# You may obtain a copy of the License at |
49 | -# |
50 | -# http://www.apache.org/licenses/LICENSE-2.0 |
51 | -# |
52 | -# Unless required by applicable law or agreed to in writing, software |
53 | -# distributed under the License is distributed on an "AS IS" BASIS, |
54 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
55 | -# See the License for the specific language governing permissions and |
56 | -# limitations under the License. |
57 | - |
58 | -# all external module libraries are generated in the directory |
59 | -# of the corresponding .xq file |
60 | -ADD_SUBDIRECTORY(zorba-xquery) |
61 | |
62 | === removed directory 'src/com/zorba-xquery' |
63 | === removed file 'src/com/zorba-xquery/CMakeLists.txt' |
64 | --- src/com/zorba-xquery/CMakeLists.txt 2011-10-06 08:17:52 +0000 |
65 | +++ src/com/zorba-xquery/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
66 | @@ -1,17 +0,0 @@ |
67 | -# Copyright 2006-2008 The FLWOR Foundation. |
68 | -# |
69 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
70 | -# you may not use this file except in compliance with the License. |
71 | -# You may obtain a copy of the License at |
72 | -# |
73 | -# http://www.apache.org/licenses/LICENSE-2.0 |
74 | -# |
75 | -# Unless required by applicable law or agreed to in writing, software |
76 | -# distributed under the License is distributed on an "AS IS" BASIS, |
77 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
78 | -# See the License for the specific language governing permissions and |
79 | -# limitations under the License. |
80 | - |
81 | -# all external module libraries are generated in the directory |
82 | -# of the corresponding .xq file |
83 | -ADD_SUBDIRECTORY(www) |
84 | |
85 | === removed directory 'src/com/zorba-xquery/www' |
86 | === removed file 'src/com/zorba-xquery/www/CMakeLists.txt' |
87 | --- src/com/zorba-xquery/www/CMakeLists.txt 2011-10-06 08:17:52 +0000 |
88 | +++ src/com/zorba-xquery/www/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
89 | @@ -1,17 +0,0 @@ |
90 | -# Copyright 2006-2008 The FLWOR Foundation. |
91 | -# |
92 | -# Licensed under the Apache License, Version 2.0 (the "License"); |
93 | -# you may not use this file except in compliance with the License. |
94 | -# You may obtain a copy of the License at |
95 | -# |
96 | -# http://www.apache.org/licenses/LICENSE-2.0 |
97 | -# |
98 | -# Unless required by applicable law or agreed to in writing, software |
99 | -# distributed under the License is distributed on an "AS IS" BASIS, |
100 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
101 | -# See the License for the specific language governing permissions and |
102 | -# limitations under the License. |
103 | - |
104 | -# all external module libraries are generated in the directory |
105 | -# of the corresponding .xq file |
106 | -ADD_SUBDIRECTORY(modules) |
107 | |
108 | === removed directory 'src/com/zorba-xquery/www/modules' |
109 | === renamed file 'src/com/zorba-xquery/www/modules/xsl-fo.xq' => 'src/xsl-fo.xq' |
110 | --- src/com/zorba-xquery/www/modules/xsl-fo.xq 2013-08-09 09:37:05 +0000 |
111 | +++ src/xsl-fo.xq 2013-09-19 20:45:27 +0000 |
112 | @@ -20,8 +20,8 @@ |
113 | : This module converts <a href="http://www.w3schools.com/xslfo/default.asp">XSL-FO</a> documents |
114 | : to various formats such as PDF, EPS, PCL, AFP, Text, PNG, Postscript, RTF, and TIFF. |
115 | : For instance, the following example converts a simple XSL-FO document to PDF: |
116 | - : <br /> |
117 | - : <pre class="ace-static" ace-mode="xquery"><![CDATA[import module namespace fop = "http://www.zorba-xquery.com/modules/xsl-fo"; |
118 | + : <p/> |
119 | + : <pre class="ace-static" ace-mode="xquery"><![CDATA[import module namespace fop = "http://zorba.io/modules/xsl-fo"; |
120 | : import module namespace file = "http://expath.org/ns/file"; |
121 | : |
122 | : declare namespace fo = "http://www.w3.org/1999/XSL/Format"; |
123 | @@ -41,11 +41,10 @@ |
124 | : </fo:root> |
125 | : let $pdf := fop:generator($fop:PDF, $xsl-fo) |
126 | : return file:write-binary("simple.pdf", $pdf)]]></pre> |
127 | - : <br /> |
128 | + : <p/> |
129 | : This module uses Apache-FOP to generate content from an XSL-FO document. |
130 | : See <a href="http://xmlgraphics.apache.org/fop/">the Apache FOP documentation</a> for further information. |
131 | - : <br /> |
132 | - : <br /> |
133 | + : <p/> |
134 | : <b>Note for Windows users</b>: On Windows, this module won't work out of the box, since |
135 | : this module uses Java. But the Java VM dll is not in the system path by default. To make |
136 | : this module work, you need to add the directory where the jvm.dll is located to the |
137 | @@ -57,7 +56,7 @@ |
138 | : @library <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK - Java Development Kit</a> |
139 | : @project Zorba/Data Formatting/XSL-FO |
140 | :) |
141 | -module namespace xsl-fo = "http://www.zorba-xquery.com/modules/xsl-fo"; |
142 | +module namespace xsl-fo = "http://zorba.io/modules/xsl-fo"; |
143 | |
144 | import module namespace util-jvm = "http://www.zorba-xquery.com/modules/util-jvm"; |
145 | |
146 | @@ -104,45 +103,36 @@ |
147 | declare variable $xsl-fo:TIFF as xs:string := "image/tiff"; |
148 | |
149 | (:~ |
150 | - : Deprecated. This function has been deprecated, the JVM and it's classpath is handled diffrently.<br/> |
151 | - : The generator function takes an XSL-FO document as input and generates output in the format given as input. |
152 | - : The output format can be given as a MIME type - for example "application/pdf" - or one of the predefined |
153 | - : variables can be used - like $xsl-fo:PDF. Please refer to the Apache FOP documentation for |
154 | + : The generator function takes an XSL-FO document as input and generates output |
155 | + : in the format given as input. |
156 | + : The output format can be given as a MIME type - for example "application/pdf" |
157 | + : - or one of the predefined variables can be used - like $xsl-fo:PDF. Please |
158 | + : refer to the Apache FOP documentation for |
159 | : <a href="http://xmlgraphics.apache.org/fop/0.95/output.html">supported output formats</a>. |
160 | : |
161 | : Apache FOP does not support 100% of the XSL-FO standard. |
162 | - : Please consult the <a href="http://xmlgraphics.apache.org/fop/">official documentation for further information</a>. |
163 | + : Please consult the <a href="http://xmlgraphics.apache.org/fop/">official |
164 | + : documentation for further information</a>. |
165 | : |
166 | - : @param $output-format The mime of the output format. |
167 | - : @param $xsl-fo-document The XSL-FO document from which the output should be generated. <a href="http://www.w3schools.com/xslfo/xslfo_intro.asp">More information about XSL-FO documents.</a>. |
168 | - : @param $classpath This parameter is not used, hence the deprecation of this function. |
169 | - : @return The generated output document. |
170 | - : @error xsl-fo:VM001 If zorba was unable to start the JVM. |
171 | - : @error xsl-fo:JAVA-EXCEPTION If Apache FOP throws an exception - i.e. if the input format is not correct/supported. |
172 | - : @deprecated |
173 | - :) |
174 | -declare function xsl-fo:generator($output-format as xs:string, $xsl-fo-document as node(), $classpath as xs:string+) as xs:base64Binary { |
175 | - xsl-fo:generator-impl($output-format, $xsl-fo-document) |
176 | -}; |
177 | - |
178 | -(:~ |
179 | - : The function behaves like <a href="#generator#3">generator#3</a>, but tries to find the needed Java libraries itself. |
180 | - : <br /> |
181 | - : On a Mac OS X computer, it should be sufficient to install Apache FOP via Mac Ports.<br /> |
182 | - : On Ubuntu it should be sufficient to install the fop packages via apt-get.<br /> |
183 | - : On Windows, the classpath needs to be set manually using <a href="#generator#3">generator#3</a>. |
184 | - : <br /> |
185 | + : This function tries to find the needed Java libraries itself.<p/> |
186 | + : On a Mac OS X computer, it should be sufficient to install Apache FOP via Mac |
187 | + : Ports.<p/> |
188 | + : On Ubuntu it should be sufficient to install the fop packages via apt-get.<p/> |
189 | + : On Windows, the classpath needs to be set manually using |
190 | + : <a href="#generator#3">generator#3</a>.<p/> |
191 | : This function tries to find the jar files via environment variables. The user can set the |
192 | : variable FOP_HOME to the root directory of an Apache FOP distribution. If you have all |
193 | : JAR files in the same directory, you can set the environment variable FOP_LIB_DIR to this |
194 | : directory. |
195 | : |
196 | - : @param $output-format The mime of the output format, to tell Apache FOP which kind of document it should |
197 | - : create. |
198 | + : @param $output-format The mime of the output format, to tell Apache FOP which |
199 | + : kind of document it should create. |
200 | : @param $xsl-fo-document The XSL-FO document from which the output should be generated. |
201 | + : |
202 | : @return The generated output document. |
203 | - : @error xsl-fo:VM001 If zorba was unable to start the JVM. |
204 | - : @error xsl-fo:JAVA-EXCEPTION If Apache FOP throws an exception - i.e. if the input format is not correct/supported. |
205 | + : @error xsl-fo:JVM-NOT-STARTED If zorba was unable to start the JVM. |
206 | + : @error xsl-fo:JAVA-EXCEPTION If Apache FOP throws an exception - i.e. if the |
207 | + : input format is not correct/supported. |
208 | : @error xsl-fo:JAR-NOT-FOUND If a needed Java library could not be found. |
209 | :) |
210 | declare function xsl-fo:generator($output-format as xs:string, $xsl-fo-document as node()) as xs:base64Binary { |
211 | |
212 | === renamed directory 'src/com/zorba-xquery/www/modules/xsl-fo.xq.src' => 'src/xsl-fo.xq.src' |
213 | === modified file 'src/xsl-fo.xq.src/xslfo.cpp' |
214 | --- src/com/zorba-xquery/www/modules/xsl-fo.xq.src/xslfo.cpp 2013-07-31 22:05:37 +0000 |
215 | +++ src/xsl-fo.xq.src/xslfo.cpp 2013-09-19 20:45:27 +0000 |
216 | @@ -33,7 +33,7 @@ |
217 | |
218 | #include "JavaVMSingleton.h" |
219 | |
220 | -#define XSL_MODULE_NAMESPACE "http://www.zorba-xquery.com/modules/xsl-fo" |
221 | +#define XSL_MODULE_NAMESPACE "http://zorba.io/modules/xsl-fo" |
222 | |
223 | class JavaException { |
224 | }; |
225 | @@ -236,8 +236,8 @@ |
226 | Item lRes( theFactory->createBase64Binary(base64S.data(), base64S.size(), true) ); |
227 | return ItemSequence_t(new SingletonItemSequence(lRes)); |
228 | } catch (zorba::jvm::VMOpenException&) { |
229 | - Item lQName = theFactory->createQName("http://www.zorba-xquery.com/modules/xsl-fo", |
230 | - "VM001"); |
231 | + Item lQName = theFactory->createQName("http://zorba.io/modules/xsl-fo", |
232 | + "JVM-NOT-STARTED"); |
233 | throw USER_EXCEPTION(lQName, "Could not start the Java VM (is the classpath set?)"); |
234 | } catch (JavaException&) { |
235 | jclass stringWriterClass = env->FindClass("java/io/StringWriter"); |
236 | @@ -261,7 +261,7 @@ |
237 | std::string err(""); |
238 | err += s.str(); |
239 | env->ExceptionClear(); |
240 | - Item lQName = theFactory->createQName("http://www.zorba-xquery.com/modules/xsl-fo", |
241 | + Item lQName = theFactory->createQName("http://zorba.io/modules/xsl-fo", |
242 | "JAVA-EXCEPTION"); |
243 | throw USER_EXCEPTION(lQName, err); |
244 | } |
245 | |
246 | === modified file 'test/Queries/data-formatting/xslfo.xq' |
247 | --- test/Queries/data-formatting/xslfo.xq 2012-05-08 21:07:27 +0000 |
248 | +++ test/Queries/data-formatting/xslfo.xq 2013-09-19 20:45:27 +0000 |
249 | @@ -1,4 +1,4 @@ |
250 | -import module namespace fop = "http://www.zorba-xquery.com/modules/xsl-fo"; |
251 | +import module namespace fop = "http://zorba.io/modules/xsl-fo"; |
252 | import module namespace file = "http://expath.org/ns/file"; |
253 | |
254 | declare namespace fo = "http://www.w3.org/1999/XSL/Format"; |
I think it makes sense to remove the Deprecated functions entirely at this point.