Merge branch 'master' into core-updates-frozen
[jackhill/guix/guix.git] / gnu / packages / xml.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr>
4 ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
6 ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2015, 2016, 2017 Mark H Weaver <mhw@netris.org>
8 ;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2015 Raimon Grau <raimonster@gmail.com>
10 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
11 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
12 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
13 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
14 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
15 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
16 ;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
17 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
18 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
19 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
20 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
21 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
22 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
23 ;;; Copyright © 2018 Jack Hill <jackhill@jackhill.us>
24 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
25 ;;; Copyright © 2020 Paul Garlick <pgarlick@tourbillion-technology.com>
26 ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
27 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
28 ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
29 ;;; Copyright © 2021 Michael Rohleder <mike@rohleder.de>
30 ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
31 ;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
32 ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
33 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
34 ;;; Copyright © 2021 David Larsson <david.larsson@selfhosted.xyz>
35 ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
36 ;;;
37 ;;; This file is part of GNU Guix.
38 ;;;
39 ;;; GNU Guix is free software; you can redistribute it and/or modify it
40 ;;; under the terms of the GNU General Public License as published by
41 ;;; the Free Software Foundation; either version 3 of the License, or (at
42 ;;; your option) any later version.
43 ;;;
44 ;;; GNU Guix is distributed in the hope that it will be useful, but
45 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
46 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47 ;;; GNU General Public License for more details.
48 ;;;
49 ;;; You should have received a copy of the GNU General Public License
50 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51
52 (define-module (gnu packages xml)
53 #:use-module (gnu packages)
54 #:use-module (gnu packages base)
55 #:use-module (gnu packages autotools)
56 #:use-module (gnu packages check)
57 #:use-module (gnu packages compression)
58 #:use-module (gnu packages curl)
59 #:use-module (gnu packages docbook)
60 #:use-module (gnu packages documentation)
61 #:use-module (gnu packages gettext)
62 #:use-module (gnu packages glib)
63 #:use-module (gnu packages gnome)
64 #:use-module (gnu packages gnupg)
65 #:use-module (gnu packages graphviz)
66 #:use-module (gnu packages gtk)
67 #:use-module (gnu packages java)
68 #:use-module (gnu packages nss)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages perl-check)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages tls)
73 #:use-module (gnu packages web)
74 #:use-module ((guix licenses) #:prefix license:)
75 #:use-module (guix packages)
76 #:use-module (guix download)
77 #:use-module (guix git-download)
78 #:use-module (guix build-system ant)
79 #:use-module (guix build-system cmake)
80 #:use-module (guix build-system gnu)
81 #:use-module (guix build-system meson)
82 #:use-module (guix build-system perl)
83 #:use-module (guix build-system python)
84 #:use-module (guix utils)
85 #:use-module (gnu packages linux)
86 #:use-module (gnu packages pkg-config))
87
88 (define-public libxmlb
89 (package
90 (name "libxmlb")
91 (version "0.1.15")
92 (source
93 (origin
94 (method git-fetch)
95 (uri
96 (git-reference
97 (url "https://github.com/hughsie/libxmlb")
98 (commit version)))
99 (file-name (git-file-name name version))
100 (sha256
101 (base32 "1mb73pnfwqc4mm0lm16yfn0lj495h8hcciprb2v6wgy3ifnnjxib"))))
102 (build-system meson-build-system)
103 (arguments
104 `(#:glib-or-gtk? #t))
105 (native-inputs
106 `(("gobject-introspection" ,gobject-introspection)
107 ("gtk-doc" ,gtk-doc/stable)
108 ("pkg-config" ,pkg-config)))
109 (inputs
110 `(("appstream-glib" ,appstream-glib)
111 ("glib" ,glib)))
112 (synopsis "Library to help create and query binary XML blobs")
113 (description "Libxmlb library takes XML source, and converts it to a
114 structured binary representation with a deduplicated string table; where the
115 strings have the NULs included. This allows an application to mmap the binary
116 XML file, do an XPath query and return some strings without actually parsing
117 the entire document.")
118 (home-page "https://github.com/hughsie/libxmlb")
119 (license license:lgpl2.1+)))
120
121 (define-public expat
122 (package
123 (name "expat")
124 (version "2.4.1")
125 (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
126 (origin
127 (method url-fetch)
128 (uri (list (string-append "mirror://sourceforge/expat/expat/"
129 version "/expat-" version ".tar.xz")
130 (string-append
131 "https://github.com/libexpat/libexpat/releases/download/R_"
132 (string-map dot->underscore version)
133 "/expat-" version ".tar.xz")))
134 (sha256
135 (base32
136 "0spvyb9d3hijs4ys3x64cfmilsynl8kv6clfahv8d4lvp86js0yg")))))
137 (build-system gnu-build-system)
138 (arguments
139 '(#:phases (modify-phases %standard-phases
140 (add-after 'install 'move-static-library
141 (lambda* (#:key outputs #:allow-other-keys)
142 (let ((out (assoc-ref outputs "out"))
143 (static (assoc-ref outputs "static")))
144 (mkdir-p (string-append static "/lib"))
145 (link (string-append out "/lib/libexpat.a")
146 (string-append static "/lib/libexpat.a"))
147 (delete-file (string-append out "/lib/libexpat.a"))
148 (substitute* (string-append out "/lib/libexpat.la")
149 (("old_library=.*")
150 "old_library=''"))))))))
151 (outputs '("out" "static"))
152 (home-page "https://libexpat.github.io/")
153 (synopsis "Stream-oriented XML parser library written in C")
154 (description
155 "Expat is an XML parser library written in C. It is a
156 stream-oriented parser in which an application registers handlers for
157 things the parser might find in the XML document (like start tags).")
158 (license license:expat)))
159
160 (define-public libebml
161 (package
162 (name "libebml")
163 (version "1.4.2")
164 (source
165 (origin
166 (method url-fetch)
167 (uri (string-append "https://dl.matroska.org/downloads/libebml/"
168 "libebml-" version ".tar.xz"))
169 (sha256
170 (base32 "1wmri5c94b02q2z32bqlpfs4vbw0n0c602321wigna2qw1y27is1"))))
171 (build-system cmake-build-system)
172 (arguments
173 `(#:configure-flags
174 (list "-DBUILD_SHARED_LIBS=YES")
175 #:tests? #f)) ; no test suite
176 (home-page "https://matroska-org.github.io/libebml/")
177 (synopsis "C++ library to parse EBML files")
178 (description "libebml is a C++ library to read and write @dfn{EBML}
179 (Extensible Binary Meta Language) files. EBML was designed to be a simplified
180 binary extension of XML for the purpose of storing and manipulating data in a
181 hierarchical form with variable field lengths.")
182 (license license:lgpl2.1)))
183
184 (define-public libxml2
185 (package
186 (name "libxml2")
187 (version "2.9.12")
188 (source (origin
189 (method url-fetch)
190 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
191 version ".tar.gz"))
192 (sha256
193 (base32
194 "14hxwzmf5xqppx77z7i0ni9lpzg1a84dqpf8j8l1fvy570g6imn8"))
195 (patches (search-patches "libxml2-parent-pointers.patch"
196 "libxml2-terminating-newline.patch"
197 "libxml2-xpath-recursion-limit.patch"))))
198 (build-system gnu-build-system)
199 (outputs '("out" "static" "doc"))
200 (arguments
201 `(#:phases (modify-phases %standard-phases
202 (add-after 'install 'use-other-outputs
203 (lambda* (#:key outputs #:allow-other-keys)
204 (let ((src (assoc-ref outputs "out"))
205 (doc (string-append (assoc-ref outputs "doc") "/share"))
206 (dst (string-append (assoc-ref outputs "static")
207 "/lib")))
208 (mkdir-p doc)
209 (mkdir-p dst)
210 (for-each (lambda (dir)
211 (rename-file (string-append src "/share/" dir)
212 (string-append doc "/" dir)))
213 '("doc" "gtk-doc"))
214 (for-each (lambda (ar)
215 (rename-file ar (string-append dst "/"
216 (basename ar))))
217 (find-files (string-append src "/lib") "\\.a$"))
218
219 ;; Remove reference to the static library from the .la
220 ;; file such that Libtool does the right thing when both
221 ;; the shared and static variants are available.
222 (substitute* (string-append src "/lib/libxml2.la")
223 (("^old_library='libxml2.a'") "old_library=''"))))))))
224 (home-page "http://www.xmlsoft.org/")
225 (synopsis "C parser for XML")
226 (inputs `(("xz" ,xz)))
227 (propagated-inputs `(("zlib" ,zlib))) ; libxml2.la says '-lz'.
228 (native-inputs `(("perl" ,perl)))
229 ;; $XML_CATALOG_FILES lists 'catalog.xml' files found in under the 'xml'
230 ;; sub-directory of any given package.
231 (native-search-paths (list (search-path-specification
232 (variable "XML_CATALOG_FILES")
233 (separator " ")
234 (files '("xml"))
235 (file-pattern "^catalog\\.xml$")
236 (file-type 'regular))))
237 (search-paths native-search-paths)
238 (description
239 "Libxml2 is the XML C parser and toolkit developed for the Gnome
240 project (but it is usable outside of the Gnome platform).")
241 (license license:x11)))
242
243 (define-public libxml2-xpath0
244 (package/inherit libxml2
245 (name "libxml2-xpath0")
246 (source (origin
247 (inherit (package-source libxml2))
248 (patches (append (search-patches
249 "libxml2-xpath0-Add-option-xpath0.patch")
250 (origin-patches (package-source libxml2))))))
251 (description
252 "Libxml2-xpath0 is like libxml2 but with a patch applied that
253 provides an @code{--xpath0} option to @command{xmllint} that enables it
254 to output XPath results with a null delimiter.")))
255
256 (define-public libxlsxwriter
257 (package
258 (name "libxlsxwriter")
259 (version "1.0.3")
260 (source
261 (origin
262 (method git-fetch)
263 (uri (git-reference
264 (url "https://github.com/jmcnamara/libxlsxwriter")
265 (commit (string-append "RELEASE_" version))))
266 (file-name (git-file-name name version))
267 (sha256
268 (base32 "14c5rgx87nhzasr0j7mcfr1w7ifz0gmdiqy2xq59di5xvcdrpxpv"))
269 (modules '((guix build utils)))
270 (snippet
271 ;; Remove bundled minizip source
272 '(begin
273 (delete-file-recursively "third_party/minizip")
274 #t))))
275 (build-system gnu-build-system)
276 (arguments
277 `(#:test-target "test"
278 #:make-flags
279 (list (string-append "CC=" ,(cc-for-target))
280 (string-append "PREFIX=" (assoc-ref %outputs "out"))
281 "USE_STANDARD_TMPFILE=1"
282 "USE_SYSTEM_MINIZIP=1")
283 #:phases
284 (modify-phases %standard-phases
285 (delete 'configure)))) ; no configure script
286 (native-inputs
287 `(("python-pytest" ,python-pytest)))
288 (inputs
289 `(("minizip" ,minizip)))
290 (home-page "https://github.com/jmcnamara/libxlsxwriter")
291 (synopsis "C library for creating Excel XLSX files")
292 (description
293 "Libxlsxwriter is a C library that can be used to write text, numbers,
294 formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
295 (license (list license:bsd-2
296 license:public-domain)))) ; third_party/md5
297
298 (define-public python-libxml2
299 (package/inherit libxml2
300 (name "python-libxml2")
301 (source (origin
302 (inherit (package-source libxml2))
303 (patches
304 (append (search-patches "python-libxml2-utf8.patch")
305 (origin-patches (package-source libxml2))))))
306 (build-system python-build-system)
307 (outputs '("out"))
308 (arguments
309 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
310 #:tests? #f
311 #:phases
312 (modify-phases %standard-phases
313 (add-before
314 'build 'configure
315 (lambda* (#:key inputs #:allow-other-keys)
316 (chdir "python")
317 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
318 "cross-libc" "libc")))
319 (libxml2 (assoc-ref inputs "libxml2")))
320 (substitute* "setup.py"
321 ;; For 'libxml2/libxml/tree.h'.
322 (("ROOT = r'/usr'")
323 (format #f "ROOT = r'~a'" libxml2))
324 ;; For 'iconv.h'.
325 (("/opt/include")
326 (string-append glibc "/include")))))))))
327 (inputs `(("libxml2" ,libxml2)))
328 (synopsis "Python bindings for the libxml2 library")))
329
330 (define-public python2-libxml2
331 (package-with-python2 python-libxml2))
332
333 (define-public libxslt
334 (package
335 (name "libxslt")
336 (version "1.1.34")
337 (source (origin
338 (method url-fetch)
339 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
340 version ".tar.gz"))
341 (sha256
342 (base32
343 "0zrzz6kjdyavspzik6fbkpvfpbd25r2qg6py5nnjaabrsr3bvccq"))
344 (patches (search-patches "libxslt-generated-ids.patch"))))
345 (build-system gnu-build-system)
346 (arguments
347 `(#:phases (modify-phases %standard-phases
348 (add-before 'check 'disable-fuzz-tests
349 (lambda _
350 ;; Disable libFuzzer tests, because they require
351 ;; instrumentation builds of libxml2 and libxslt.
352 (substitute* "tests/Makefile"
353 (("exslt plugins fuzz")
354 "exslt plugins"))
355 #t)))))
356 (home-page "http://xmlsoft.org/XSLT/index.html")
357 (synopsis "C library for applying XSLT stylesheets to XML documents")
358 (inputs `(("libgcrypt" ,libgcrypt)
359 ("libxml2" ,libxml2)
360 ("python" ,python-minimal-wrapper)
361 ("zlib" ,zlib)
362 ("xz" ,xz)))
363 (native-inputs
364 `(("pkg-config" ,pkg-config)))
365 (description
366 "Libxslt is an XSLT C library developed for the GNOME project. It is
367 based on libxml for XML parsing, tree manipulation and XPath support.")
368 (license license:x11)))
369
370 (define-public openjade
371 (package
372 (name "openjade")
373 (version "1.3.2")
374 (source (origin
375 (method url-fetch)
376 (uri (string-append "mirror://sourceforge/openjade/openjade/"
377 version "/" name "-" version ".tar.gz"))
378 (sha256
379 (base32
380 "1l92sfvx1f0wmkbvzv1385y1gb3hh010xksi1iyviyclrjb7jb8x"))))
381 (build-system gnu-build-system)
382 (arguments
383 `(#:configure-flags
384 (list (string-append "--enable-spincludedir="
385 (assoc-ref %build-inputs "opensp")
386 "/include/OpenSP")
387 (string-append "--enable-splibdir="
388 (assoc-ref %build-inputs "opensp") "/lib")
389 ;; Workaround segfaults in OpenJade (see:
390 ;; https://bugs.launchpad.net/ubuntu/+source/openjade/+bug/1869734).
391 "CXXFLAGS=-O0")
392 #:parallel-build? #f ;build fails otherwise
393 ;; The test suite fails with diff errors between the actual and
394 ;; expected results, like: (char<? #\a #\A) returning #t rather than
395 ;; #f (see: https://sourceforge.net/p/openjade/bugs/150/).
396 #:tests? #f
397 #:phases
398 (modify-phases %standard-phases
399 (add-after 'unpack 'replace-deprecated-getopt
400 ;; See: https://sourceforge.net/p/openjade/bugs/140/.
401 (lambda _
402 (substitute* "msggen.pl"
403 (("use POSIX;") "use POSIX;\nuse Getopt::Std;")
404 (("do 'getopts.pl';") "")
405 (("&Getopts") "getopts"))
406 #t))
407 (add-after 'replace-deprecated-getopt 'fix-locale-lookup
408 ;; See: https://sourceforge.net/p/openjade/bugs/149/.
409 (lambda _
410 (substitute* "testsuite/expr-lang.dsl"
411 (("\\(language \"EN\" \"US\"\\)")
412 "(language \"EN\" \"US.UTF-8\")"))
413 #t))
414 (add-after 'install 'install-doc
415 (lambda* (#:key outputs #:allow-other-keys)
416 ;; TODO: Generate the manpage from source, with
417 ;; openjade-bootstrap and jadetex. See the file docsrc/Makefile.
418 (let* ((out (assoc-ref outputs "out"))
419 (man1 (string-append out "/share/man/man1")))
420 (install-file "docsrc/openjade.1" man1)
421 #t)))
422 (add-after 'install-doc 'install-dtds
423 (lambda* (#:key outputs #:allow-other-keys)
424 (let* ((out (assoc-ref outputs "out"))
425 (dtd (string-append out "/sgml/dtd")))
426 (mkdir-p dtd)
427 (copy-recursively "dsssl" dtd)
428 #t)))
429 (delete 'check)
430 (add-after 'install 'check
431 (lambda* (#:key tests? out #:allow-other-keys)
432 (if tests?
433 (with-directory-excursion "testsuite"
434 (invoke "make"))
435 (format #t "test suite not run~%"))
436 #t)))))
437 (inputs
438 `(("opensp" ,opensp)))
439 (native-inputs
440 `(("perl" ,perl)))
441 (home-page "http://openjade.sourceforge.net/")
442 (synopsis "ISO/IEC 10179:1996 standard DSSSL language implementation")
443 (description "OpenJade is an implementation of Document Style Semantics
444 and Specification Language (DSSSL), a style language to format SGML or XML
445 documents. It contains backends for various formats such as RTF, HTML, TeX,
446 MIF, SGML2SGML, and FOT.")
447 (license (license:non-copyleft "file://COPYING"
448 "See COPYING in the distribution."))))
449
450 (define-public perl-graph-readwrite
451 (package
452 (name "perl-graph-readwrite")
453 (version "2.09")
454 (source
455 (origin
456 (method url-fetch)
457 (uri (string-append
458 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
459 version
460 ".tar.gz"))
461 (sha256
462 (base32
463 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
464 (build-system perl-build-system)
465 (propagated-inputs
466 `(("perl-graph" ,perl-graph)
467 ("perl-parse-yapp" ,perl-parse-yapp)
468 ("perl-xml-parser" ,perl-xml-parser)
469 ("perl-xml-writer" ,perl-xml-writer)))
470 (home-page "https://metacpan.org/release/Graph-ReadWrite")
471 (synopsis "Modules for reading and writing directed graphs")
472 (description "This is a collection of perl classes for reading and writing
473 directed graphs in a variety of file formats. The graphs are represented in
474 Perl using Jarkko Hietaniemi's @code{Graph} classes.
475
476 There are two base classes. @code{Graph::Reader} is the base class for classes
477 which read a graph file and create an instance of the Graph class.
478 @code{Graph::Writer} is the base class for classes which take an instance of
479 the @code{Graph} class and write it out in a specific file format.")
480 (license license:perl-license)))
481
482 (define-public perl-xml-atom
483 (package
484 (name "perl-xml-atom")
485 (version "0.43")
486 (source (origin
487 (method url-fetch)
488 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
489 "XML-Atom-" version ".tar.gz"))
490 (sha256
491 (base32
492 "0b8bpdnvz9sqwjhjkydbzy4karb7nn6i15b8g4mczrznlsb3hnaf"))))
493 (build-system perl-build-system)
494 (arguments
495 `(#:phases
496 (modify-phases %standard-phases
497 (add-before 'check 'set-perl-search-path
498 (lambda _
499 (setenv "PERL5LIB"
500 (string-append (getcwd) ":"
501 (getenv "PERL5LIB")))
502 #t)))))
503 (native-inputs
504 ;; TODO package: perl-datetime-format-atom
505 `(("perl-html-tagset" ,perl-html-tagset)
506 ("perl-module-build-tiny" ,perl-module-build-tiny)
507 ("perl-module-install" ,perl-module-install)))
508 (propagated-inputs
509 `(("perl-class-data-inheritable" ,perl-class-data-inheritable)
510 ("perl-datetime" ,perl-datetime)
511 ("perl-datetime-timezone" ,perl-datetime-timezone)
512 ("perl-digest-sha1" ,perl-digest-sha1)
513 ("perl-libwww" ,perl-libwww)
514 ("perl-uri" ,perl-uri)
515 ("perl-xml-libxml" ,perl-xml-libxml)
516 ("perl-xml-xpath" ,perl-xml-xpath)))
517 (home-page "https://metacpan.org/release/XML-Atom")
518 (synopsis "Atom feed and API implementation")
519 (description
520 "Atom is a syndication, API, and archiving format for weblogs and other data.
521 @code{XML::Atom} implements the feed format as well as a client for the API.")
522 (license license:perl-license)))
523
524 (define-public perl-xml-descent
525 (package
526 (name "perl-xml-descent")
527 (version "1.04")
528 (source (origin
529 (method url-fetch)
530 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
531 "XML-Descent-" version ".tar.gz"))
532 (sha256
533 (base32
534 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
535 (build-system perl-build-system)
536 (native-inputs
537 `(("perl-module-build" ,perl-module-build)))
538 (propagated-inputs
539 `(("perl-test-differences" ,perl-test-differences)
540 ("perl-xml-tokeparser" ,perl-xml-tokeparser)))
541 (home-page "https://metacpan.org/release/XML-Descent")
542 (synopsis "Recursive descent XML parsing")
543 (description
544 "The conventional models for parsing XML are either @dfn{DOM}
545 (a data structure representing the entire document tree is created) or
546 @dfn{SAX} (callbacks are issued for each element in the XML).
547
548 XML grammar is recursive - so it's nice to be able to write recursive
549 parsers for it. @code{XML::Descent} allows such parsers to be created.")
550 (license license:perl-license)))
551
552 (define-public perl-xml-parser
553 (package
554 (name "perl-xml-parser")
555 (version "2.46")
556 (source (origin
557 (method url-fetch)
558 (uri (string-append
559 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
560 version ".tar.gz"))
561 (sha256
562 (base32
563 "0pai3ik47q7rgnix9644c673fwydz52gqkxr9kxwq765j4j36cfk"))))
564 (build-system perl-build-system)
565 (arguments `(#:make-maker-flags
566 (let ((expat (assoc-ref %build-inputs "expat")))
567 (list (string-append "EXPATLIBPATH=" expat "/lib")
568 (string-append "EXPATINCPATH=" expat "/include")))))
569 (inputs `(("expat" ,expat)))
570 (license license:perl-license)
571 (synopsis "Perl bindings to the Expat XML parsing library")
572 (description
573 "This module provides ways to parse XML documents. It is built on top of
574 XML::Parser::Expat, which is a lower level interface to James Clark's expat
575 library. Each call to one of the parsing methods creates a new instance of
576 XML::Parser::Expat which is then used to parse the document. Expat options
577 may be provided when the XML::Parser object is created. These options are
578 then passed on to the Expat object on each parse call. They can also be given
579 as extra arguments to the parse methods, in which case they override options
580 given at XML::Parser creation time.")
581 (home-page "https://metacpan.org/release/XML-Parser")))
582
583 (define-public perl-xml-tokeparser
584 (package
585 (name "perl-xml-tokeparser")
586 (version "0.05")
587 (source (origin
588 (method url-fetch)
589 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
590 "XML-TokeParser-" version ".tar.gz"))
591 (sha256
592 (base32
593 "1hnpwb3lh6cbgwvjjgqzcp6jm4mp612qn6ili38adc9nhkwv8fc5"))))
594 (build-system perl-build-system)
595 (propagated-inputs `(("perl-xml-parser" ,perl-xml-parser)))
596 (home-page "https://metacpan.org/release/XML-TokeParser")
597 (synopsis "Simplified interface to XML::Parser")
598 (description
599 "@code{XML::TokeParser} provides a procedural (\"pull mode\") interface
600 to @code{XML::Parser} in much the same way that Gisle Aas'
601 @code{HTML::TokeParser} provides a procedural interface to @code{HTML::Parser}.
602 @code{XML::TokeParser} splits its XML input up into \"tokens\", each
603 corresponding to an @code{XML::Parser} event.")
604 (license license:perl-license)))
605
606 (define-public perl-libxml
607 (package
608 (name "perl-libxml")
609 (version "0.08")
610 (source (origin
611 (method url-fetch)
612 (uri (string-append
613 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
614 version ".tar.gz"))
615 (sha256
616 (base32
617 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
618 (build-system perl-build-system)
619 (propagated-inputs
620 `(("perl-xml-parser" ,perl-xml-parser)))
621 (license license:perl-license)
622 (synopsis "Perl modules for working with XML")
623 (description
624 "libxml-perl is a collection of smaller Perl modules, scripts, and
625 documents for working with XML in Perl. libxml-perl software works in
626 combination with @code{XML::Parser}, PerlSAX, @code{XML::DOM},
627 @code{XML::Grove}, and others.")
628 (home-page "https://metacpan.org/release/libxml-perl")))
629
630 (define-public perl-xml-libxml
631 (package
632 (name "perl-xml-libxml")
633 (version "2.0134")
634 (source
635 (origin
636 (method url-fetch)
637 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
638 "XML-LibXML-" version ".tar.gz"))
639 (sha256
640 (base32
641 "1ks69xymv6zkj7hvaymjvb78ch81abri7kg4zrwxhdfsqb8a9g7h"))))
642 (build-system perl-build-system)
643 (propagated-inputs
644 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
645 ("perl-xml-sax" ,perl-xml-sax)))
646 (inputs
647 `(("libxml2" ,libxml2)))
648 (home-page "https://metacpan.org/release/XML-LibXML")
649 (synopsis "Perl interface to libxml2")
650 (description "This module implements a Perl interface to the libxml2
651 library which provides interfaces for parsing and manipulating XML files. This
652 module allows Perl programmers to make use of the highly capable validating
653 XML parser and the high performance DOM implementation.")
654 (license license:perl-license)))
655
656 (define-public perl-xml-libxml-simple
657 (package
658 (name "perl-xml-libxml-simple")
659 (version "1.01")
660 (source (origin
661 (method url-fetch)
662 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
663 "XML-LibXML-Simple-" version ".tar.gz"))
664 (sha256
665 (base32
666 "19k50d80i9dipsl6ln0f4awv9wmdg0xm3d16z8mngmvh9c8ci66d"))))
667 (build-system perl-build-system)
668 (propagated-inputs
669 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
670 ("perl-xml-libxml" ,perl-xml-libxml)))
671 (home-page "https://metacpan.org/release/XML-LibXML-Simple")
672 (synopsis "XML::LibXML based XML::Simple clone")
673 (description
674 "This package provides the same API as @code{XML::Simple} but is based on
675 @code{XML::LibXML}.")
676 (license license:perl-license)))
677
678 (define-public perl-xml-libxslt
679 (package
680 (name "perl-xml-libxslt")
681 (version "1.96")
682 (source
683 (origin
684 (method url-fetch)
685 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
686 "XML-LibXSLT-" version ".tar.gz"))
687 (sha256
688 (base32
689 "0wyl8klgr65j8y8fzgwz9jlvfjwvxazna8j3dg9gksd2v973fpia"))))
690 (build-system perl-build-system)
691 (inputs
692 `(("libxslt" ,libxslt)))
693 (propagated-inputs
694 `(("perl-xml-libxml" ,perl-xml-libxml)))
695 (home-page "https://metacpan.org/release/XML-LibXSLT")
696 (synopsis "Perl bindings to GNOME libxslt library")
697 (description "This Perl module is an interface to the GNOME project's
698 libxslt library.")
699 (license license:perl-license)))
700
701 (define-public perl-xml-namespacesupport
702 (package
703 (name "perl-xml-namespacesupport")
704 (version "1.12")
705 (source
706 (origin
707 (method url-fetch)
708 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
709 "XML-NamespaceSupport-" version ".tar.gz"))
710 (sha256
711 (base32
712 "1vz5pbi4lm5fhq2slrs2hlp6bnk29863abgjlcx43l4dky2rbsa7"))))
713 (build-system perl-build-system)
714 (home-page "https://metacpan.org/release/XML-NamespaceSupport")
715 (synopsis "XML namespace support class")
716 (description "This module offers a simple to process namespaced XML
717 names (unames) from within any application that may need them. It also helps
718 maintain a prefix to namespace URI map, and provides a number of basic
719 checks.")
720 (license license:perl-license)))
721
722 (define-public perl-xml-rss
723 (package
724 (name "perl-xml-rss")
725 (version "1.62")
726 (source (origin
727 (method url-fetch)
728 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
729 "XML-RSS-" version ".tar.gz"))
730 (sha256
731 (base32
732 "0klb8ghd405pdkmn25lp3i4j2lfydz8w581sk51p3zy788s0c9yk"))))
733 (build-system perl-build-system)
734 (native-inputs
735 `(("perl-module-build" ,perl-module-build)
736 ("perl-test-manifest" ,perl-test-manifest)
737 ("perl-test-differences" ,perl-test-differences)
738 ("perl-test-pod" ,perl-test-pod)
739 ("perl-test-pod-coverage" ,perl-test-pod-coverage)))
740 ;; XXX: The test which uses this modules does not run, even when it is included
741 ;; it is ignored. ("perl-test-trailingspace" ,perl-test-trailingspace)
742 (inputs
743 `(("perl-datetime" ,perl-datetime)
744 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
745 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
746 ("perl-html-parser" ,perl-html-parser)
747 ("perl-xml-parser" ,perl-xml-parser)))
748 (home-page "https://metacpan.org/release/XML-RSS")
749 (synopsis "Creates and updates RSS files")
750 (description
751 "This module provides a basic framework for creating and maintaining
752 RDF Site Summary (RSS) files. This distribution also contains many examples
753 that allow you to generate HTML from an RSS, convert between 0.9, 0.91, and
754 1.0 version, and more.")
755 (license license:perl-license)))
756
757 (define-public perl-xml-sax
758 (package
759 (name "perl-xml-sax")
760 (version "1.02")
761 (source
762 (origin
763 (method url-fetch)
764 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
765 "XML-SAX-" version ".tar.gz"))
766 (sha256
767 (base32 "0am13vnv8qsjafr5ljakwnkhlwpk15sga02z8mxsg9is0j3w61j5"))))
768 (build-system perl-build-system)
769 (propagated-inputs
770 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
771 ("perl-xml-sax-base" ,perl-xml-sax-base)))
772 (arguments
773 `(#:phases (modify-phases %standard-phases
774 (add-before
775 'install 'augment-path
776 ;; The install target tries to load the newly-installed
777 ;; XML::SAX module, but can't find it, so we need to tell
778 ;; perl where to look.
779 (lambda* (#:key outputs #:allow-other-keys)
780 (setenv "PERL5LIB"
781 (string-append (getenv "PERL5LIB") ":"
782 (assoc-ref outputs "out")
783 "/lib/perl5/site_perl"))
784 #t)))))
785 (home-page "https://metacpan.org/release/XML-SAX")
786 (synopsis "Perl API for XML")
787 (description "XML::SAX consists of several framework classes for using and
788 building Perl SAX2 XML parsers, filters, and drivers.")
789 (license license:perl-license)))
790
791 (define-public perl-xml-sax-base
792 (package
793 (name "perl-xml-sax-base")
794 (version "1.09")
795 (source
796 (origin
797 (method url-fetch)
798 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
799 "XML-SAX-Base-" version ".tar.gz"))
800 (sha256
801 (base32
802 "1l1ai9g1z11ja7mvnfl5mj346r13jyckbg9qlw6c2izglidkbjv6"))))
803 (build-system perl-build-system)
804 (home-page "https://metacpan.org/release/XML-SAX-Base")
805 (synopsis "Base class for SAX Drivers and Filters")
806 (description "This module has a very simple task - to be a base class for
807 PerlSAX drivers and filters. Its default behaviour is to pass the input
808 directly to the output unchanged. It can be useful to use this module as a
809 base class so you don't have to, for example, implement the characters()
810 callback.")
811 (license license:perl-license)))
812
813 (define-public perl-xml-simple
814 (package
815 (name "perl-xml-simple")
816 (version "2.25")
817 (source (origin
818 (method url-fetch)
819 (uri (string-append
820 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
821 version ".tar.gz"))
822 (sha256
823 (base32
824 "1y6vh328zrh085d40852v4ij2l4g0amxykswxd1nfhd2pspds7sk"))))
825 (build-system perl-build-system)
826 (propagated-inputs
827 `(("perl-xml-parser" ,perl-xml-parser)
828 ("perl-xml-sax" ,perl-xml-sax)))
829 (license license:perl-license)
830 (synopsis "Perl module for easy reading/writing of XML files")
831 (description
832 "The XML::Simple module provides a simple API layer on top of an
833 underlying XML parsing module (either XML::Parser or one of the SAX2
834 parser modules).")
835 (home-page "https://metacpan.org/release/XML-Simple")))
836
837 (define-public perl-xml-regexp
838 (package
839 (name "perl-xml-regexp")
840 (version "0.04")
841 (source (origin
842 (method url-fetch)
843 (uri (string-append
844 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
845 version ".tar.gz"))
846 (sha256
847 (base32
848 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
849 (build-system perl-build-system)
850 (inputs
851 `(("perl-xml-parser" ,perl-xml-parser)))
852 (license license:perl-license)
853 (synopsis "Perl regular expressions for XML tokens")
854 (description
855 "XML::RegExp contains regular expressions for the following XML tokens:
856 BaseChar, Ideographic, Letter, Digit, Extender, CombiningChar, NameChar,
857 EntityRef, CharRef, Reference, Name, NmToken, and AttValue.")
858 (home-page "https://metacpan.org/release/XML-RegExp")))
859
860 (define-public perl-xml-dom
861 (package
862 (name "perl-xml-dom")
863 (version "1.46")
864 (source (origin
865 (method url-fetch)
866 (uri (string-append
867 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
868 version ".tar.gz"))
869 (sha256
870 (base32
871 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
872 (build-system perl-build-system)
873 (propagated-inputs
874 `(("perl-libwww" ,perl-libwww)
875 ("perl-libxml" ,perl-libxml)
876 ("perl-xml-parser" ,perl-xml-parser)
877 ("perl-xml-regexp" ,perl-xml-regexp)))
878 (license license:perl-license)
879 (synopsis
880 "Perl module for building DOM Level 1 compliant document structures")
881 (description
882 "This module extends the XML::Parser module by Clark Cooper. The
883 XML::Parser module is built on top of XML::Parser::Expat, which is a lower
884 level interface to James Clark's expat library. XML::DOM::Parser is derived
885 from XML::Parser. It parses XML strings or files and builds a data structure
886 that conforms to the API of the Document Object Model.")
887 (home-page "https://metacpan.org/release/XML-DOM")))
888
889 (define-public perl-xml-compile-tester
890 (package
891 (name "perl-xml-compile-tester")
892 (version "0.91")
893 (source (origin
894 (method url-fetch)
895 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
896 "XML-Compile-Tester-" version ".tar.gz"))
897 (sha256
898 (base32
899 "1drzwziwi96rfkh48qpw4l225mcbk8ppl2157nj92cslcpwwdk75"))))
900 (build-system perl-build-system)
901 (propagated-inputs
902 `(("perl-log-report" ,perl-log-report)
903 ("perl-test-deep" ,perl-test-deep)))
904 (home-page "https://metacpan.org/release/XML-Compile-Tester")
905 (synopsis "XML::Compile related regression testing")
906 (description
907 "The @code{XML::Compile} module suite has extensive regression testing.
908 This module provide functions which simplify writing tests for
909 @code{XML::Compile} related distributions.")
910 (license license:perl-license)))
911
912 (define-public perl-xml-compile
913 (package
914 (name "perl-xml-compile")
915 (version "1.63")
916 (source (origin
917 (method url-fetch)
918 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
919 "XML-Compile-" version ".tar.gz"))
920 (sha256
921 (base32
922 "0psr5pwsk2biz2bfkigmx04v2rfhs6ybwcfmcrrg7gvh9bpp222b"))))
923 (build-system perl-build-system)
924 (propagated-inputs
925 `(("perl-log-report" ,perl-log-report)
926 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
927 ("perl-xml-libxml" ,perl-xml-libxml)
928 ("perl-scalar-list-utils" ,perl-scalar-list-utils)
929 ("perl-test-deep" ,perl-test-deep)
930 ("perl-types-serialiser" ,perl-types-serialiser)))
931 (home-page "https://metacpan.org/release/XML-Compile")
932 (synopsis "Compilation-based XML processing")
933 (description
934 "@code{XML::Compile} can be used to translate a Perl data-structure into
935 XML or XML into a Perl data-structure, both directions under rigid control by
936 a schema.")
937 (license license:perl-license)))
938
939 (define-public perl-xml-compile-cache
940 (package
941 (name "perl-xml-compile-cache")
942 (version "1.06")
943 (source (origin
944 (method url-fetch)
945 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
946 "XML-Compile-Cache-" version ".tar.gz"))
947 (sha256
948 (base32
949 "181qf1s7ymgi7saph3cf9p6dbxkxyh1ja23na4dchhi8v5mi66sr"))))
950 (build-system perl-build-system)
951 (propagated-inputs
952 `(("perl-log-report" ,perl-log-report)
953 ("perl-xml-compile" ,perl-xml-compile)
954 ("perl-xml-compile-tester" ,perl-xml-compile-tester)
955 ("perl-xml-libxml-simple" ,perl-xml-libxml-simple)))
956 (home-page "https://metacpan.org/release/XML-Compile-Cache")
957 (synopsis "Cache compiled XML translators")
958 (description
959 "This package provides methods to cache compiled XML translators.")
960 (license license:perl-license)))
961
962 (define-public perl-xml-compile-soap
963 (package
964 (name "perl-xml-compile-soap")
965 (version "3.24")
966 (source (origin
967 (method url-fetch)
968 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
969 "XML-Compile-SOAP-" version ".tar.gz"))
970 (sha256
971 (base32
972 "0pkcph562l2ij7rlwlvm58v6y062qsbydfpaz2qnph2ixqy0xfd1"))))
973 (build-system perl-build-system)
974 (propagated-inputs
975 `(("perl-file-slurp-tiny" ,perl-file-slurp-tiny)
976 ("perl-libwww" ,perl-libwww)
977 ("perl-log-report" ,perl-log-report)
978 ("perl-xml-compile" ,perl-xml-compile)
979 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
980 ("perl-xml-compile-tester" ,perl-xml-compile-tester)))
981 (home-page "https://metacpan.org/release/XML-Compile-SOAP")
982 (synopsis "Base-class for SOAP implementations")
983 (description
984 "This module provides a class to handle the SOAP protocol. The first
985 implementation is @url{SOAP1.1,
986 http://www.w3.org/TR/2000/NOTE-SOAP-20000508/}, which is still most often
987 used.")
988 (license license:perl-license)))
989
990 (define-public perl-xml-compile-wsdl11
991 (package
992 (name "perl-xml-compile-wsdl11")
993 (version "3.07")
994 (source (origin
995 (method url-fetch)
996 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
997 "XML-Compile-WSDL11-" version ".tar.gz"))
998 (sha256
999 (base32
1000 "09ayl442hzvn97q4ghn5rz4r82dm9w3l69hixhb29h9xq9ysi7ba"))))
1001 (build-system perl-build-system)
1002 (propagated-inputs
1003 `(("perl-log-report" ,perl-log-report)
1004 ("perl-xml-compile" ,perl-xml-compile)
1005 ("perl-xml-compile-cache" ,perl-xml-compile-cache)
1006 ("perl-xml-compile-soap" ,perl-xml-compile-soap)))
1007 (home-page "https://metacpan.org/release/XML-Compile-WSDL11")
1008 (synopsis "Create SOAP messages defined by WSDL 1.1")
1009 (description
1010 "This module understands WSDL version 1.1. A WSDL file defines a set of
1011 messages to be send and received over SOAP connections. This involves
1012 encoding of the message to be send into XML, sending the message to the
1013 server, collect the answer, and finally decoding the XML to Perl.")
1014 (license license:perl-license)))
1015
1016 (define-public perl-xml-feed
1017 (package
1018 (name "perl-xml-feed")
1019 (version "0.63")
1020 (source (origin
1021 (method url-fetch)
1022 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
1023 "XML-Feed-" version ".tar.gz"))
1024 (sha256
1025 (base32
1026 "04frqhikmyq0i9ldraisbvppyjhqg6gz83l2rqpmp4f2h9n9k2lw"))))
1027 (build-system perl-build-system)
1028 (native-inputs
1029 `(("perl-module-build" ,perl-module-build)
1030 ("perl-uri" ,perl-uri)
1031 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
1032 (propagated-inputs
1033 `(("perl-class-errorhandler" ,perl-class-errorhandler)
1034 ("perl-datetime" ,perl-datetime)
1035 ("perl-datetime-format-flexible" ,perl-datetime-format-flexible)
1036 ("perl-datetime-format-iso8601" ,perl-datetime-format-iso8601)
1037 ("perl-datetime-format-mail" ,perl-datetime-format-mail)
1038 ("perl-datetime-format-natural" ,perl-datetime-format-natural)
1039 ("perl-datetime-format-w3cdtf" ,perl-datetime-format-w3cdtf)
1040 ("perl-feed-find" ,perl-feed-find)
1041 ("perl-html-parser" ,perl-html-parser)
1042 ("perl-libwww-perl" ,perl-libwww)
1043 ("perl-module-pluggable" ,perl-module-pluggable)
1044 ("perl-uri-fetch" ,perl-uri-fetch)
1045 ("perl-xml-atom" ,perl-xml-atom)
1046 ("perl-xml-libxml" ,perl-xml-libxml)
1047 ("perl-xml-rss" ,perl-xml-rss)))
1048 (home-page "https://metacpan.org/release/XML-Feed")
1049 (synopsis "XML Syndication Feed Support")
1050 (description "@code{XML::Feed} is a syndication feed parser for both RSS and
1051 Atom feeds. It also implements feed auto-discovery for finding feeds, given a URI.
1052 @code{XML::Feed} supports the following syndication feed formats:
1053 RSS 0.91, RSS 1.0, RSS 2.0, Atom")
1054 (license license:perl-license)))
1055
1056 (define-public perl-xml-xpath
1057 (package
1058 (name "perl-xml-xpath")
1059 (version "1.44")
1060 (source (origin
1061 (method url-fetch)
1062 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
1063 "XML-XPath-" version ".tar.gz"))
1064 (sha256
1065 (base32
1066 "03yxj7w5a43ibbpiqsvb3lswj2b71dydsx4rs2fw0p8n0l3i3j8w"))))
1067 (build-system perl-build-system)
1068 (native-inputs
1069 `(("perl-path-tiny" ,perl-path-tiny)))
1070 (propagated-inputs
1071 `(("perl-xml-parser" ,perl-xml-parser)))
1072 (home-page "https://metacpan.org/release/XML-XPath")
1073 (synopsis "Parse and evaluate XPath statements")
1074 (description
1075 "This module aims to comply exactly to the @url{XPath specification,
1076 https://www.w3.org/TR/xpath} and yet allow extensions to be added in
1077 the form of functions.")
1078 (license license:perl-license)))
1079
1080 (define-public pugixml
1081 (package
1082 (name "pugixml")
1083 (version "1.11")
1084 (source
1085 (origin
1086 (method url-fetch)
1087 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
1088 version "/pugixml-" version ".tar.gz"))
1089 (sha256
1090 (base32 "0b5apqiisq8yk51x0cwks4h2m0zd2zgjdy0w80qp9h5rccz3v496"))))
1091 (build-system cmake-build-system)
1092 (arguments
1093 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
1094 #:tests? #f)) ; no tests
1095 (native-inputs
1096 `(("pkg-config" ,pkg-config)))
1097 (home-page "https://pugixml.org")
1098 (synopsis "Light-weight, simple and fast XML parser for C++ with XPath support")
1099 (description
1100 "pugixml is a C++ XML processing library, which consists of a DOM-like
1101 interface with rich traversal/modification capabilities, a fast XML parser
1102 which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
1103 implementation for complex data-driven tree queries. Full Unicode support is
1104 also available, with Unicode interface variants and conversions between
1105 different Unicode encodings which happen automatically during
1106 parsing/saving.")
1107 (license license:expat)))
1108
1109 (define-public python-pyxb
1110 (package
1111 (name "python-pyxb")
1112 (version "1.2.6")
1113 (source (origin
1114 (method url-fetch)
1115 (uri (pypi-uri "PyXB" version))
1116 (sha256
1117 (base32
1118 "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"))))
1119 (build-system python-build-system)
1120 (home-page "http://pyxb.sourceforge.net/")
1121 (synopsis "Python XML Schema Bindings")
1122 (description
1123 "PyXB (\"pixbee\") is a pure Python package that generates Python source
1124 code for classes that correspond to data structures defined by XMLSchema.")
1125 (license (list license:asl2.0 ; Most files.
1126 license:expat ; pyxb/utils/six.py
1127 license:gpl2 ; bundled jquery in doc is dual MIT/GPL2
1128 license:psfl)))) ; pyxb/utils/activestate.py
1129
1130 (define-public python2-pyxb
1131 (package-with-python2 python-pyxb))
1132
1133 (define-public xmlto
1134 (package
1135 (name "xmlto")
1136 (version "0.0.28")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 ;; The old source on fedorahosted.org is offline permanently:
1141 ;; <https://bugs.gnu.org/25989>
1142 (uri (string-append "mirror://debian/pool/main/x/xmlto/"
1143 "xmlto_" version ".orig.tar.bz2"))
1144 (file-name (string-append name "-" version ".tar.bz2"))
1145 (sha256
1146 (base32
1147 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
1148 (build-system gnu-build-system)
1149 (arguments
1150 ;; Make sure the reference to util-linux's 'getopt' is kept in 'xmlto'.
1151 '(#:configure-flags (list (string-append "GETOPT="
1152 (assoc-ref %build-inputs
1153 "util-linux")
1154 "/bin/getopt"))))
1155 (native-inputs
1156 `(("util-linux" ,util-linux)))
1157 (inputs
1158 `(("util-linux" ,util-linux) ; for 'getopt'
1159 ("libxml2" ,libxml2) ; for 'xmllint'
1160 ("libxslt" ,libxslt))) ; for 'xsltproc'
1161 (home-page "http://cyberelk.net/tim/software/xmlto/")
1162 (synopsis "Front-end to an XSL toolchain")
1163 (description
1164 "Xmlto is a front-end to an XSL toolchain. It chooses an appropriate
1165 stylesheet for the conversion you want and applies it using an external
1166 XSL-T processor. It also performs any necessary post-processing.")
1167 (license license:gpl2+)))
1168
1169 (define-public xmlsec
1170 (package
1171 (name "xmlsec")
1172 (version "1.2.32")
1173 (source (origin
1174 (method url-fetch)
1175 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
1176 "xmlsec1-" version ".tar.gz"))
1177 (sha256
1178 (base32
1179 "0hy0nwz57n9r5wwab9xa66gzwlwvzs54nhlfn3jh8q13acl710z3"))))
1180 (build-system gnu-build-system)
1181 (propagated-inputs ; according to xmlsec1.pc
1182 `(("libxml2" ,libxml2)
1183 ("libxslt" ,libxslt)))
1184 (inputs
1185 `(("gnutls" ,gnutls)
1186 ("libgcrypt" ,libgcrypt)
1187 ("libltdl" ,libltdl)))
1188 (native-inputs
1189 `(("pkg-config" ,pkg-config)))
1190 (home-page "https://www.aleksey.com/xmlsec/")
1191 (synopsis "XML Security Library")
1192 (description
1193 "The XML Security Library is a C library based on Libxml2. It
1194 supports XML security standards such as XML Signature, XML Encryption,
1195 Canonical XML (part of Libxml2) and Exclusive Canonical XML (part of
1196 Libxml2).")
1197 (license (license:x11-style "file://COPYING"
1198 "See 'COPYING' in the distribution."))))
1199
1200 (define-public xmlsec-nss
1201 (package/inherit xmlsec
1202 (name "xmlsec-nss")
1203 (native-inputs
1204 ;; For tests.
1205 `(("nss:bin" ,nss "bin") ; for certutil
1206 ,@(package-native-inputs xmlsec)))
1207 (inputs
1208 `(("nss" ,nss)
1209 ("libltdl" ,libltdl)))
1210 (arguments
1211 ;; NSS no longer supports MD5 since 3.59, don't attempt to use it.
1212 '(#:configure-flags '("--disable-md5")))
1213 (synopsis "XML Security Library (using NSS instead of GnuTLS)")))
1214
1215 (define-public xmlsec-openssl
1216 (package/inherit xmlsec
1217 (name "xmlsec-openssl")
1218 (inputs
1219 `(("openssl" ,openssl)
1220 ("libltdl" ,libltdl)))
1221 (synopsis "XML Security Library (using OpenSSL instead of GnuTLS)")))
1222
1223 (define-public minixml
1224 (package
1225 (name "minixml")
1226 (version "3.2")
1227 (source (origin
1228 (method url-fetch)
1229 (uri (string-append "https://github.com/michaelrsweet/mxml/"
1230 "releases/download/v" version
1231 "/mxml-" version ".tar.gz"))
1232 (sha256
1233 (base32
1234 "0x698ayv00vrjg0yfm20lakpgl7m02x1fk2n09wygwk4973gd55q"))))
1235 (build-system gnu-build-system)
1236 (arguments
1237 `(#:configure-flags
1238 (list (string-append "LDFLAGS=-Wl,-rpath="
1239 (assoc-ref %outputs "out") "/lib"))
1240 #:tests? #f)) ; tests are run during build
1241 (home-page "https://www.msweet.org/mxml/")
1242 (synopsis "Small XML parsing library")
1243 (description
1244 "Mini-XML is a small C library to read and write XML files and strings in
1245 UTF-8 and UTF-16 encoding.")
1246 ;; LGPL 2.0+ with additional exceptions for static linking
1247 (license license:lgpl2.0+)))
1248
1249 ;; TinyXML is an unmaintained piece of software, so the patches and build
1250 ;; system massaging have no upstream potential.
1251 (define-public tinyxml
1252 (package
1253 (name "tinyxml")
1254 (version "2.6.2")
1255 (source (origin
1256 (method url-fetch)
1257 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
1258 version "/tinyxml_"
1259 (string-join (string-split version #\.) "_")
1260 ".tar.gz"))
1261 (file-name (string-append name "-" version ".tar.gz"))
1262 (sha256
1263 (base32
1264 "14smciid19lvkxqznfig77jxn5s4iq3jpb47vh5a6zcaqp7gvg8m"))
1265 (patches (search-patches "tinyxml-use-stl.patch"))))
1266 (build-system gnu-build-system)
1267 ;; This library is missing *a lot* of the steps to make it usable, so we
1268 ;; have to add them here, like every other distro must do.
1269 (arguments
1270 `(#:phases
1271 (modify-phases %standard-phases
1272 (delete 'configure)
1273 (add-after 'build 'build-shared-library
1274 (lambda _
1275 (invoke "g++" "-Wall" "-O2" "-shared" "-fpic"
1276 "tinyxml.cpp" "tinyxmlerror.cpp"
1277 "tinyxmlparser.cpp" "tinystr.cpp"
1278 "-o" "libtinyxml.so")))
1279 (replace 'check
1280 (lambda _ (invoke "./xmltest")))
1281 (replace 'install
1282 (lambda* (#:key outputs #:allow-other-keys)
1283 (let* ((out (assoc-ref outputs "out"))
1284 (include (string-append out "/include"))
1285 (lib (string-append out "/lib"))
1286 (pkgconfig (string-append out "/lib/pkgconfig"))
1287 (doc (string-append out "/share/doc")))
1288 ;; Install libs and headers.
1289 (install-file "libtinyxml.so" lib)
1290 (install-file "tinystr.h" include)
1291 (install-file "tinyxml.h" include)
1292 ;; Generate and install pkg-config file.
1293 (mkdir-p pkgconfig)
1294 ;; Software such as Kodi expect this file to be present, but
1295 ;; it's not provided in the source code.
1296 (call-with-output-file (string-append pkgconfig "/tinyxml.pc")
1297 (lambda (port)
1298 (format port "prefix=~a
1299 exec_prefix=${prefix}
1300 libdir=${exec_prefix}/lib
1301 includedir=${prefix}/include
1302
1303 Name: TinyXML
1304 Description: A simple, small, C++ XML parser
1305 Version: ~a
1306 Libs: -L${libdir} -ltinyxml
1307 Cflags: -I${includedir}
1308 "
1309 out ,version)))
1310 ;; Install docs.
1311 (mkdir-p doc)
1312 (copy-recursively "docs" (string-append doc "tinyxml"))
1313 #t))))))
1314 (synopsis "Small XML parser for C++")
1315 (description "TinyXML is a small and simple XML parsing library for the
1316 C++ programming language.")
1317 (home-page "http://www.grinninglizard.com/tinyxml/index.html")
1318 (license license:zlib)))
1319
1320 (define-public tinyxml2
1321 (package
1322 (name "tinyxml2")
1323 (version "8.0.0")
1324 (source
1325 (origin
1326 (method git-fetch)
1327 (uri (git-reference
1328 (url "https://github.com/leethomason/tinyxml2")
1329 (commit version)))
1330 (file-name (git-file-name name version))
1331 (sha256
1332 (base32 "0raa8r2hsagk7gjlqjwax95ib8d47ba79n91r4aws2zg8y6ssv1d"))))
1333 (build-system cmake-build-system)
1334 (synopsis "Small XML parser for C++")
1335 (description "TinyXML2 is a small and simple XML parsing library for the
1336 C++ programming language.")
1337 (home-page "http://www.grinninglizard.com/tinyxml2/")
1338 (license license:zlib)))
1339
1340 (define-public xmlstarlet
1341 (package
1342 (name "xmlstarlet")
1343 (version "1.6.1")
1344 (source
1345 (origin
1346 (method url-fetch)
1347 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1348 version "/xmlstarlet-" version ".tar.gz"))
1349 (sha256
1350 (base32
1351 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1352 (build-system gnu-build-system)
1353 (arguments
1354 '(#:phases
1355 (modify-phases %standard-phases
1356 (add-before 'check 'drop-failing-tests
1357 (lambda _
1358 ;; FIXME: Why are these tests failing.
1359 (substitute* "Makefile"
1360 (("^examples/schema1\\\\") "\\")
1361 (("^examples/valid1\\\\") "\\"))
1362 #t))
1363 (add-after 'install 'symlink-xmlstarlet
1364 (lambda* (#:key outputs #:allow-other-keys)
1365 ;; Other distros usually either rename or symlink the `xml' binary
1366 ;; as `xmlstarlet', let's do it as well for compatibility.
1367 (let* ((out (assoc-ref outputs "out"))
1368 (bin (string-append out "/bin")))
1369 (symlink "xml" (string-append bin "/xmlstarlet"))
1370 #t))))))
1371 (inputs
1372 `(("libxslt" ,libxslt)
1373 ("libxml2" ,libxml2)))
1374 (home-page "http://xmlstar.sourceforge.net/")
1375 (synopsis "Command line XML toolkit")
1376 (description "XMLStarlet is a set of command line utilities which can be
1377 used to transform, query, validate, and edit XML documents. XPath is used to
1378 match and extract data, and elements can be added, deleted or modified using
1379 XSLT and EXSLT.")
1380 (license license:x11)))
1381
1382 (define-public html-xml-utils
1383 (package
1384 (name "html-xml-utils")
1385 (version "7.9")
1386 (source
1387 (origin
1388 (method url-fetch)
1389 (uri (string-append
1390 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
1391 version ".tar.gz"))
1392 (sha256
1393 (base32 "0gs3xvdbzhk5k12i95p5d4fgkkaldnlv45sch7pnncb0lrpcjsnq"))))
1394 (build-system gnu-build-system)
1395 (home-page "https://www.w3.org/Tools/HTML-XML-utils/")
1396 (synopsis "Command line utilities to manipulate HTML and XML files")
1397 (description "HTML-XML-utils provides a number of simple utilities for
1398 manipulating and converting HTML and XML files in various ways. The suite
1399 consists of the following tools:
1400
1401 @itemize
1402 @item @command{asc2xml} convert from @code{UTF-8} to @code{&#nnn;} entities
1403 @item @command{xml2asc} convert from @code{&#nnn;} entities to @code{UTF-8}
1404 @item @command{hxaddid} add IDs to selected elements
1405 @item @command{hxcite} replace bibliographic references by hyperlinks
1406 @item @command{hxcite} mkbib - expand references and create bibliography
1407 @item @command{hxclean} apply heuristics to correct an HTML file
1408 @item @command{hxcopy} copy an HTML file while preserving relative links
1409 @item @command{hxcount} count elements and attributes in HTML or XML files
1410 @item @command{hxextract} extract selected elements
1411 @item @command{hxincl} expand included HTML or XML files
1412 @item @command{hxindex} create an alphabetically sorted index
1413 @item @command{hxmkbib} create bibliography from a template
1414 @item @command{hxmultitoc} create a table of contents for a set of HTML files
1415 @item @command{hxname2id} move some @code{ID=} or @code{NAME=} from A
1416 elements to their parents
1417 @item @command{hxnormalize} pretty-print an HTML file
1418 @item @command{hxnsxml} convert output of hxxmlns back to normal XML
1419 @item @command{hxnum} number section headings in an HTML file
1420 @item @command{hxpipe} convert XML to a format easier to parse with Perl or AWK
1421 @item @command{hxprintlinks} number links and add table of URLs at end of an HTML file
1422 @item @command{hxprune} remove marked elements from an HTML file
1423 @item @command{hxref} generate cross-references
1424 @item @command{hxselect} extract elements that match a (CSS) selector
1425 @item @command{hxtoc} insert a table of contents in an HTML file
1426 @item @command{hxuncdata} replace CDATA sections by character entities
1427 @item @command{hxunent} replace HTML predefined character entities to @code{UTF-8}
1428 @item @command{hxunpipe} convert output of pipe back to XML format
1429 @item @command{hxunxmlns} replace \"global names\" by XML Namespace prefixes
1430 @item @command{hxwls} list links in an HTML file
1431 @item @command{hxxmlns} replace XML Namespace prefixes by \"global names\"
1432 @end itemize
1433 ")
1434 (license license:expat)))
1435
1436 (define-public xlsx2csv
1437 (package
1438 (name "xlsx2csv")
1439 (version "0.7.4")
1440 (source
1441 (origin
1442 (method git-fetch)
1443 (uri (git-reference
1444 (url "https://github.com/dilshod/xlsx2csv")
1445 (commit version)))
1446 (file-name (git-file-name name version))
1447 (sha256
1448 (base32 "168dm6p7w6pvgd87yb9hcxv9y0liv6mxgril202nfva68cp8y939"))))
1449 (build-system python-build-system)
1450 (arguments
1451 `(#:python ,python-2 ; use python-2 for the test script
1452 #:phases
1453 (modify-phases %standard-phases
1454 (replace 'check
1455 (lambda _
1456 (substitute* "test/run"
1457 ;; Run tests with `python' only.
1458 (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
1459 (invoke "test/run"))))))
1460 (home-page "https://github.com/dilshod/xlsx2csv")
1461 (synopsis "XLSX to CSV converter")
1462 (description
1463 "Xlsx2csv is a program to convert Microsoft Excel 2007 XML (XLSX and
1464 XLSM) format spreadsheets into plaintext @dfn{comma separated values} (CSV)
1465 files. It is designed to be fast and to handle large input files.")
1466 (license license:gpl2+)))
1467
1468 (define-public python-defusedxml
1469 (package
1470 (name "python-defusedxml")
1471 (version "0.6.0")
1472 (source
1473 (origin
1474 (method url-fetch)
1475 (uri (pypi-uri "defusedxml" version))
1476 (sha256
1477 (base32
1478 "1xbp8fivl3wlbyg2jrvs4lalaqv1xp9a9f29p75wdx2s2d6h717n"))))
1479 (build-system python-build-system)
1480 (home-page "https://bitbucket.org/tiran/defusedxml")
1481 (synopsis "XML bomb protection for Python stdlib modules")
1482 (description
1483 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1484 (license license:psfl)))
1485
1486 (define-public python2-defusedxml
1487 (package-with-python2 python-defusedxml))
1488
1489 (define-public freexl
1490 (package
1491 (name "freexl")
1492 (version "1.0.6")
1493 (source (origin
1494 (method url-fetch)
1495 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1496 "freexl-" version ".tar.gz"))
1497 (sha256
1498 (base32
1499 "08pwj17l0lgp6zms9nmpawdxpvhzrslklbd53s4b430k7mxbbs1x"))))
1500 (build-system gnu-build-system)
1501 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1502 (synopsis "Read Excel files")
1503 (description
1504 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1505 spreadsheet.")
1506 ;; Any of these licenses may be picked.
1507 (license (list license:gpl2+
1508 license:lgpl2.1+
1509 license:mpl1.1))))
1510
1511 (define-public xerces-c
1512 (package
1513 (name "xerces-c")
1514 (version "3.2.3")
1515 (source (origin
1516 (method url-fetch)
1517 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1518 "xerces-c-" version ".tar.xz"))
1519 (sha256
1520 (base32
1521 "0jf1khvlssg31vkxbc25dxjxcxm56xb8nywj1sypj6hxzjlrkz0j"))))
1522 (build-system gnu-build-system)
1523 (arguments
1524 (let ((system (or (%current-target-system)
1525 (%current-system))))
1526 (if (string-prefix? "x86_64" system)
1527 '()
1528 '(#:configure-flags '("--disable-sse2")))))
1529 (native-inputs
1530 `(("perl" ,perl)))
1531 (home-page "https://xerces.apache.org/xerces-c/")
1532 (synopsis "Validating XML parser library for C++")
1533 (description "Xerces-C++ is a validating XML parser written in a portable
1534 subset of C++. Xerces-C++ makes it easy to give your application the ability
1535 to read and write XML data. A shared library is provided for parsing,
1536 generating, manipulating, and validating XML documents using the DOM, SAX, and
1537 SAX2 APIs.")
1538 (license license:asl2.0)))
1539
1540 (define-public xlsxio
1541 (package
1542 (name "xlsxio")
1543 (version "0.2.29")
1544 (source
1545 (origin
1546 (method git-fetch)
1547 (uri (git-reference
1548 (url "https://github.com/brechtsanders/xlsxio")
1549 (commit version)))
1550 (file-name (git-file-name name version))
1551 (sha256
1552 (base32 "0jr6ggzhd8aakdvppcl8scy9j9jafg82zbzr4ih996sz8lrj90fn"))))
1553 (native-inputs
1554 `(("expat" ,expat)
1555 ("make" ,gnu-make)
1556 ("minizip" ,minizip)
1557 ("which" ,which)))
1558 (build-system gnu-build-system)
1559 (arguments
1560 `(#:phases
1561 (modify-phases %standard-phases
1562 (delete 'configure)
1563 (delete 'check)
1564 (replace 'install
1565 (lambda* (#:key outputs #:allow-other-keys)
1566 (invoke "make" "install"
1567 (string-append
1568 "PREFIX=" (assoc-ref outputs "out"))))))))
1569 (synopsis "C library for reading and writing .xlsx files")
1570 (description "XLSX I/O aims to provide a C library for reading and writing
1571 .xlsx files. The .xlsx file format is the native format used by Microsoft(R)
1572 Excel(TM) since version 2007.")
1573 (home-page "https://github.com/brechtsanders/xlsxio")
1574 (license license:expat)))
1575
1576 (define-public java-simple-xml
1577 (package
1578 (name "java-simple-xml")
1579 (version "2.7.1")
1580 (source (origin
1581 (method url-fetch)
1582 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1583 version ".zip"))
1584 (sha256
1585 (base32
1586 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))
1587 (patches (search-patches "java-simple-xml-fix-tests.patch"))))
1588 (build-system ant-build-system)
1589 (arguments
1590 `(#:build-target "build"
1591 #:test-target "test"
1592 #:phases
1593 (modify-phases %standard-phases
1594 (replace 'install (install-jars "jar")))))
1595 (native-inputs
1596 `(("unzip" ,unzip)))
1597 (home-page "http://simple.sourceforge.net/")
1598 (synopsis "XML serialization framework for Java")
1599 (description "Simple is a high performance XML serialization and
1600 configuration framework for Java. Its goal is to provide an XML framework
1601 that enables rapid development of XML configuration and communication systems.
1602 This framework aids the development of XML systems with minimal effort and
1603 reduced errors. It offers full object serialization and deserialization,
1604 maintaining each reference encountered.")
1605 (license license:asl2.0)))
1606
1607 (define-public perl-xml-xpathengine
1608 (package
1609 (name "perl-xml-xpathengine")
1610 (version "0.14")
1611 (source (origin
1612 (method url-fetch)
1613 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1614 "XML-XPathEngine-" version ".tar.gz"))
1615 (sha256
1616 (base32
1617 "0r72na14bmsxfd16s9nlza155amqww0k8wsa9x2a3sqbpp5ppznj"))))
1618 (build-system perl-build-system)
1619 (home-page "https://metacpan.org/release/XML-XPathEngine")
1620 (synopsis "Re-usable XPath engine for DOM-like trees")
1621 (description
1622 "This module provides an XPath engine, that can be re-used by other
1623 modules/classes that implement trees.
1624
1625 In order to use the XPath engine, nodes in the user module need to mimic DOM
1626 nodes. The degree of similitude between the user tree and a DOM dictates how
1627 much of the XPath features can be used. A module implementing all of the DOM
1628 should be able to use this module very easily (you might need to add the
1629 @code{cmp} method on nodes in order to get ordered result sets).")
1630 (license license:perl-license)))
1631
1632 (define-public perl-tree-xpathengine
1633 (package
1634 (name "perl-tree-xpathengine")
1635 (version "0.05")
1636 (source (origin
1637 (method url-fetch)
1638 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1639 "Tree-XPathEngine-" version ".tar.gz"))
1640 (sha256
1641 (base32
1642 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1643 (build-system perl-build-system)
1644 (home-page "https://metacpan.org/release/Tree-XPathEngine")
1645 (synopsis "Re-usable XPath engine")
1646 (description
1647 "This module provides an XPath engine, that can be re-used by other
1648 module/classes that implement trees. It is designed to be compatible with
1649 @code{Class::XPath}, ie it passes its tests if you replace @code{Class::XPath}
1650 by @code{Tree::XPathEngine}.")
1651 (license license:perl-license)))
1652
1653 (define-public perl-xml-filter-buffertext
1654 (package
1655 (name "perl-xml-filter-buffertext")
1656 (version "1.01")
1657 (source
1658 (origin
1659 (method url-fetch)
1660 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1661 "XML-Filter-BufferText-" version ".tar.gz"))
1662 (sha256
1663 (base32
1664 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1665 (build-system perl-build-system)
1666 (propagated-inputs
1667 `(("perl-xml-sax-base" ,perl-xml-sax-base)))
1668 (home-page "https://metacpan.org/release/XML-Filter-BufferText")
1669 (synopsis "Filter to put all characters() in one event")
1670 (description "This is a very simple filter. One common cause of
1671 grief (and programmer error) is that XML parsers aren't required to provide
1672 character events in one chunk. They can, but are not forced to, and most
1673 don't. This filter does the trivial but oft-repeated task of putting all
1674 characters into a single event.")
1675 (license license:perl-license)))
1676
1677 (define-public perl-xml-sax-writer
1678 (package
1679 (name "perl-xml-sax-writer")
1680 (version "0.57")
1681 (source (origin
1682 (method url-fetch)
1683 (uri (string-append
1684 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1685 "XML-SAX-Writer-" version ".tar.gz"))
1686 (sha256
1687 (base32
1688 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1689 (build-system perl-build-system)
1690 (propagated-inputs
1691 `(("perl-libxml" ,perl-libxml)
1692 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1693 ("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
1694 ("perl-xml-sax-base" ,perl-xml-sax-base)))
1695 (home-page "https://metacpan.org/release/XML-SAX-Writer")
1696 (synopsis "SAX2 XML Writer")
1697 (description
1698 "This is an XML writer that understands SAX2. It is based on
1699 @code{XML::Handler::YAWriter}.")
1700 (license license:perl-license)))
1701
1702 (define-public perl-xml-handler-yawriter
1703 (package
1704 (name "perl-xml-handler-yawriter")
1705 (version "0.23")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1710 "XML-Handler-YAWriter-" version ".tar.gz"))
1711 (sha256
1712 (base32
1713 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1714 (build-system perl-build-system)
1715 (propagated-inputs
1716 `(("perl-libxml" ,perl-libxml)))
1717 (home-page "https://metacpan.org/release/XML-Handler-YAWriter")
1718 (synopsis "Yet another Perl SAX XML Writer")
1719 (description "YAWriter implements Yet Another @code{XML::Handler::Writer}.
1720 It provides a flexible escaping technique and pretty printing.")
1721 (license license:perl-license)))
1722
1723 (define-public perl-xml-twig
1724 (package
1725 (name "perl-xml-twig")
1726 (version "3.52")
1727 (source (origin
1728 (method url-fetch)
1729 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1730 "XML-Twig-" version ".tar.gz"))
1731 (sha256
1732 (base32
1733 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1734 (build-system perl-build-system)
1735 (inputs
1736 `(("expat" ,expat)))
1737 (propagated-inputs
1738 `(("perl-html-tidy" ,perl-html-tidy)
1739 ("perl-html-tree" ,perl-html-tree)
1740 ("perl-io-captureoutput" ,perl-io-captureoutput)
1741 ("perl-io-string" ,perl-io-string)
1742 ("perl-io-stringy" ,perl-io-stringy)
1743 ("perl-libxml" ,perl-libxml)
1744 ("perl-xml-filter-buffertext" ,perl-xml-filter-buffertext)
1745 ("perl-xml-handler-yawriter" ,perl-xml-handler-yawriter)
1746 ("perl-xml-parser" ,perl-xml-parser)
1747 ("perl-xml-sax-writer" ,perl-xml-sax-writer)
1748 ("perl-xml-simple" ,perl-xml-simple)
1749 ("perl-xml-xpathengine" ,perl-xml-xpathengine)
1750 ("perl-test-pod" ,perl-test-pod)
1751 ("perl-tree-xpathengine" ,perl-tree-xpathengine)))
1752 (home-page "https://metacpan.org/release/XML-Twig")
1753 (synopsis "Perl module for processing huge XML documents in tree mode")
1754 (description "@code{XML::Twig} is an XML transformation module. Its
1755 strong points: can be used to process huge documents while still being in tree
1756 mode; not bound by DOM or SAX, so it is very perlish and offers a very
1757 comprehensive set of methods; simple to use; DWIMs as much as possible.
1758
1759 What it doesn't offer: full SAX support (it can export SAX, but only reads
1760 XML), full XPath support (unless you use @code{XML::Twig::XPath}), nor DOM
1761 support.")
1762 (license license:perl-license)))
1763
1764 ;; TODO: Debian builds several jars out of this: jaxp-1.4.jar,
1765 ;; xml-apis.jar and xml-apis-1.4.01.jar.
1766 (define-public java-jaxp
1767 (package
1768 (name "java-jaxp")
1769 (version "1.4.01")
1770 (source
1771 (origin
1772 (method url-fetch)
1773 (uri (string-append "mirror://apache/xerces/xml-commons/source/"
1774 "xml-commons-external-" version "-src.tar.gz"))
1775 (sha256
1776 (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
1777 (build-system ant-build-system)
1778 (arguments
1779 `(#:jar-name "jaxp.jar"
1780 #:jdk ,icedtea-8
1781 #:source-dir ".."
1782 #:tests? #f)); no tests
1783 (home-page "http://xerces.apache.org/xml-commons/")
1784 (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)")
1785 (description "Jaxp from the Apache XML Commons project is used by
1786 the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs:
1787
1788 @itemize
1789 @item Document Object Model (DOM)
1790 @item Simple API for XML (SAX)
1791 @item Java APIs for XML Processing (JAXP)
1792 @item Transformation API for XML (TrAX)
1793 @item Document Object Model (DOM) Load and Save
1794 @item JSR 206 Java API for XML Processing
1795 @end itemize")
1796 (license (list license:asl2.0
1797 license:w3c ;; Files under org.w3c
1798 license:public-domain)))) ;; org.xml.sax
1799
1800 (define-public java-apache-xml-commons-resolver
1801 (package
1802 (name "java-apache-xml-commons-resolver")
1803 (version "1.2")
1804 (source
1805 (origin
1806 (method url-fetch)
1807 (uri (string-append "mirror://apache/xerces/xml-commons/"
1808 "xml-commons-resolver-" version ".tar.gz"))
1809 (sha256
1810 (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
1811 (modules '((guix build utils)))
1812 (snippet
1813 '(begin
1814 (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
1815 #t))))
1816 (build-system ant-build-system)
1817 (arguments
1818 `(#:jar-name (string-append "xml-resolver.jar")
1819 #:tests? #f)); no tests
1820 (inputs
1821 `(("java-junit" ,java-junit)))
1822 (home-page "http://xerces.apache.org/xml-commons/")
1823 (synopsis "Catalog-based entity and URI resolution")
1824 (description "The resolver class implements the full semantics of OASIS Technical
1825 Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug
1826 2001 Committee Specification of OASIS XML Catalogs.
1827
1828 It also includes a framework of classes designed to read catalog files
1829 in a number of formats:
1830
1831 @itemize
1832 @item The plain-text flavor described by TR9401.
1833 @item The XCatalog XML format defined by John Cowan
1834 @item The XML Catalog format defined by the OASIS Entity Resolution
1835 Technical Committee.
1836 @end itemize")
1837 (license license:asl2.0)))
1838
1839 ;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
1840 ;; This package is a bootstrap version without dependencies on dom4j and xom.
1841 (define java-jaxen-bootstrap
1842 (package
1843 (name "java-jaxen-bootstrap")
1844 (version "1.1.6")
1845 (source (origin
1846 (method url-fetch)
1847 ;; No release on github
1848 (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
1849 version "/jaxen-" version "-sources.jar"))
1850 (sha256
1851 (base32
1852 "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
1853 (build-system ant-build-system)
1854 (arguments
1855 `(#:jar-name "jaxen.jar"
1856 #:source-dir "src"
1857 #:tests? #f; no tests
1858 #:phases
1859 (modify-phases %standard-phases
1860 (add-before 'build 'remove-dom4j
1861 (lambda _
1862 (delete-file-recursively "src/org/jaxen/dom4j")
1863 (delete-file-recursively "src/org/jaxen/xom")
1864 #t)))))
1865 (inputs
1866 `(("java-jdom" ,java-jdom)))
1867 (home-page "https://github.com/jaxen-xpath/jaxen")
1868 (synopsis "XPath library")
1869 (description "Jaxen is an XPath library written in Java. It is adaptable
1870 to many different object models, including DOM, XOM, dom4j, and JDOM. It is
1871 also possible to write adapters that treat non-XML trees such as compiled
1872 Java byte code or Java beans as XML, thus enabling you to query these trees
1873 with XPath too.")
1874 (license license:bsd-3)))
1875
1876 (define-public java-jaxen
1877 (package
1878 (inherit java-jaxen-bootstrap)
1879 (name "java-jaxen")
1880 (inputs
1881 `(("java-jdom" ,java-jdom)
1882 ("java-xom" ,java-xom)
1883 ("java-dom4j" ,java-dom4j)))))
1884
1885 (define-public java-xom
1886 (package
1887 (name "java-xom")
1888 (version "127")
1889 (source (origin
1890 (method git-fetch)
1891 (uri (git-reference
1892 (url "https://github.com/elharo/xom")
1893 (commit (string-append "XOM_" version))))
1894 (file-name (git-file-name name version))
1895 (sha256
1896 (base32
1897 "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq"))
1898 (modules '((guix build utils)))
1899 (snippet
1900 '(begin
1901 (for-each delete-file
1902 (find-files "." "\\.jar$"))
1903 #t))))
1904 (build-system ant-build-system)
1905 (arguments
1906 `(#:jar-name "xom.jar"
1907 #:jdk ,icedtea-8
1908 #:tests? #f ; no tests
1909 #:phases
1910 (modify-phases %standard-phases
1911 (add-after 'unpack 'make-git-checkout-writable
1912 (lambda _
1913 (for-each make-file-writable (find-files "."))
1914 #t))
1915 (add-before 'configure 'fix-tagsoup-dep
1916 (lambda _
1917 ;; FIXME: Where is tagsoup source?
1918 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
1919 #t)))))
1920 (inputs
1921 `(("java-jdom" ,java-jdom)
1922 ("java-junit" ,java-junit)
1923 ("java-classpathx-servletapi" ,java-classpathx-servletapi)
1924 ("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
1925 ("java-xerces" ,java-xerces)))
1926 (home-page "https://xom.nu/")
1927 (synopsis "XML Object Model")
1928 (description "XOM is a new XML Object Model for processing XML with Java
1929 that strives for correctness and simplicity.")
1930 ;; 2.1 only
1931 (license license:lgpl2.1)))
1932
1933 (define-public java-xsdlib
1934 (package
1935 (name "java-xsdlib")
1936 (version "2013.2")
1937 (source (origin
1938 (method url-fetch)
1939 (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/"
1940 "datatype/xsd/xsdlib/" version "/xsdlib-"
1941 version "-sources.jar"))
1942 (sha256
1943 (base32
1944 "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
1945 (build-system ant-build-system)
1946 (arguments
1947 `(#:tests? #f; no tests
1948 #:jar-name "xsdlib.jar"
1949 #:jdk ,icedtea-8))
1950 (inputs
1951 `(("java-xerces" ,java-xerces)))
1952 (home-page (string-append "https://web.archive.org/web/20161127144537/"
1953 "https://msv.java.net//"))
1954 (synopsis "Sun Multi-Schema Validator")
1955 (description "Xsdlib contains an implementation of sun.com.msv, an XML
1956 validator.")
1957 (license license:bsd-2)))
1958
1959 (define-public java-xpp3
1960 (package
1961 (name "java-xpp3")
1962 (version "1.1.4")
1963 (source (origin
1964 (method url-fetch)
1965 (uri (string-append "http://www.extreme.indiana.edu/dist/"
1966 "java-repository/xpp3/distributions/xpp3-"
1967 version "_src.tgz"))
1968 (sha256
1969 (base32
1970 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
1971 (modules '((guix build utils)))
1972 (snippet
1973 '(begin ;; Delete bundled jar archives.
1974 (for-each delete-file (find-files "." ".*\\.jar"))
1975 #t))))
1976 (build-system ant-build-system)
1977 (arguments
1978 `(#:tests? #f; no tests
1979 #:build-target "jar"
1980 #:phases
1981 (modify-phases %standard-phases
1982 (replace 'install (install-jars "build")))))
1983 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
1984 (synopsis "Streaming pull XML parser")
1985 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
1986 parser and should be used when there is a need to process quickly and
1987 efficiently all input elements (for example in SOAP processors). This
1988 package is a stable XmlPull parsing engine that is based on ideas from XPP
1989 and in particular XPP2 but completely revised and rewritten to take the best
1990 advantage of JIT JVMs.")
1991 (license (license:non-copyleft "file://LICENSE.txt"))))
1992
1993 (define-public java-xmlpull2
1994 (package
1995 (name "java-xmlpull2")
1996 (version "2.1.10")
1997 (source (origin
1998 (method url-fetch)
1999 ;; Unfortunately, archive.org does not have a copy of this file.
2000 (uri (string-append "https://ftp.fau.de/gentoo/distfiles/"
2001 "PullParser" version ".tgz"))
2002 (sha256
2003 (base32
2004 "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
2005 (modules '((guix build utils)))
2006 (snippet
2007 '(begin ;; Delete bundled jar archives.
2008 (for-each delete-file (find-files "." ".*\\.jar"))
2009 #t))))
2010 (build-system ant-build-system)
2011 (arguments
2012 `(#:tests? #f; no tests
2013 #:build-target "impl"
2014 #:phases
2015 (modify-phases %standard-phases
2016 (replace 'install (install-jars "build/lib")))))
2017 (home-page (string-append "https://web.archive.org/web/20210225153105/"
2018 "https://www.extreme.indiana.edu/"))
2019 (synopsis "Streaming pull XML parser")
2020 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
2021 parser and should be used when there is a need to process quickly and
2022 efficiently all input elements (for example in SOAP processors). This
2023 package is in maintenance mode.")
2024 (license (license:non-copyleft "file:///LICENSE.txt"))))
2025
2026 (define-public java-xmlpull-api-v1
2027 (package
2028 (name "java-xmlpull-api-v1")
2029 (version "1.1.3.4b")
2030 (source (origin
2031 ;; The package is originally from Extreme! Lab, but the website
2032 ;; is now gone. This repositories contains the sources of the
2033 ;; latest version.
2034 (method git-fetch)
2035 (uri (git-reference
2036 (url "https://github.com/aslom/xmlpull-api-v1")
2037 ;; No releases, this is the latest commit
2038 (commit "abeaa4aa87b2625af70c32f658f44e11355fe568")))
2039 (file-name (git-file-name name version))
2040 (sha256
2041 (base32
2042 "15bdqxfncnakskna4m9gsh4f9iczxy83qxn2anqiqd15z406a5ih"))
2043 (modules '((guix build utils)))
2044 (snippet
2045 `(begin
2046 (delete-file-recursively "lib")
2047 (mkdir-p "lib")
2048 ;; prevents a failure in "dist_lite"
2049 (substitute* "build.xml"
2050 (("README.html") "README.md"))))))
2051 (build-system ant-build-system)
2052 (arguments
2053 `(#:test-target "junit"
2054 #:build-target "dist"
2055 #:phases
2056 (modify-phases %standard-phases
2057 (replace 'install
2058 (lambda* (#:key outputs #:allow-other-keys)
2059 (let* ((out (assoc-ref outputs "out"))
2060 (doc (string-append out "/share/doc/" ,name "-" ,version))
2061 (java (string-append out "/share/java"))
2062 (project (string-append
2063 "xmlpull_"
2064 ,(string-join (string-split version #\.) "_"))))
2065 (mkdir-p doc)
2066 (copy-recursively (string-append "build/dist/" project "/doc/")
2067 doc)
2068 (mkdir-p java)
2069 (copy-file (string-append "build/dist/" project "/" project ".jar")
2070 (string-append java "/" project ".jar")))
2071 )))))
2072 (home-page "https://github.com/aslom/xmlpull-api-v1")
2073 (synopsis "XML pull parsing API")
2074 (description "XmlPull v1 API is a simple to use XML pull parsing API. XML
2075 pull parsing allows incremental (sometimes called streaming) parsing of XML
2076 where application is in control - the parsing can be interrupted at any given
2077 moment and resumed when application is ready to consume more input.")
2078 (license license:public-domain)))
2079
2080 (define-public java-dom4j
2081 (package
2082 (name "java-dom4j")
2083 (version "2.1.1")
2084 (source (origin
2085 (method git-fetch)
2086 (uri (git-reference
2087 (url "https://github.com/dom4j/dom4j")
2088 (commit (string-append "version-" version))))
2089 (file-name (git-file-name name version))
2090 (sha256
2091 (base32
2092 "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl"))
2093 (modules '((guix build utils)))
2094 (snippet
2095 '(begin ;; Delete bundled jar archives.
2096 (for-each delete-file (find-files "." ".*\\.jar"))
2097 #t))))
2098 (build-system ant-build-system)
2099 (arguments
2100 `(#:jar-name "dom4j.jar"
2101 #:jdk ,icedtea-8
2102 #:source-dir "src/main/java"
2103 ;; FIXME: Requires xalan, but xalan depends on java-cup which has a
2104 ;; dependency on itself through jflex.
2105 #:tests? #f
2106 #:phases
2107 (modify-phases %standard-phases
2108 (add-before 'build 'copy-jaxen-sources
2109 ;; java-jaxen-bootstrap is not enough. These files have a circular
2110 ;; dependency and there is no subset of dom4j that would allow
2111 ;; breaking the circle.
2112 (lambda* (#:key inputs #:allow-other-keys)
2113 (mkdir-p "jaxen-sources")
2114 (with-directory-excursion "jaxen-sources"
2115 (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources")))
2116 (mkdir-p "src/main/java/org/jaxen/dom4j")
2117 (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java"
2118 "src/main/java/org/jaxen/dom4j/DocumentNavigator.java")
2119 (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java"
2120 "src/main/java/org/jaxen/dom4j/Dom4jXPath.java")
2121 #t))
2122 (add-before 'build 'fix-old-xpp2
2123 (lambda _
2124 ;; This package normally depends on xpp2 2.0, but version 2.1.10
2125 ;; is the only version whose source code is published.
2126 (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java"
2127 (("public void resetStartTag")
2128 "public boolean removeAttributeByRawName(String name) {\n
2129 return false;\n
2130 }\n
2131 public boolean removeAttributeByName(String name, String name2) {\n
2132 return false;\n
2133 }\n\npublic void resetStartTag")
2134 (("Atttribute") "Attribute"))
2135 #t)))))
2136 (inputs
2137 `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
2138 ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap))
2139 ("java-xmlpull2" ,java-xmlpull2)
2140 ("java-xpp3" ,java-xpp3)
2141 ("java-xsdlib" ,java-xsdlib)))
2142 (native-inputs
2143 `(("java-testng" ,java-testng)
2144 ("java-xerces" ,java-xerces)))
2145 (home-page "https://dom4j.github.io/")
2146 (synopsis "Flexible XML framework for Java")
2147 (description "Dom4j is a flexible XML framework for Java. DOM4J works
2148 with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very
2149 low memory footprint.")
2150 ;; some BSD-like 5-clause license
2151 (license (license:non-copyleft "file://LICENSE"))))
2152
2153 (define-public java-kxml2
2154 (package
2155 (name "java-kxml2")
2156 (version "2.4.2")
2157 (source (origin
2158 (method git-fetch)
2159 (uri (git-reference
2160 (url "https://github.com/stefanhaustein/kxml2")
2161 (commit (string-append "v" version))))
2162 (file-name (git-file-name name version))
2163 (sha256
2164 (base32
2165 "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg"))))
2166 (build-system ant-build-system)
2167 (arguments
2168 `(#:jar-name "kxml2.jar"
2169 #:source-dir "src/main/java"
2170 #:test-include (list "TestWb.java")
2171 ;; Test failure: it was expected to get an XML entity but got the
2172 ;; equivalent Unicode character instead.
2173 #:tests? #f
2174 #:phases
2175 (modify-phases %standard-phases
2176 (add-after 'unpack 'make-git-checkout-writable
2177 (lambda _
2178 (for-each make-file-writable (find-files "."))
2179 #t))
2180 (add-before 'build 'copy-resources
2181 (lambda _
2182 (copy-recursively "src/main/resources" "build/classes")
2183 #t)))))
2184 (inputs
2185 `(("java-xpp3" ,java-xpp3)))
2186 (native-inputs
2187 `(("java-junit" ,java-junit)))
2188 (home-page "http://kxml.org")
2189 (synopsis "XML pull parser")
2190 (description "kXML is a small XML pull parser, specially designed for
2191 constrained environments such as Applets, Personal Java or devices compliant
2192 with the Mobile Information Device Profile (MIDP).")
2193 (license license:expat)))
2194
2195 (define-public java-stax
2196 (package
2197 (name "java-stax")
2198 (version "1.2.0")
2199 (source (origin
2200 (method url-fetch)
2201 (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
2202 version "/stax-" version "-sources.jar"))
2203 (sha256
2204 (base32
2205 "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
2206 (build-system ant-build-system)
2207 (arguments
2208 `(#:jar-name "stax.jar"
2209 #:tests? #f; no tests
2210 #:phases
2211 (modify-phases %standard-phases
2212 (add-before 'configure 'fix-utf8
2213 (lambda _
2214 ;; This file is ISO-8859-1 but java expects UTF-8.
2215 ;; Remove special characters in comments.
2216 (with-fluids ((%default-port-encoding "ISO-8859-1"))
2217 (substitute* "src/com/wutka/dtd/Scanner.java"
2218 (("//.*") "\n")))
2219 #t)))))
2220 (home-page "https://repo1.maven.org/maven2/stax/stax/")
2221 (synopsis "Streaming API for XML")
2222 (description "This package provides the reference implementation of the
2223 @dfn{Streaming API for XML} (StAX). It is used for streaming XML data to
2224 and from a Java application. It provides a standard pull parser interface.")
2225 (license license:asl2.0)))
2226
2227 (define-public java-jettison
2228 (package
2229 (name "java-jettison")
2230 (version "1.3.7")
2231 (source (origin
2232 (method git-fetch)
2233 (uri (git-reference
2234 (url "https://github.com/codehaus/jettison")
2235 (commit (string-append "jettison-" version))))
2236 (file-name (git-file-name name version))
2237 (sha256
2238 (base32
2239 "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw"))))
2240 (build-system ant-build-system)
2241 (arguments
2242 `(#:jar-name "jettison.jar"
2243 #:source-dir "src/main/java"
2244 #:test-exclude (list "**/Abstract*.java"
2245 ;; Abstract classes
2246 "**/DOMTest.java"
2247 "**/BadgerFishDOMTest.java"
2248 "**/MappedDOMTest.java")))
2249 (native-inputs
2250 `(("java-junit" ,java-junit)))
2251 (home-page "https://github.com/codehaus/jettison")
2252 (synopsis "StAX implementation for JSON")
2253 (description "Jettison is a Java library for converting XML to JSON and
2254 vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It
2255 implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports
2256 @code{Mapped} and @code{BadgerFish} conventions.")
2257 (license license:asl2.0)))
2258
2259 (define-public java-jdom2
2260 (package
2261 (name "java-jdom")
2262 (version "2.0.6")
2263 (source (origin
2264 (method git-fetch)
2265 (uri (git-reference
2266 (url "https://github.com/hunterhacker/jdom")
2267 (commit (string-append "JDOM-" version))))
2268 (file-name (git-file-name name version))
2269 (sha256
2270 (base32
2271 "14vv1kxrsdvwi4cz3rx6r48w5y6fvk9cymil8qhvxwp56xxrgxiq"))))
2272 (build-system ant-build-system)
2273 (arguments
2274 `(#:build-target "package"
2275 #:tests? #f ; tests are run as part of the build process
2276 #:phases
2277 (modify-phases %standard-phases
2278 (replace 'install
2279 (install-jars "build")))))
2280 (home-page "http://jdom.org/")
2281 (synopsis "Access, manipulate, and output XML data")
2282 (description "Jdom is a Java-based solution for accessing, manipulating, and
2283 outputting XML data from Java code.")
2284 (license license:bsd-4)))
2285
2286 (define-public java-xstream
2287 (package
2288 (name "java-xstream")
2289 (version "1.4.16")
2290 (source
2291 (origin
2292 (method git-fetch)
2293 (uri (git-reference
2294 (url "https://github.com/x-stream/xstream")
2295 (commit (string-append
2296 "XSTREAM_"
2297 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
2298 version)))))
2299 (file-name (git-file-name name version))
2300 (sha256
2301 (base32 "16k2mc63h2fw7lxv74qmhg4p8q9hfrw114daa6nxwnpv08cnq755"))))
2302 (build-system ant-build-system)
2303 (arguments
2304 `(#:jar-name "xstream.jar"
2305 ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system.
2306 #:tests? #f
2307 #:jdk ,icedtea-8
2308 #:source-dir "xstream/src/java"))
2309 (inputs
2310 `(("java-jdom" ,java-jdom)
2311 ("java-jdom2" ,java-jdom2)
2312 ("java-cglib" ,java-cglib)
2313 ("java-joda-time" ,java-joda-time)
2314 ("java-jettison" ,java-jettison)
2315 ("java-xom" ,java-xom)
2316 ("java-mxparser" ,java-mxparser)
2317 ("java-xpp3" ,java-xpp3)
2318 ("java-dom4j" ,java-dom4j)
2319 ("java-stax2-api" ,java-stax2-api)
2320 ("java-woodstox-core" ,java-woodstox-core)
2321 ("java-kxml2" ,java-kxml2)
2322 ("java-stax" ,java-stax)))
2323 (home-page "https://x-stream.github.io")
2324 (synopsis "XML serialization library")
2325 (description "XStream is a simple library to serialize Java objects to XML
2326 and back again.")
2327 (license license:bsd-3)))
2328
2329 (define-public java-mxparser
2330 (package
2331 (name "java-mxparser")
2332 (version "1.2.1")
2333 (source
2334 (origin
2335 (method git-fetch)
2336 (uri (git-reference
2337 (url "https://github.com/x-stream/mxparser")
2338 (commit (string-append "v-" version))))
2339 (file-name (git-file-name name version))
2340 (sha256
2341 (base32 "0i3jrjbz4hgf62fm1ix7nlcmhi4kcv4flqsfvh7a3l2v7nsp5ryb"))))
2342 (build-system ant-build-system)
2343 (arguments
2344 `(#:jar-name "mxparser.jar"
2345 #:source-dir "src/main/java"
2346 #:test-dir "src/test"
2347 #:phases
2348 (modify-phases %standard-phases
2349 (add-before 'build 'copy-resources
2350 (lambda _
2351 (copy-recursively "src/main/resources" "build/classes")
2352 #t)))))
2353 (propagated-inputs
2354 `(("java-xmlpull-api-v1" ,java-xmlpull-api-v1)))
2355 (native-inputs
2356 `(("java-junit" ,java-junit)))
2357 (home-page "https://github.com/x-stream/mxparser")
2358 (synopsis "Streaming pull XML parser forked from @code{java-xpp3}")
2359 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
2360 parser and should be used when there is a need to process quickly and
2361 efficiently all input elements (for example in SOAP processors). This
2362 package is a stable XmlPull parsing engine that is based on ideas from XPP
2363 and in particular XPP2 but completely revised and rewritten to take the best
2364 advantage of JIT JVMs.
2365
2366 MXParser is a fork of xpp3_min 1.1.7 containing only the parser with merged
2367 changes of the Plexus fork. It is an implementation of the XMLPULL V1 API
2368 (parser only).")
2369 (license (license:non-copyleft "file://LICENSE.txt"))))
2370
2371 (define-public xmlrpc-c
2372 (package
2373 (name "xmlrpc-c")
2374 (version "1.43.08")
2375 (source (origin
2376 (method url-fetch)
2377 (uri (string-append "mirror://sourceforge/xmlrpc-c/Xmlrpc-c%20Super%20Stable/"
2378 version "/xmlrpc-c-" version ".tgz"))
2379 (sha256
2380 (base32
2381 "18zwbj6i2hpcn5riiyp8i6rml0sfv60dd7phw1x8g4r4lj2bbxf9"))))
2382 (build-system gnu-build-system)
2383 (inputs
2384 `(("curl" ,curl)))
2385 (native-inputs
2386 `(;; For tools, if ever needed.
2387 ("perl" ,perl)))
2388 (arguments
2389 `(#:make-flags ; Add $libdir to the RUNPATH of all the executables.
2390 (list (string-append "LDFLAGS_PERSONAL=-Wl,-rpath=" %output "/lib"))
2391 #:phases
2392 (modify-phases %standard-phases
2393 (add-after 'unpack 'fix-/bin/sh-in-tests
2394 (lambda _
2395 (substitute* "GNUmakefile"
2396 (("#! /bin/sh") (which "sh")))
2397 #t)))))
2398 (home-page "http://xmlrpc-c.sourceforge.net/")
2399 (synopsis "Lightweight RPC library based on XML and HTTP")
2400 (description
2401 "XML-RPC is a quick-and-easy way to make procedure calls over the Internet.
2402 It converts the procedure call into an XML document, sends it to a remote
2403 server using HTTP, and gets back the response as XML. This library provides a
2404 modular implementation of XML-RPC for C and C++.")
2405 (license (list license:psfl license:expat))))
2406
2407 (define-public opensp
2408 (package
2409 (name "opensp")
2410 (version "1.5.2")
2411 (source (origin
2412 (method url-fetch)
2413 (uri (string-append "mirror://sourceforge/openjade/opensp/"
2414 version "/OpenSP-" version ".tar.gz"))
2415 (sha256
2416 (base32
2417 "1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p"))))
2418 (outputs '("out" "doc"))
2419 (build-system gnu-build-system)
2420 (native-inputs
2421 `(("docbook-xml" ,docbook-xml-4.1.2)
2422 ("docbook-xsl" ,docbook-xsl)
2423 ("libxml2" ,libxml2) ;for XML_CATALOG_DIR
2424 ("xmlto" ,xmlto)
2425 ;; Dependencies to regenerate the 'configure' script.
2426 ("autoconf" ,autoconf)
2427 ("automake" ,automake)
2428 ("gettext" ,gettext-minimal)
2429 ("libtool" ,libtool)))
2430 (arguments
2431 `( ;; Note: we cannot use '--enable-full-doc-build' as this would require
2432 ;; Openjade, which in turn requires this package.
2433
2434 ;; Skip the tests that are known to fail (see:
2435 ;; https://sourceforge.net/p/openjade/mailman/message/6182316/)
2436 #:make-flags '("TESTS_THAT_FAIL=")
2437 #:phases
2438 (modify-phases %standard-phases
2439 (add-after 'unpack 'patch-docbook-paths
2440 (lambda* (#:key inputs #:allow-other-keys)
2441 (let ((xmldoc (string-append (assoc-ref inputs "docbook-xml")
2442 "/xml/dtd/docbook"))
2443 (xsldoc (string-append (assoc-ref inputs "docbook-xsl")
2444 "/xml/xsl/docbook-xsl-"
2445 ,(package-version docbook-xsl))))
2446 (substitute* (find-files "docsrc" "\\.xml$")
2447 (("/usr/share/sgml/docbook/xml-dtd-4.1.2") xmldoc)
2448 (("http://.*/docbookx\\.dtd")
2449 (string-append xmldoc "/docbookx.dtd")))
2450 #t)))
2451 (add-after 'patch-docbook-paths 'delete-configure
2452 ;; The configure script in the release was made with an older
2453 ;; Autoconf and lacks support for the `--docdir' option.
2454 (lambda _
2455 (delete-file "configure")
2456 #t))
2457 (add-after 'delete-configure 'honor-docdir
2458 ;; docdir is not honored due to being hardcoded in the various
2459 ;; Makefile.am (see: https://sourceforge.net/p/openjade/bugs/147/).
2460 (lambda _
2461 (substitute* '("Makefile.am" "doc/Makefile.am" "docsrc/Makefile.am")
2462 (("^docdir = .*") "docdir = @docdir@\n"))
2463 #t))
2464 (add-after 'delete-configure 'fix-tests-makefile.am
2465 ;; Remove the trailing $(SHELL) from the TESTS_ENVIRONMENT variable
2466 ;; definition. Otherwise, when targets are built using
2467 ;; "$(am__check_pre) $(LOG_DRIVER) [...]", there would be two
2468 ;; $(SHELL) expansion which fails the build.
2469 (lambda _
2470 (substitute* "tests/Makefile.am"
2471 (("^\tOSGMLNORM=`echo osgmlnorm\\|sed '\\$\\(transform\\)'`\\\\")
2472 "\tOSGMLNORM=`echo osgmlnorm|sed '$(transform)'`")
2473 (("^\t\\$\\(SHELL\\)\n") ""))
2474 #t)))))
2475 ;; $SGML_CATALOG_FILES lists 'catalog' or 'CATALOG' or '*.cat' files found
2476 ;; under the 'sgml' sub-directory of any given package.
2477 (native-search-paths (list (search-path-specification
2478 (variable "SGML_CATALOG_FILES")
2479 (separator ":")
2480 (files '("sgml"))
2481 (file-pattern "^catalog$|^CATALOG$|^.*\\.cat$")
2482 (file-type 'regular))))
2483 (home-page "http://openjade.sourceforge.net/")
2484 (synopsis "Suite of SGML/XML processing tools")
2485 (description "OpenSP is an object-oriented toolkit for SGML parsing and
2486 entity management. It is a fork of James Clark's SP suite. The tools it
2487 contains can be used to parse, validate, and normalize SGML and XML files.
2488 The central program included in this package is @code{onsgmls}, which replaces
2489 @code{sgmls}, @code{ospam}, @code{ospent}, @code{osgmlnorm}, and @code{osx}.")
2490 (license
2491 ;; expat license with added clause regarding advertising
2492 (license:non-copyleft
2493 "file://COPYING"
2494 "See COPYING in the distribution."))))
2495
2496 (define-public python-elementpath
2497 (package
2498 (name "python-elementpath")
2499 (version "2.0.3")
2500 (source
2501 (origin
2502 (method url-fetch)
2503 (uri (pypi-uri "elementpath" version))
2504 (sha256
2505 (base32
2506 "1kxx573ywqfh6j6aih2i6hhsya6kz79qq4bgz6yskwk6b18jyr8z"))))
2507 (build-system python-build-system)
2508 ;; The test suite is not run, to avoid a dependency cycle with
2509 ;; python-xmlschema.
2510 (arguments `(#:tests? #f))
2511 (home-page
2512 "https://github.com/sissaschool/elementpath")
2513 (synopsis
2514 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
2515 (description
2516 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
2517 for Python's ElementTree XML data structures, both for the standard
2518 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
2519
2520 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
2521 because lxml.etree already has its own implementation of XPath 1.0.")
2522 (license license:expat)))
2523
2524 (define-public python-lxml
2525 (package
2526 (name "python-lxml")
2527 (version "4.6.3")
2528 (source
2529 (origin
2530 (method url-fetch)
2531 (uri (pypi-uri "lxml" version))
2532 (sha256
2533 (base32 "0s14r1w2x9sdlcsw8mxiqgw4rz5zs5lpqpxrfyn4a1mkndqqbdrr"))
2534 ;; Adapt a test to libxml2 2.9.12, taken from this commit:
2535 ;; https://github.com/lxml/lxml/commit/852ed1092bd80b6b9a51db24371047e
2536 (modules '((guix build utils)))
2537 (snippet
2538 '(substitute* "src/lxml/tests/test_etree.py"
2539 (("self\\.assertEqual\\(\\{'hha': None\\}, el\\.nsmap\\)")
2540 "self.assertEqual({}, el.nsmap)")))))
2541 (build-system python-build-system)
2542 (arguments
2543 `(#:phases (modify-phases %standard-phases
2544 (replace 'check
2545 (lambda _
2546 (invoke "make" "test"))))))
2547 (inputs
2548 `(("libxml2" ,libxml2)
2549 ("libxslt" ,libxslt)))
2550 (home-page "https://lxml.de/")
2551 (synopsis "Python XML processing library")
2552 (description
2553 "The lxml XML toolkit is a Pythonic binding for the C libraries
2554 libxml2 and libxslt.")
2555 (license license:bsd-3))) ; and a few more, see LICENSES.txt
2556
2557 (define-public python2-lxml
2558 (package-with-python2 python-lxml))
2559
2560 (define-public python-xmlschema
2561 (package
2562 (name "python-xmlschema")
2563 (version "1.2.5")
2564 (source (origin
2565 ;; Unit tests are not distributed with the PyPI archive.
2566 (method git-fetch)
2567 (uri (git-reference
2568 (url "https://github.com/sissaschool/xmlschema")
2569 (commit (string-append "v" version))))
2570 (file-name (git-file-name name version))
2571 (sha256
2572 (base32
2573 "0rsa75x86gdjalvy4riq7613szb616hff80crx006chyppzdkxmq"))))
2574 (build-system python-build-system)
2575 (arguments
2576 '(#:phases
2577 (modify-phases %standard-phases
2578 (replace 'check
2579 (lambda* (#:key tests? #:allow-other-keys)
2580 (if tests?
2581 ;; Disable test_export_remote__issue_187, which is known to
2582 ;; fail (see:
2583 ;; https://github.com/sissaschool/xmlschema/issues/206).
2584 (invoke "python" "-m" "unittest" "-v"
2585 "-k" "not test_export_remote__issue_187")
2586 (format #t "test suite not run~%")))))))
2587 (native-inputs
2588 `(("python-lxml" ,python-lxml))) ;for tests
2589 (propagated-inputs
2590 `(("python-elementpath" ,python-elementpath)))
2591 (home-page "https://github.com/sissaschool/xmlschema")
2592 (synopsis "XML Schema validator and data conversion library")
2593 (description
2594 "The @code{xmlschema} library is an implementation of
2595 @url{https://www.w3.org/2001/XMLSchema, XML Schema} for Python. It has
2596 full support for the XSD 1.0 and 1.1 standards, an XPath-based API for
2597 finding schema's elements and attributes; and can encode and decode
2598 XML data to JSON and other formats.")
2599 (license license:expat)))
2600
2601 (define-public python-xmltodict
2602 (package
2603 (name "python-xmltodict")
2604 (version "0.12.0")
2605 (source
2606 (origin
2607 (method url-fetch)
2608 (uri (pypi-uri "xmltodict" version))
2609 (sha256
2610 (base32
2611 "08cadlb9vsb4pmzc99lz3a2lx6qcfazyvgk10pcqijvyxlwcdn2h"))))
2612 (build-system python-build-system)
2613 (native-inputs
2614 `(("python-coverage" ,python-coverage)
2615 ("python-nose" ,python-nose)))
2616 (home-page "https://github.com/martinblech/xmltodict")
2617 (synopsis "Work with XML like you are working with JSON")
2618 (description "This package provides a Python library to convert XML to
2619 @code{OrderedDict}.")
2620 (license license:expat)))