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>
37 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
88 (define-public libxmlb
97 (url "https://github.com/hughsie/libxmlb")
99 (file-name (git-file-name name version))
101 (base32 "1mb73pnfwqc4mm0lm16yfn0lj495h8hcciprb2v6wgy3ifnnjxib"))))
102 (build-system meson-build-system)
104 `(#:glib-or-gtk? #t))
106 `(("gobject-introspection" ,gobject-introspection)
107 ("gtk-doc" ,gtk-doc/stable)
108 ("pkg-config" ,pkg-config)))
110 `(("appstream-glib" ,appstream-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+)))
125 (source (let ((dot->underscore (lambda (c) (if (char=? #\. c) #\_ c))))
128 (uri (list (string-append "mirror://sourceforge/expat/expat/"
129 version "/expat-" version ".tar.xz")
131 "https://github.com/libexpat/libexpat/releases/download/R_"
132 (string-map dot->underscore version)
133 "/expat-" version ".tar.xz")))
136 "0spvyb9d3hijs4ys3x64cfmilsynl8kv6clfahv8d4lvp86js0yg")))))
137 (build-system gnu-build-system)
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")
150 "old_library=''"))))))))
151 (outputs '("out" "static"))
152 (home-page "https://libexpat.github.io/")
153 (synopsis "Stream-oriented XML parser library written in C")
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)))
160 (define-public libebml
167 (uri (string-append "https://dl.matroska.org/downloads/libebml/"
168 "libebml-" version ".tar.xz"))
170 (base32 "1wmri5c94b02q2z32bqlpfs4vbw0n0c602321wigna2qw1y27is1"))))
171 (build-system cmake-build-system)
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)))
184 (define-public libxml2
190 (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-"
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"))
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")
210 (for-each (lambda (dir)
211 (rename-file (string-append src "/share/" dir)
212 (string-append doc "/" dir)))
214 (for-each (lambda (ar)
215 (rename-file ar (string-append dst "/"
217 (find-files (string-append src "/lib") "\\.a$"))
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")
235 (file-pattern "^catalog\\.xml$")
236 (file-type 'regular))))
237 (search-paths native-search-paths)
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)))
243 (define-public libxml2-xpath0
244 (package/inherit libxml2
245 (name "libxml2-xpath0")
247 (inherit (package-source libxml2))
248 (patches (append (search-patches
249 "libxml2-xpath0-Add-option-xpath0.patch")
250 (origin-patches (package-source libxml2))))))
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.")))
256 (define-public libxlsxwriter
258 (name "libxlsxwriter")
264 (url "https://github.com/jmcnamara/libxlsxwriter")
265 (commit (string-append "RELEASE_" version))))
266 (file-name (git-file-name name version))
268 (base32 "14c5rgx87nhzasr0j7mcfr1w7ifz0gmdiqy2xq59di5xvcdrpxpv"))
269 (modules '((guix build utils)))
271 ;; Remove bundled minizip source
273 (delete-file-recursively "third_party/minizip")
275 (build-system gnu-build-system)
277 `(#:test-target "test"
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")
284 (modify-phases %standard-phases
285 (delete 'configure)))) ; no configure script
287 `(("python-pytest" ,python-pytest)))
289 `(("minizip" ,minizip)))
290 (home-page "https://github.com/jmcnamara/libxlsxwriter")
291 (synopsis "C library for creating Excel XLSX files")
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
298 (define-public python-libxml2
299 (package/inherit libxml2
300 (name "python-libxml2")
302 (inherit (package-source libxml2))
304 (append (search-patches "python-libxml2-utf8.patch")
305 (origin-patches (package-source libxml2))))))
306 (build-system python-build-system)
309 `(;; XXX: Tests are specified in 'Makefile.am', but not in 'setup.py'.
312 (modify-phases %standard-phases
315 (lambda* (#:key inputs #:allow-other-keys)
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'.
323 (format #f "ROOT = r'~a'" libxml2))
326 (string-append glibc "/include")))))))))
327 (inputs `(("libxml2" ,libxml2)))
328 (synopsis "Python bindings for the libxml2 library")))
330 (define-public python2-libxml2
331 (package-with-python2 python-libxml2))
333 (define-public libxslt
339 (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-"
343 "0zrzz6kjdyavspzik6fbkpvfpbd25r2qg6py5nnjaabrsr3bvccq"))
344 (patches (search-patches "libxslt-generated-ids.patch"))))
345 (build-system gnu-build-system)
347 `(#:phases (modify-phases %standard-phases
348 (add-before 'check 'disable-fuzz-tests
350 ;; Disable libFuzzer tests, because they require
351 ;; instrumentation builds of libxml2 and libxslt.
352 (substitute* "tests/Makefile"
353 (("exslt plugins fuzz")
356 (home-page "http://xmlsoft.org/XSLT/index.html")
357 (synopsis "C library for applying XSLT stylesheets to XML documents")
358 (inputs `(("libgcrypt" ,libgcrypt)
360 ("python" ,python-minimal-wrapper)
364 `(("pkg-config" ,pkg-config)))
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)))
370 (define-public openjade
376 (uri (string-append "mirror://sourceforge/openjade/openjade/"
377 version "/" name "-" version ".tar.gz"))
380 "1l92sfvx1f0wmkbvzv1385y1gb3hh010xksi1iyviyclrjb7jb8x"))))
381 (build-system gnu-build-system)
384 (list (string-append "--enable-spincludedir="
385 (assoc-ref %build-inputs "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).
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/).
398 (modify-phases %standard-phases
399 (add-after 'unpack 'replace-deprecated-getopt
400 ;; See: https://sourceforge.net/p/openjade/bugs/140/.
402 (substitute* "msggen.pl"
403 (("use POSIX;") "use POSIX;\nuse Getopt::Std;")
404 (("do 'getopts.pl';") "")
405 (("&Getopts") "getopts"))
407 (add-after 'replace-deprecated-getopt 'fix-locale-lookup
408 ;; See: https://sourceforge.net/p/openjade/bugs/149/.
410 (substitute* "testsuite/expr-lang.dsl"
411 (("\\(language \"EN\" \"US\"\\)")
412 "(language \"EN\" \"US.UTF-8\")"))
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)
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")))
427 (copy-recursively "dsssl" dtd)
430 (add-after 'install 'check
431 (lambda* (#:key tests? out #:allow-other-keys)
433 (with-directory-excursion "testsuite"
435 (format #t "test suite not run~%"))
438 `(("opensp" ,opensp)))
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."))))
450 (define-public perl-graph-readwrite
452 (name "perl-graph-readwrite")
458 "mirror://cpan/authors/id/N/NE/NEILB/Graph-ReadWrite-"
463 "0jlsg64pmy6ka5q5gy851nnyfgjzvhyxc576bhns3vi2x5ng07mh"))))
464 (build-system perl-build-system)
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.
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)))
482 (define-public perl-xml-atom
484 (name "perl-xml-atom")
488 (uri (string-append "mirror://cpan/authors/id/M/MI/MIYAGAWA/"
489 "XML-Atom-" version ".tar.gz"))
492 "0b8bpdnvz9sqwjhjkydbzy4karb7nn6i15b8g4mczrznlsb3hnaf"))))
493 (build-system perl-build-system)
496 (modify-phases %standard-phases
497 (add-before 'check 'set-perl-search-path
500 (string-append (getcwd) ":"
501 (getenv "PERL5LIB")))
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)))
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")
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)))
524 (define-public perl-xml-descent
526 (name "perl-xml-descent")
530 (uri (string-append "mirror://cpan/authors/id/A/AN/ANDYA/"
531 "XML-Descent-" version ".tar.gz"))
534 "0l5xmw2hd95ypppz3lyvp4sn02ccsikzjwacli3ydxfdz1bbh4d7"))))
535 (build-system perl-build-system)
537 `(("perl-module-build" ,perl-module-build)))
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")
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).
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)))
552 (define-public perl-xml-parser
554 (name "perl-xml-parser")
559 "mirror://cpan/authors/id/T/TO/TODDR/XML-Parser-"
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")
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")))
583 (define-public perl-xml-tokeparser
585 (name "perl-xml-tokeparser")
589 (uri (string-append "mirror://cpan/authors/id/P/PO/PODMASTER/"
590 "XML-TokeParser-" version ".tar.gz"))
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")
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)))
606 (define-public perl-libxml
613 "mirror://cpan/authors/id/K/KM/KMACLEOD/libxml-perl-"
617 "1jy9af0ljyzj7wakqli0437zb2vrbplqj4xhab7bfj2xgfdhawa5"))))
618 (build-system perl-build-system)
620 `(("perl-xml-parser" ,perl-xml-parser)))
621 (license license:perl-license)
622 (synopsis "Perl modules for working with XML")
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")))
630 (define-public perl-xml-libxml
632 (name "perl-xml-libxml")
637 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
638 "XML-LibXML-" version ".tar.gz"))
641 "1ks69xymv6zkj7hvaymjvb78ch81abri7kg4zrwxhdfsqb8a9g7h"))))
642 (build-system perl-build-system)
644 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
645 ("perl-xml-sax" ,perl-xml-sax)))
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)))
656 (define-public perl-xml-libxml-simple
658 (name "perl-xml-libxml-simple")
662 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
663 "XML-LibXML-Simple-" version ".tar.gz"))
666 "19k50d80i9dipsl6ln0f4awv9wmdg0xm3d16z8mngmvh9c8ci66d"))))
667 (build-system perl-build-system)
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")
674 "This package provides the same API as @code{XML::Simple} but is based on
675 @code{XML::LibXML}.")
676 (license license:perl-license)))
678 (define-public perl-xml-libxslt
680 (name "perl-xml-libxslt")
685 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
686 "XML-LibXSLT-" version ".tar.gz"))
689 "0wyl8klgr65j8y8fzgwz9jlvfjwvxazna8j3dg9gksd2v973fpia"))))
690 (build-system perl-build-system)
692 `(("libxslt" ,libxslt)))
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
699 (license license:perl-license)))
701 (define-public perl-xml-namespacesupport
703 (name "perl-xml-namespacesupport")
708 (uri (string-append "mirror://cpan/authors/id/P/PE/PERIGRIN/"
709 "XML-NamespaceSupport-" version ".tar.gz"))
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
720 (license license:perl-license)))
722 (define-public perl-xml-rss
724 (name "perl-xml-rss")
728 (uri (string-append "mirror://cpan/authors/id/S/SH/SHLOMIF/"
729 "XML-RSS-" version ".tar.gz"))
732 "0klb8ghd405pdkmn25lp3i4j2lfydz8w581sk51p3zy788s0c9yk"))))
733 (build-system perl-build-system)
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)
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")
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)))
757 (define-public perl-xml-sax
759 (name "perl-xml-sax")
764 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
765 "XML-SAX-" version ".tar.gz"))
767 (base32 "0am13vnv8qsjafr5ljakwnkhlwpk15sga02z8mxsg9is0j3w61j5"))))
768 (build-system perl-build-system)
770 `(("perl-xml-namespacesupport" ,perl-xml-namespacesupport)
771 ("perl-xml-sax-base" ,perl-xml-sax-base)))
773 `(#:phases (modify-phases %standard-phases
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)
781 (string-append (getenv "PERL5LIB") ":"
782 (assoc-ref outputs "out")
783 "/lib/perl5/site_perl"))
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)))
791 (define-public perl-xml-sax-base
793 (name "perl-xml-sax-base")
798 (uri (string-append "mirror://cpan/authors/id/G/GR/GRANTM/"
799 "XML-SAX-Base-" version ".tar.gz"))
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()
811 (license license:perl-license)))
813 (define-public perl-xml-simple
815 (name "perl-xml-simple")
820 "mirror://cpan/authors/id/G/GR/GRANTM/XML-Simple-"
824 "1y6vh328zrh085d40852v4ij2l4g0amxykswxd1nfhd2pspds7sk"))))
825 (build-system perl-build-system)
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")
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
835 (home-page "https://metacpan.org/release/XML-Simple")))
837 (define-public perl-xml-regexp
839 (name "perl-xml-regexp")
844 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-RegExp-"
848 "0m7wj00a2kik7wj0azhs1zagwazqh3hlz4255n75q21nc04r06fz"))))
849 (build-system perl-build-system)
851 `(("perl-xml-parser" ,perl-xml-parser)))
852 (license license:perl-license)
853 (synopsis "Perl regular expressions for XML tokens")
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")))
860 (define-public perl-xml-dom
862 (name "perl-xml-dom")
867 "mirror://cpan/authors/id/T/TJ/TJMATHER/XML-DOM-"
871 "0phpkc4li43m2g44hdcvyxzy9pymqwlqhh5hwp2xc0cv8l5lp8lb"))))
872 (build-system perl-build-system)
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)
880 "Perl module for building DOM Level 1 compliant document structures")
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")))
889 (define-public perl-xml-compile-tester
891 (name "perl-xml-compile-tester")
895 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
896 "XML-Compile-Tester-" version ".tar.gz"))
899 "1drzwziwi96rfkh48qpw4l225mcbk8ppl2157nj92cslcpwwdk75"))))
900 (build-system perl-build-system)
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")
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)))
912 (define-public perl-xml-compile
914 (name "perl-xml-compile")
918 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
919 "XML-Compile-" version ".tar.gz"))
922 "0psr5pwsk2biz2bfkigmx04v2rfhs6ybwcfmcrrg7gvh9bpp222b"))))
923 (build-system perl-build-system)
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")
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
937 (license license:perl-license)))
939 (define-public perl-xml-compile-cache
941 (name "perl-xml-compile-cache")
945 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
946 "XML-Compile-Cache-" version ".tar.gz"))
949 "181qf1s7ymgi7saph3cf9p6dbxkxyh1ja23na4dchhi8v5mi66sr"))))
950 (build-system perl-build-system)
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")
959 "This package provides methods to cache compiled XML translators.")
960 (license license:perl-license)))
962 (define-public perl-xml-compile-soap
964 (name "perl-xml-compile-soap")
968 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
969 "XML-Compile-SOAP-" version ".tar.gz"))
972 "0pkcph562l2ij7rlwlvm58v6y062qsbydfpaz2qnph2ixqy0xfd1"))))
973 (build-system perl-build-system)
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")
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
988 (license license:perl-license)))
990 (define-public perl-xml-compile-wsdl11
992 (name "perl-xml-compile-wsdl11")
996 (uri (string-append "mirror://cpan/authors/id/M/MA/MARKOV/"
997 "XML-Compile-WSDL11-" version ".tar.gz"))
1000 "09ayl442hzvn97q4ghn5rz4r82dm9w3l69hixhb29h9xq9ysi7ba"))))
1001 (build-system perl-build-system)
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")
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)))
1016 (define-public perl-xml-feed
1018 (name "perl-xml-feed")
1022 (uri (string-append "mirror://cpan/authors/id/D/DA/DAVECROSS/"
1023 "XML-Feed-" version ".tar.gz"))
1026 "04frqhikmyq0i9ldraisbvppyjhqg6gz83l2rqpmp4f2h9n9k2lw"))))
1027 (build-system perl-build-system)
1029 `(("perl-module-build" ,perl-module-build)
1030 ("perl-uri" ,perl-uri)
1031 ("perl-class-data-inheritable" ,perl-class-data-inheritable)))
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)))
1056 (define-public perl-xml-xpath
1058 (name "perl-xml-xpath")
1062 (uri (string-append "mirror://cpan/authors/id/M/MA/MANWAR/"
1063 "XML-XPath-" version ".tar.gz"))
1066 "03yxj7w5a43ibbpiqsvb3lswj2b71dydsx4rs2fw0p8n0l3i3j8w"))))
1067 (build-system perl-build-system)
1069 `(("perl-path-tiny" ,perl-path-tiny)))
1071 `(("perl-xml-parser" ,perl-xml-parser)))
1072 (home-page "https://metacpan.org/release/XML-XPath")
1073 (synopsis "Parse and evaluate XPath statements")
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)))
1080 (define-public pugixml
1087 (uri (string-append "https://github.com/zeux/pugixml/releases/download/v"
1088 version "/pugixml-" version ".tar.gz"))
1090 (base32 "0b5apqiisq8yk51x0cwks4h2m0zd2zgjdy0w80qp9h5rccz3v496"))))
1091 (build-system cmake-build-system)
1093 `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON")
1094 #:tests? #f)) ; no tests
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")
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
1107 (license license:expat)))
1109 (define-public python-pyxb
1111 (name "python-pyxb")
1115 (uri (pypi-uri "PyXB" version))
1118 "1d17pyixbfvjyi2lb0cfp0ch8wwdf44mmg3r5pwqhyyqs66z601a"))))
1119 (build-system python-build-system)
1120 (home-page "http://pyxb.sourceforge.net/")
1121 (synopsis "Python XML Schema Bindings")
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
1130 (define-public python2-pyxb
1131 (package-with-python2 python-pyxb))
1133 (define-public xmlto
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"))
1147 "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"))))
1148 (build-system gnu-build-system)
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
1156 `(("util-linux" ,util-linux)))
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")
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+)))
1169 (define-public xmlsec
1175 (uri (string-append "https://www.aleksey.com/xmlsec/download/"
1176 "xmlsec1-" version ".tar.gz"))
1179 "0hy0nwz57n9r5wwab9xa66gzwlwvzs54nhlfn3jh8q13acl710z3"))))
1180 (build-system gnu-build-system)
1181 (propagated-inputs ; according to xmlsec1.pc
1182 `(("libxml2" ,libxml2)
1183 ("libxslt" ,libxslt)))
1185 `(("gnutls" ,gnutls)
1186 ("libgcrypt" ,libgcrypt)
1187 ("libltdl" ,libltdl)))
1189 `(("pkg-config" ,pkg-config)))
1190 (home-page "https://www.aleksey.com/xmlsec/")
1191 (synopsis "XML Security Library")
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
1197 (license (license:x11-style "file://COPYING"
1198 "See 'COPYING' in the distribution."))))
1200 (define-public xmlsec-nss
1201 (package/inherit xmlsec
1205 `(("nss:bin" ,nss "bin") ; for certutil
1206 ,@(package-native-inputs xmlsec)))
1209 ("libltdl" ,libltdl)))
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)")))
1215 (define-public xmlsec-openssl
1216 (package/inherit xmlsec
1217 (name "xmlsec-openssl")
1219 `(("openssl" ,openssl)
1220 ("libltdl" ,libltdl)))
1221 (synopsis "XML Security Library (using OpenSSL instead of GnuTLS)")))
1223 (define-public minixml
1229 (uri (string-append "https://github.com/michaelrsweet/mxml/"
1230 "releases/download/v" version
1231 "/mxml-" version ".tar.gz"))
1234 "0x698ayv00vrjg0yfm20lakpgl7m02x1fk2n09wygwk4973gd55q"))))
1235 (build-system gnu-build-system)
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")
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+)))
1249 ;; TinyXML is an unmaintained piece of software, so the patches and build
1250 ;; system massaging have no upstream potential.
1251 (define-public tinyxml
1257 (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
1259 (string-join (string-split version #\.) "_")
1261 (file-name (string-append name "-" version ".tar.gz"))
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.
1271 (modify-phases %standard-phases
1273 (add-after 'build 'build-shared-library
1275 (invoke "g++" "-Wall" "-O2" "-shared" "-fpic"
1276 "tinyxml.cpp" "tinyxmlerror.cpp"
1277 "tinyxmlparser.cpp" "tinystr.cpp"
1278 "-o" "libtinyxml.so")))
1280 (lambda _ (invoke "./xmltest")))
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.
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")
1298 (format port "prefix=~a
1299 exec_prefix=${prefix}
1300 libdir=${exec_prefix}/lib
1301 includedir=${prefix}/include
1304 Description: A simple, small, C++ XML parser
1306 Libs: -L${libdir} -ltinyxml
1307 Cflags: -I${includedir}
1312 (copy-recursively "docs" (string-append doc "tinyxml"))
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)))
1320 (define-public tinyxml2
1328 (url "https://github.com/leethomason/tinyxml2")
1330 (file-name (git-file-name name version))
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)))
1340 (define-public xmlstarlet
1347 (uri (string-append "mirror://sourceforge/xmlstar/xmlstarlet/"
1348 version "/xmlstarlet-" version ".tar.gz"))
1351 "1jp737nvfcf6wyb54fla868yrr39kcbijijmjpyk4lrpyg23in0m"))))
1352 (build-system gnu-build-system)
1355 (modify-phases %standard-phases
1356 (add-before 'check 'drop-failing-tests
1358 ;; FIXME: Why are these tests failing.
1359 (substitute* "Makefile"
1360 (("^examples/schema1\\\\") "\\")
1361 (("^examples/valid1\\\\") "\\"))
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"))
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
1380 (license license:x11)))
1382 (define-public html-xml-utils
1384 (name "html-xml-utils")
1390 "https://www.w3.org/Tools/HTML-XML-utils/html-xml-utils-"
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:
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\"
1434 (license license:expat)))
1436 (define-public xlsx2csv
1444 (url "https://github.com/dilshod/xlsx2csv")
1446 (file-name (git-file-name name version))
1448 (base32 "168dm6p7w6pvgd87yb9hcxv9y0liv6mxgril202nfva68cp8y939"))))
1449 (build-system python-build-system)
1451 `(#:python ,python-2 ; use python-2 for the test script
1453 (modify-phases %standard-phases
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")
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+)))
1468 (define-public python-defusedxml
1470 (name "python-defusedxml")
1475 (uri (pypi-uri "defusedxml" version))
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")
1483 "Defusedxml provides XML bomb protection for Python stdlib modules.")
1484 (license license:psfl)))
1486 (define-public python2-defusedxml
1487 (package-with-python2 python-defusedxml))
1489 (define-public freexl
1495 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1496 "freexl-" version ".tar.gz"))
1499 "08pwj17l0lgp6zms9nmpawdxpvhzrslklbd53s4b430k7mxbbs1x"))))
1500 (build-system gnu-build-system)
1501 (home-page "https://www.gaia-gis.it/fossil/freexl/index")
1502 (synopsis "Read Excel files")
1504 "FreeXL is a C library to extract valid data from within an Excel (.xls)
1506 ;; Any of these licenses may be picked.
1507 (license (list license:gpl2+
1511 (define-public xerces-c
1517 (uri (string-append "mirror://apache/xerces/c/3/sources/"
1518 "xerces-c-" version ".tar.xz"))
1521 "0jf1khvlssg31vkxbc25dxjxcxm56xb8nywj1sypj6hxzjlrkz0j"))))
1522 (build-system gnu-build-system)
1524 (let ((system (or (%current-target-system)
1525 (%current-system))))
1526 (if (string-prefix? "x86_64" system)
1528 '(#:configure-flags '("--disable-sse2")))))
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
1538 (license license:asl2.0)))
1540 (define-public xlsxio
1548 (url "https://github.com/brechtsanders/xlsxio")
1550 (file-name (git-file-name name version))
1552 (base32 "0jr6ggzhd8aakdvppcl8scy9j9jafg82zbzr4ih996sz8lrj90fn"))))
1556 ("minizip" ,minizip)
1558 (build-system gnu-build-system)
1561 (modify-phases %standard-phases
1565 (lambda* (#:key outputs #:allow-other-keys)
1566 (invoke "make" "install"
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)))
1576 (define-public java-simple-xml
1578 (name "java-simple-xml")
1582 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
1586 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))
1587 (patches (search-patches "java-simple-xml-fix-tests.patch"))))
1588 (build-system ant-build-system)
1590 `(#:build-target "build"
1591 #:test-target "test"
1593 (modify-phases %standard-phases
1594 (replace 'install (install-jars "jar")))))
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)))
1607 (define-public perl-xml-xpathengine
1609 (name "perl-xml-xpathengine")
1613 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1614 "XML-XPathEngine-" version ".tar.gz"))
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")
1622 "This module provides an XPath engine, that can be re-used by other
1623 modules/classes that implement trees.
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)))
1632 (define-public perl-tree-xpathengine
1634 (name "perl-tree-xpathengine")
1638 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1639 "Tree-XPathEngine-" version ".tar.gz"))
1642 "1vbbw8wxm79r3xbra8narw1dqvm34510q67wbmg2zmj6zd1k06r9"))))
1643 (build-system perl-build-system)
1644 (home-page "https://metacpan.org/release/Tree-XPathEngine")
1645 (synopsis "Re-usable XPath engine")
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)))
1653 (define-public perl-xml-filter-buffertext
1655 (name "perl-xml-filter-buffertext")
1660 (uri (string-append "mirror://cpan/authors/id/R/RB/RBERJON/"
1661 "XML-Filter-BufferText-" version ".tar.gz"))
1664 "0p5785c1dsk6kdp505vapb5h54k8krrz8699hpgm9igf7dni5llg"))))
1665 (build-system perl-build-system)
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)))
1677 (define-public perl-xml-sax-writer
1679 (name "perl-xml-sax-writer")
1684 "mirror://cpan/authors/id/P/PE/PERIGRIN/"
1685 "XML-SAX-Writer-" version ".tar.gz"))
1688 "1w1cd1ybxdvhmnxdlkywi3x5ka3g4md42kyynksjc09vyizd0q9x"))))
1689 (build-system perl-build-system)
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")
1698 "This is an XML writer that understands SAX2. It is based on
1699 @code{XML::Handler::YAWriter}.")
1700 (license license:perl-license)))
1702 (define-public perl-xml-handler-yawriter
1704 (name "perl-xml-handler-yawriter")
1709 (uri (string-append "mirror://cpan/authors/id/K/KR/KRAEHE/"
1710 "XML-Handler-YAWriter-" version ".tar.gz"))
1713 "11d45a1sz862va9rry3p2m77pwvq3kpsvgwhc5ramh9mbszbnk77"))))
1714 (build-system perl-build-system)
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)))
1723 (define-public perl-xml-twig
1725 (name "perl-xml-twig")
1729 (uri (string-append "mirror://cpan/authors/id/M/MI/MIROD/"
1730 "XML-Twig-" version ".tar.gz"))
1733 "1bc0hrz4jp6199hi29sdxmb9gyy45whla9hd19yqfasgq8k5ixzy"))))
1734 (build-system perl-build-system)
1736 `(("expat" ,expat)))
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.
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
1762 (license license:perl-license)))
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
1773 (uri (string-append "mirror://apache/xerces/xml-commons/source/"
1774 "xml-commons-external-" version "-src.tar.gz"))
1776 (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
1777 (build-system ant-build-system)
1779 `(#:jar-name "jaxp.jar"
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:
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
1796 (license (list license:asl2.0
1797 license:w3c ;; Files under org.w3c
1798 license:public-domain)))) ;; org.xml.sax
1800 (define-public java-apache-xml-commons-resolver
1802 (name "java-apache-xml-commons-resolver")
1807 (uri (string-append "mirror://apache/xerces/xml-commons/"
1808 "xml-commons-resolver-" version ".tar.gz"))
1810 (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
1811 (modules '((guix build utils)))
1814 (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
1816 (build-system ant-build-system)
1818 `(#:jar-name (string-append "xml-resolver.jar")
1819 #:tests? #f)); no tests
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.
1828 It also includes a framework of classes designed to read catalog files
1829 in a number of formats:
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.
1837 (license license:asl2.0)))
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
1843 (name "java-jaxen-bootstrap")
1847 ;; No release on github
1848 (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
1849 version "/jaxen-" version "-sources.jar"))
1852 "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
1853 (build-system ant-build-system)
1855 `(#:jar-name "jaxen.jar"
1857 #:tests? #f; no tests
1859 (modify-phases %standard-phases
1860 (add-before 'build 'remove-dom4j
1862 (delete-file-recursively "src/org/jaxen/dom4j")
1863 (delete-file-recursively "src/org/jaxen/xom")
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
1874 (license license:bsd-3)))
1876 (define-public java-jaxen
1878 (inherit java-jaxen-bootstrap)
1881 `(("java-jdom" ,java-jdom)
1882 ("java-xom" ,java-xom)
1883 ("java-dom4j" ,java-dom4j)))))
1885 (define-public java-xom
1892 (url "https://github.com/elharo/xom")
1893 (commit (string-append "XOM_" version))))
1894 (file-name (git-file-name name version))
1897 "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq"))
1898 (modules '((guix build utils)))
1901 (for-each delete-file
1902 (find-files "." "\\.jar$"))
1904 (build-system ant-build-system)
1906 `(#:jar-name "xom.jar"
1908 #:tests? #f ; no tests
1910 (modify-phases %standard-phases
1911 (add-after 'unpack 'make-git-checkout-writable
1913 (for-each make-file-writable (find-files "."))
1915 (add-before 'configure 'fix-tagsoup-dep
1917 ;; FIXME: Where is tagsoup source?
1918 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
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.")
1931 (license license:lgpl2.1)))
1933 (define-public java-xsdlib
1935 (name "java-xsdlib")
1939 (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/"
1940 "datatype/xsd/xsdlib/" version "/xsdlib-"
1941 version "-sources.jar"))
1944 "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
1945 (build-system ant-build-system)
1947 `(#:tests? #f; no tests
1948 #:jar-name "xsdlib.jar"
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
1957 (license license:bsd-2)))
1959 (define-public java-xpp3
1965 (uri (string-append "http://www.extreme.indiana.edu/dist/"
1966 "java-repository/xpp3/distributions/xpp3-"
1967 version "_src.tgz"))
1970 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
1971 (modules '((guix build utils)))
1973 '(begin ;; Delete bundled jar archives.
1974 (for-each delete-file (find-files "." ".*\\.jar"))
1976 (build-system ant-build-system)
1978 `(#:tests? #f; no tests
1979 #:build-target "jar"
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"))))
1993 (define-public java-xmlpull2
1995 (name "java-xmlpull2")
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"))
2004 "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
2005 (modules '((guix build utils)))
2007 '(begin ;; Delete bundled jar archives.
2008 (for-each delete-file (find-files "." ".*\\.jar"))
2010 (build-system ant-build-system)
2012 `(#:tests? #f; no tests
2013 #:build-target "impl"
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"))))
2026 (define-public java-xmlpull-api-v1
2028 (name "java-xmlpull-api-v1")
2029 (version "1.1.3.4b")
2031 ;; The package is originally from Extreme! Lab, but the website
2032 ;; is now gone. This repositories contains the sources of the
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))
2042 "15bdqxfncnakskna4m9gsh4f9iczxy83qxn2anqiqd15z406a5ih"))
2043 (modules '((guix build utils)))
2046 (delete-file-recursively "lib")
2048 ;; prevents a failure in "dist_lite"
2049 (substitute* "build.xml"
2050 (("README.html") "README.md"))))))
2051 (build-system ant-build-system)
2053 `(#:test-target "junit"
2054 #:build-target "dist"
2056 (modify-phases %standard-phases
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
2064 ,(string-join (string-split version #\.) "_"))))
2066 (copy-recursively (string-append "build/dist/" project "/doc/")
2069 (copy-file (string-append "build/dist/" project "/" project ".jar")
2070 (string-append java "/" project ".jar")))
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)))
2080 (define-public java-dom4j
2087 (url "https://github.com/dom4j/dom4j")
2088 (commit (string-append "version-" version))))
2089 (file-name (git-file-name name version))
2092 "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl"))
2093 (modules '((guix build utils)))
2095 '(begin ;; Delete bundled jar archives.
2096 (for-each delete-file (find-files "." ".*\\.jar"))
2098 (build-system ant-build-system)
2100 `(#:jar-name "dom4j.jar"
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.
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")
2122 (add-before 'build 'fix-old-xpp2
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
2131 public boolean removeAttributeByName(String name, String name2) {\n
2133 }\n\npublic void resetStartTag")
2134 (("Atttribute") "Attribute"))
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)))
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"))))
2153 (define-public java-kxml2
2160 (url "https://github.com/stefanhaustein/kxml2")
2161 (commit (string-append "v" version))))
2162 (file-name (git-file-name name version))
2165 "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg"))))
2166 (build-system ant-build-system)
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.
2175 (modify-phases %standard-phases
2176 (add-after 'unpack 'make-git-checkout-writable
2178 (for-each make-file-writable (find-files "."))
2180 (add-before 'build 'copy-resources
2182 (copy-recursively "src/main/resources" "build/classes")
2185 `(("java-xpp3" ,java-xpp3)))
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)))
2195 (define-public java-stax
2201 (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
2202 version "/stax-" version "-sources.jar"))
2205 "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
2206 (build-system ant-build-system)
2208 `(#:jar-name "stax.jar"
2209 #:tests? #f; no tests
2211 (modify-phases %standard-phases
2212 (add-before 'configure 'fix-utf8
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"
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)))
2227 (define-public java-jettison
2229 (name "java-jettison")
2234 (url "https://github.com/codehaus/jettison")
2235 (commit (string-append "jettison-" version))))
2236 (file-name (git-file-name name version))
2239 "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw"))))
2240 (build-system ant-build-system)
2242 `(#:jar-name "jettison.jar"
2243 #:source-dir "src/main/java"
2244 #:test-exclude (list "**/Abstract*.java"
2247 "**/BadgerFishDOMTest.java"
2248 "**/MappedDOMTest.java")))
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)))
2259 (define-public java-jdom2
2266 (url "https://github.com/hunterhacker/jdom")
2267 (commit (string-append "JDOM-" version))))
2268 (file-name (git-file-name name version))
2271 "14vv1kxrsdvwi4cz3rx6r48w5y6fvk9cymil8qhvxwp56xxrgxiq"))))
2272 (build-system ant-build-system)
2274 `(#:build-target "package"
2275 #:tests? #f ; tests are run as part of the build process
2277 (modify-phases %standard-phases
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)))
2286 (define-public java-xstream
2288 (name "java-xstream")
2294 (url "https://github.com/x-stream/xstream")
2295 (commit (string-append
2297 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
2299 (file-name (git-file-name name version))
2301 (base32 "16k2mc63h2fw7lxv74qmhg4p8q9hfrw114daa6nxwnpv08cnq755"))))
2302 (build-system ant-build-system)
2304 `(#:jar-name "xstream.jar"
2305 ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system.
2308 #:source-dir "xstream/src/java"))
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
2327 (license license:bsd-3)))
2329 (define-public java-mxparser
2331 (name "java-mxparser")
2337 (url "https://github.com/x-stream/mxparser")
2338 (commit (string-append "v-" version))))
2339 (file-name (git-file-name name version))
2341 (base32 "0i3jrjbz4hgf62fm1ix7nlcmhi4kcv4flqsfvh7a3l2v7nsp5ryb"))))
2342 (build-system ant-build-system)
2344 `(#:jar-name "mxparser.jar"
2345 #:source-dir "src/main/java"
2346 #:test-dir "src/test"
2348 (modify-phases %standard-phases
2349 (add-before 'build 'copy-resources
2351 (copy-recursively "src/main/resources" "build/classes")
2354 `(("java-xmlpull-api-v1" ,java-xmlpull-api-v1)))
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.
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
2369 (license (license:non-copyleft "file://LICENSE.txt"))))
2371 (define-public xmlrpc-c
2377 (uri (string-append "mirror://sourceforge/xmlrpc-c/Xmlrpc-c%20Super%20Stable/"
2378 version "/xmlrpc-c-" version ".tgz"))
2381 "18zwbj6i2hpcn5riiyp8i6rml0sfv60dd7phw1x8g4r4lj2bbxf9"))))
2382 (build-system gnu-build-system)
2386 `(;; For tools, if ever needed.
2389 `(#:make-flags ; Add $libdir to the RUNPATH of all the executables.
2390 (list (string-append "LDFLAGS_PERSONAL=-Wl,-rpath=" %output "/lib"))
2392 (modify-phases %standard-phases
2393 (add-after 'unpack 'fix-/bin/sh-in-tests
2395 (substitute* "GNUmakefile"
2396 (("#! /bin/sh") (which "sh")))
2398 (home-page "http://xmlrpc-c.sourceforge.net/")
2399 (synopsis "Lightweight RPC library based on XML and HTTP")
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))))
2407 (define-public opensp
2413 (uri (string-append "mirror://sourceforge/openjade/opensp/"
2414 version "/OpenSP-" version ".tar.gz"))
2417 "1khpasr6l0a8nfz6kcf3s81vgdab8fm2dj291n5r2s53k228kx2p"))))
2418 (outputs '("out" "doc"))
2419 (build-system gnu-build-system)
2421 `(("docbook-xml" ,docbook-xml-4.1.2)
2422 ("docbook-xsl" ,docbook-xsl)
2423 ("libxml2" ,libxml2) ;for XML_CATALOG_DIR
2425 ;; Dependencies to regenerate the 'configure' script.
2426 ("autoconf" ,autoconf)
2427 ("automake" ,automake)
2428 ("gettext" ,gettext-minimal)
2429 ("libtool" ,libtool)))
2431 `( ;; Note: we cannot use '--enable-full-doc-build' as this would require
2432 ;; Openjade, which in turn requires this package.
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=")
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")))
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.
2455 (delete-file "configure")
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/).
2461 (substitute* '("Makefile.am" "doc/Makefile.am" "docsrc/Makefile.am")
2462 (("^docdir = .*") "docdir = @docdir@\n"))
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.
2470 (substitute* "tests/Makefile.am"
2471 (("^\tOSGMLNORM=`echo osgmlnorm\\|sed '\\$\\(transform\\)'`\\\\")
2472 "\tOSGMLNORM=`echo osgmlnorm|sed '$(transform)'`")
2473 (("^\t\\$\\(SHELL\\)\n") ""))
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")
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}.")
2491 ;; expat license with added clause regarding advertising
2492 (license:non-copyleft
2494 "See COPYING in the distribution."))))
2496 (define-public python-elementpath
2498 (name "python-elementpath")
2503 (uri (pypi-uri "elementpath" version))
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))
2512 "https://github.com/sissaschool/elementpath")
2514 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
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.
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)))
2524 (define-public python-lxml
2526 (name "python-lxml")
2531 (uri (pypi-uri "lxml" version))
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)))
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)
2543 `(#:phases (modify-phases %standard-phases
2546 (invoke "make" "test"))))))
2548 `(("libxml2" ,libxml2)
2549 ("libxslt" ,libxslt)))
2550 (home-page "https://lxml.de/")
2551 (synopsis "Python XML processing library")
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
2557 (define-public python2-lxml
2558 (package-with-python2 python-lxml))
2560 (define-public python-xmlschema
2562 (name "python-xmlschema")
2565 ;; Unit tests are not distributed with the PyPI archive.
2568 (url "https://github.com/sissaschool/xmlschema")
2569 (commit (string-append "v" version))))
2570 (file-name (git-file-name name version))
2573 "0rsa75x86gdjalvy4riq7613szb616hff80crx006chyppzdkxmq"))))
2574 (build-system python-build-system)
2577 (modify-phases %standard-phases
2579 (lambda* (#:key tests? #:allow-other-keys)
2581 ;; Disable test_export_remote__issue_187, which is known to
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~%")))))))
2588 `(("python-lxml" ,python-lxml))) ;for tests
2590 `(("python-elementpath" ,python-elementpath)))
2591 (home-page "https://github.com/sissaschool/xmlschema")
2592 (synopsis "XML Schema validator and data conversion library")
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)))
2601 (define-public python-xmltodict
2603 (name "python-xmltodict")
2608 (uri (pypi-uri "xmltodict" version))
2611 "08cadlb9vsb4pmzc99lz3a2lx6qcfazyvgk10pcqijvyxlwcdn2h"))))
2612 (build-system python-build-system)
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)))