summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeverin Glöckner2021-03-15 16:44:39 +0100
committerSeverin Glöckner2021-03-16 03:27:07 +0100
commit063114d70c674b08b410d59af4c58376a9f2a6cd (patch)
treed09df527504917a4822c090a1b15aa394ac6c985
parentc54fd531faa7fac8cec286b3bc9e4da0a0989178 (diff)
downloadaur-063114d70c674b08b410d59af4c58376a9f2a6cd.tar.gz
v9.5 + packaging changes
- use /usr/share/java instead of /opt - trimmed down launch scripts - place launch scripts in /usr/bin instead of symlinking them - add man page for xmltool - add dev docs - store docs & demos in /usr/share/doc/xxe
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD132
-rw-r--r--authvalue.sh7
-rw-r--r--csscheck.sh22
-rw-r--r--deployxxe.sh9
-rw-r--r--xmltool.1634
-rw-r--r--xmltool.sh24
-rw-r--r--xxe.install14
-rw-r--r--xxe.sh22
-rw-r--r--xxetool.sh18
10 files changed, 835 insertions, 74 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b7e06f33edbc..1dd913a64dcc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,37 @@
pkgbase = xmlmind-xmleditor
pkgdesc = IDE for editing XML files
- pkgver = 9.4.1
- pkgrel = 3
+ pkgver = 9.5.0
+ pkgrel = 1
url = https://www.xmlmind.com/xmleditor
install = xxe.install
arch = any
license = Custom
makedepends = libicns
+ makedepends = icoutils
makedepends = gendesk
- makedepends = elinks
depends = java-runtime>=8
depends = bash
depends = perl
optdepends = cups-pdf: for the ability to print into PDF-files
- source = http://www.xmlmind.com/xmleditor/_download/xxe-perso-9_4_1.zip
- sha256sums = 7387309eef8ece02f1379d721991884b7a68d5861d78595cabeaa43d22b3f70a
+ provides = xxe
+ source = http://www.xmlmind.com/xmleditor/_download/xxe-perso-9_5_0.zip
+ source = http://www.xmlmind.com/xmleditor/_download/xxe-devdocs-9_5_0.zip
+ source = xxe.sh
+ source = xxetool.sh
+ source = xmltool.sh
+ source = csscheck.sh
+ source = authvalue.sh
+ source = deployxxe.sh
+ source = xmltool.1
+ sha256sums = 540494c9461fbc15724a6cc2e55581ae45f80f283bb6a54a1968d1a8a0b05fd9
+ sha256sums = ef814536d19c0781fdd481977e5abd08d39c616c8f5bf7ddfa287e0ab4cadaee
+ sha256sums = e79534cc119fbf63afea0375ca8159294f3821e32b339f517acddb872c81a8ca
+ sha256sums = c28c54c62aff121c84cfcda399ff21bd914a4e2757f29358e91c6f4865208fcf
+ sha256sums = 40fd7e5f73eaf9f05adabd29715f3dc2d78f4eeddb9440bdd3aece1341308a01
+ sha256sums = 541de90c98dc15d2957834611df41872837144397735c62be67924ce8af2ef84
+ sha256sums = 61251006be3625075958f6257d5eb5eba983115312d7df32e4449a2847c5ca7f
+ sha256sums = cda6355dfc122b862694126affd50852ae8470ff1927c3af94b1e16c33140e58
+ sha256sums = dd1efd7074aef4b28c130a781f21e34ada3f9b15673ad9df61ff77dba4930482
pkgname = xmlmind-xmleditor
diff --git a/PKGBUILD b/PKGBUILD
index eb76463b63e2..08e26160c06a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,24 +2,52 @@
pkgname=xmlmind-xmleditor
_pkgname=xxe
-pkgver=9.4.1
+pkgver=9.5.0
_pkgver=${pkgver//./_}
-pkgrel=3
+pkgrel=1
pkgdesc="IDE for editing XML files"
license=('Custom')
url="https://www.xmlmind.com/xmleditor"
arch=('any')
depends=('java-runtime>=8' 'bash' 'perl')
optdepends=('cups-pdf: for the ability to print into PDF-files')
-makedepends=('libicns' 'gendesk' 'elinks')
+makedepends=('libicns' 'icoutils' 'gendesk')
+provides=('xxe')
install=${_pkgname}.install
-source=("http://www.xmlmind.com/xmleditor/_download/xxe-perso-${_pkgver}.zip")
-sha256sums=('7387309eef8ece02f1379d721991884b7a68d5861d78595cabeaa43d22b3f70a')
+source=("http://www.xmlmind.com/xmleditor/_download/xxe-perso-${_pkgver}.zip"
+ "http://www.xmlmind.com/xmleditor/_download/xxe-devdocs-${_pkgver}.zip"
+ "xxe.sh"
+ "xxetool.sh"
+ "xmltool.sh"
+ "csscheck.sh"
+ "authvalue.sh"
+ "deployxxe.sh"
+ "xmltool.1")
+sha256sums=('540494c9461fbc15724a6cc2e55581ae45f80f283bb6a54a1968d1a8a0b05fd9'
+ 'ef814536d19c0781fdd481977e5abd08d39c616c8f5bf7ddfa287e0ab4cadaee'
+ 'e79534cc119fbf63afea0375ca8159294f3821e32b339f517acddb872c81a8ca'
+ 'c28c54c62aff121c84cfcda399ff21bd914a4e2757f29358e91c6f4865208fcf'
+ '40fd7e5f73eaf9f05adabd29715f3dc2d78f4eeddb9440bdd3aece1341308a01'
+ '541de90c98dc15d2957834611df41872837144397735c62be67924ce8af2ef84'
+ '61251006be3625075958f6257d5eb5eba983115312d7df32e4449a2847c5ca7f'
+ 'cda6355dfc122b862694126affd50852ae8470ff1927c3af94b1e16c33140e58'
+ 'dd1efd7074aef4b28c130a781f21e34ada3f9b15673ad9df61ff77dba4930482')
prepare() {
- # use better icons
+ # use better icons
+
+ # 16px, 32px, 128px, 256px, 512px
icns2png -x xxe-perso-${_pkgver}/bin/icon/xxe.icns
+ # 24px, 48px
+ icotool -x xxe-perso-${_pkgver}/bin/icon/xxe.ico
+ mv xxe_4_24x24x32.png xxe_24x24x32.png
+ mv xxe_2_48x48x32.png xxe_48x48x32.png
+
+ # 64px
+ jar -xf xxe-perso-${_pkgver}/bin/xxe_tool.jar com/xmlmind/xmledittool/deploy/icon64x64.png
+ mv com/xmlmind/xmledittool/deploy/icon64x64.png xxe_64x64x32.png
+
# create launcher
gendesk -f -n \
--pkgname="$_pkgname" \
@@ -32,79 +60,49 @@ prepare() {
--mimetypes='text/xml' \
--custom="Keywords=xmlmind
Comment[de]=XML-Dateien bearbeiten"
-
- # Set Java options with a launch script
- cat << EOF > xxe.sh
-#!/bin/sh
-
-# Useful Java options:
-# -Dawt.useSystemAAFontSettings=on -> Required for proper scaling
-# -Dswing.aatext=true -> Optional
-# -Dsun.java2d.opengl=true -> Would probably cause issues with the context menus
-# -Djdk.gtk.version=3 -> Use gtk3 instead of gtk2 when using the GTK LAF
-# -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -> Set LAF
-
-export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
-
-exec /opt/xxe/bin/xxe \$@
-EOF
-
- # Save license in plain text format
- # (downloading, using consistent headings, removing website navigation stuff and website footer)
- curl https://www.xmlmind.com/xmleditor/license_xxe_perso.html | \
- sed -r -e 's/(<h)2([^>]*>)/\11\2/' | \
- sed -r -e 's/(<\/h)2([^>]*>)/\11\2/' | \
- elinks -dump -no-references -no-home | \
- sed '1,/Dictionary Builder/d' | \
- sed '/══════════════════════════════════════════════════════════════════════════/,$ d' \
- > LICENSE
-
- # If this fails, either the license or the website might have changed
- if [ "$(md5sum LICENSE)" != "a577425d88ff73d99c5f951f1932dc93 LICENSE" ]; then
- echo ""
- echo ">>> License file needs to be reviewed"
- echo ""
- exit 1
- fi
}
package() {
- mkdir -p "${pkgdir}"/opt
- mkdir -p "${pkgdir}"/usr/bin
- mkdir -p "${pkgdir}"/usr/share/doc/${_pkgname}
- mkdir -p "${pkgdir}"/usr/share/licenses/${_pkgname}
-
- cp -a xxe-perso-${_pkgver} "${pkgdir}"/opt/xxe/
+ install -dm755 "${pkgdir}"/usr/share/java
+ cp -a xxe-perso-${_pkgver} "${pkgdir}"/usr/share/java/${_pkgname}
- ln -s /opt/xxe/bin/xxetool "${pkgdir}"/usr/bin/xxetool
- ln -s /opt/xxe/bin/xmltool "${pkgdir}"/usr/bin/xmltool
- ln -s /opt/xxe/bin/csscheck "${pkgdir}"/usr/bin/csscheck
- ln -s /opt/xxe/bin/authvalue "${pkgdir}"/usr/bin/authvalue
- ln -s /opt/xxe/bin/deployxxe "${pkgdir}"/usr/bin/deployxxe
-
- ln -s /opt/xxe/doc "${pkgdir}"/usr/share/doc/${_pkgname}
- ln -s /opt/xxe/demo "${pkgdir}"/usr/share/doc/${_pkgname}
-
- ln -s /opt/xxe/legal "${pkgdir}"/usr/share/licenses/${_pkgname}
- ln -s /opt/xxe/legal.txt "${pkgdir}"/usr/share/licenses/${_pkgname}
+ # launch scripts
+ install -Dm755 xxe.sh "${pkgdir}"/usr/bin/xxe
+ install -Dm755 xxetool.sh "${pkgdir}"/usr/bin/xxetool
+ install -Dm755 xmltool.sh "${pkgdir}"/usr/bin/xmltool
+ install -Dm755 csscheck.sh "${pkgdir}"/usr/bin/csscheck
+ install -Dm755 authvalue.sh "${pkgdir}"/usr/bin/authvalue
+ install -Dm755 deployxxe.sh "${pkgdir}"/usr/bin/deployxxe
# place icons
- for size in 16 32 128 256 512; do
+ for size in 16 24 32 48 64 128 256 512; do
install -Dm644 "xxe_${size}x${size}x32.png" \
- "${pkgdir}"/usr/share/icons/hicolor/${size}x${size}/apps/xxe.png
+ "${pkgdir}"/usr/share/icons/hicolor/${size}x${size}/apps/xxe.png
done
# place launcher
- install -Dm755 xxe.sh "${pkgdir}"/usr/bin/xxe
install -Dm644 xxe.desktop -t "${pkgdir}"/usr/share/applications/
- # place license
- install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${_pkgname}/
- ln -s ${_pkgname} "${pkgdir}"/usr/share/licenses/${pkgname}
+ # place license files
+ install -dm755 "${pkgdir}"/usr/share/licenses/${pkgname}
+ mv "${pkgdir}"/usr/share/java/xxe/legal "${pkgdir}"/usr/share/licenses/${pkgname}/
+ mv "${pkgdir}"/usr/share/java/xxe/legal.txt "${pkgdir}"/usr/share/licenses/${pkgname}/
+ ln -s legal/xxe-perso.LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+ # place documentation
+ install -dm755 "${pkgdir}"/usr/share/doc/${_pkgname}
+ mv "${pkgdir}"/usr/share/java/xxe/doc "${pkgdir}"/usr/share/doc/${_pkgname}/
+ mv "${pkgdir}"/usr/share/java/xxe/demo "${pkgdir}"/usr/share/doc/${_pkgname}/
+ install -Dm644 xmltool.1 "${pkgdir}"/usr/share/man/man1/xmltool.1
# remove unneeded stuff
- find "${pkgdir}"/opt/xxe/bin/ -name \*.bat -delete
- find "${pkgdir}"/opt/xxe/bin/ -name \*.exe -delete
- rm "${pkgdir}"/opt/xxe/bin/xxe.jstart
- rm -r "${pkgdir}"/opt/xxe/bin/icon
+ find "${pkgdir}"/usr/share/java/xxe/bin/ -name \*.bat -delete
+ find "${pkgdir}"/usr/share/java/xxe/bin/ -name \*.exe -delete
+ rm "${pkgdir}"/usr/share/java/xxe/bin/xxe.jstart
+ rm "${pkgdir}"/usr/share/java/xxe/bin/{xxe,xxetool,xmltool,csscheck,authvalue,deployxxe}
+ rm -r "${pkgdir}"/usr/share/java/xxe/bin/icon
+
+ # include devdocs (optional)
+ cp -a doc/api "${pkgdir}"/usr/share/doc/xxe/doc/
+ cp -a doc/dev "${pkgdir}"/usr/share/doc/xxe/doc/
}
diff --git a/authvalue.sh b/authvalue.sh
new file mode 100644
index 000000000000..85094fd546ba
--- /dev/null
+++ b/authvalue.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+dist=/usr/share/java/xxe/bin
+cp="$dist/xxe.jar"
+
+exec java -classpath "$cp" \
+ com.xmlmind.netutil.SimpleAuthenticatorModule "$@"
diff --git a/csscheck.sh b/csscheck.sh
new file mode 100644
index 000000000000..e3ac8c45f9f9
--- /dev/null
+++ b/csscheck.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+dist=/usr/share/java/xxe/bin
+config_dir="/usr/share/java/xxe/addon/config"
+
+jars="$dist/xerces.jar:$dist/resolver.jar"
+cp="$dist/xxe.jar:$jars"
+
+c1="$config_dir/catalog.xml"
+c2="$config_dir/dita/catalog.xml"
+c3="$config_dir/docbook/catalog.xml"
+c4="$config_dir/xhtml/catalog.xml"
+c5="$config_dir/docbook5/catalog.xml"
+c6="$config_dir/docbook51/catalog.xml"
+if [ -f "$c1" ]; then
+ XML_CATALOG_FILES="$c1;$c2;$c3;$c4;$c5;$c6;$XML_CATALOG_FILES"
+ export XML_CATALOG_FILES
+fi
+
+exec java -Dxml.catalog.files="$XML_CATALOG_FILES" \
+ -classpath "$cp" \
+ com.xmlmind.xmledit.stylesheet.StyleSheetLoader "$@"
diff --git a/deployxxe.sh b/deployxxe.sh
new file mode 100644
index 000000000000..78045f4ff32c
--- /dev/null
+++ b/deployxxe.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+dist=/usr/share/java/xxe/bin
+jars="$dist/xerces.jar:$dist/resolver.jar:$dist/relaxng.jar:$dist/saxon.jar:$dist/saxon9.jar"
+cp="$dist/xxe_tool.jar:$dist/xxe.jar:$jars"
+
+exec java -classpath "$cp" \
+ -Djava.awt.headless=true \
+ com.xmlmind.xmledittool.deploy.DeployTool "$@"
diff --git a/xmltool.1 b/xmltool.1
new file mode 100644
index 000000000000..d763edd1011a
--- /dev/null
+++ b/xmltool.1
@@ -0,0 +1,634 @@
+.TH XXETOOL 1 "2021" "xmltool" "User Commands"
+.
+.SH NAME
+.
+xxetool \- database frontend
+.
+.SH SYNOPSIS
+.
+.B xmltool validate
+[\fIVALIDATE OPTIONS\fR] [\fICOMMON OPTIONS\fR]
+[\fIxml_files\fR]
+.br
+.
+.B xmltool indent
+[\fIINDENT OPTIONS\fR] [\fICOMMON OPTIONS\fR]
+[\fIxml_files\fR]
+.br
+.
+.B xmltool schematron
+[\fISCHEMATRON OPTIONS\fR] [\fICOMMON OPTIONS\fR]
+.I shematron
+[\fIxml_files\fR]
+.br
+.
+.B xmltool schemadoc
+[\fISCHEMADOC OPTIONS\fR] [\fICOMMON OPTIONS\fR]
+.I schema
+.I doc_dir
+.
+.SH DESCRIPTION
+The xmltool command-line utility can be used to validate and pretty-print (i.e. indent) XML documents and also to automatically generate a reference manual in HTML format for a schema.
+
+The xmltool utility comprises 4 different processors:
+
+.SS validate
+
+Checks the validity of a document conforming to a DTD, W3C XML Schema or RELAX NG schema. May also be used to check the validity of a DTD, W3C XML Schema or RELAX NG schema.
+
+.SS indent
+
+Saves one or more documents after reformatting their XML contents. May be also used to flatten these documents, that is, to transclude XInclude elements or DITA conrefs.
+
+.SS schematron
+
+Checks the validity of a document against a Schematron schema. May also be used to check the validity of a Schematron schema.
+
+.SS schemadoc
+
+Generates a reference manual in HTML format for a DTD, W3C XML Schema or RELAX NG schema.
+
+The generated HTML reference manual, organized like "DocBook: The Definitive Guide" by Norman Walsh and al., lists all the elements and attributes specified in the schema.
+This manual is intended to help content authors create instances conforming to a given schema. This manual is not intended to help schema authors document their design.
+Note that, for now, this documentation generator cannot extract documentation contained in a schema (i.e. in annotation/documentation elements) and merge extracted documentation with automatically generated documentation.
+.
+.SH VALIDATE OPTIONS
+.
+Validates specified XML files. If no XML files are specified, it is the schemas specified using the
+.B -s
+option which are validated.
+.
+.TP
+.BI -s \ schema
+Use specified
+.I schema
+file to validate all specified XML files.
+
+.I schema
+must be a DTD having a
+.B .dtd
+extension or a W3C XML Schema having a
+.BR .xsd , \ .xs , \ .wxs
+extension or a RELAX NG schema having a
+.BR .rng , \ .rnc
+(compact syntax) extension.
+
+By default, the
+.I schema
+used for validation is found in each specified XML file (e.g. \fB<!DOCTYPE>\fR).
+
+It is possible to specify several
+.B -s
+options:
+
+ When no XML files are specified, each schema is individually validated.
+
+ When several XML files are specified, the schemas are composed to form a compound schema (e.g. DocBook 5+MathML) and this compound schema is used to validate specified XML files.
+.
+.TP
+.B -l
+Give priority to the schemas locally specified in the file (e.g. \fB<!DOCTYPE>\fR) to be validated over those specified using the
+.B -s
+option. Ignored unless the
+.B -s
+option is used too.
+.
+.TP
+.B -f
+When validating a document, ignore false duplicate ID errors caused by multiple inclusions of the same element. When saving a document, replace such false duplicate IDs by automatically generated ones.
+.
+.SH VALIDATION EXAMPLES
+.
+.TP
+Validate docbook-image.xml against the DTD specified in its <!DOCTYPE>:
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool validate
+docbook-image.xml
+.
+.TP
+Validate docbook-table.xml and docbook-image.xml against the DocBook 4.5 DTD:
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool validate -s
+/usr/share/java/xxe/addon/config/docbook/dtd/V4.5/docbookx.dtd \\
+ docbook-table.xml docbook-image.xml
+.
+.TP
+Validate the DocBook 4.5 DTD:
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool validate -s
+/usr/share/java/xxe/addon/config/docbook/dtd/V4.5/docbookx.dtd
+.
+.TP
+Validate sample.xml against the combined docbook.rng and mathml2.rng RELAX NG schemas:
+
+cd /usr/share/java/xxe/addon/mathml_config/db5mml
+
+.B xmltool validate \fR\\
+ \fB-s\fR ../../config/docbook5/rng/V5.0/docbook.rng \\
+ \fB-s\fR rng/mathml2.rng \\
+ sample.xml
+.
+.TP
+Note that the combined schemas don't need to be of the same kind:
+
+cd /usr/share/java/xxe/addon/mathml_config/db5mml
+
+.B xmltool validate \fR\\
+ \fB-s\fR ../../config/docbook5/rng/V5.0/docbook.rng \\
+ \fB-s\fR ../standalone/xsd/mathml2.xsd \\
+ sample.xml
+.
+.SH INDENT OPTIONS
+.
+Save, possibly indenting and / or flattening, specified XML files.
+.
+.TP
+.BI -o \ save_file_or_dir
+
+Specifies where to save all specified documents.
+
+If a single document is to be saved,
+.I save_file_or_dir
+may specify a file or an existing directory.
+
+If multiple documents are to be saved,
+.I save_file_or_dir
+must specify a directory. Such directory is automatically created if it does not already exist.
+
+Default: reuse the original filename of each specified document after renaming this document using a
+.B .BAK
+filename.
+.
+.TP
+.B -flat
+
+Do not preserve inclusions. Instead "flatten" the document.
+
+This option automatically generates
+.B xml:base
+attribute when needed to. Note that
+.B xml:base
+attributes are added even when this attribute is not allowed by the schema of the document being indented.
+
+Default: preserve inclusions.
+.
+.TP
+.BI -indent \ integer
+
+Specifies the number of space characters used to indent a child element relatively to its parent element.
+
+ A positive or null value means: indent always.
+
+ Value
+.B -1
+means: never indent.
+
+ Any other negative value means indent, but only if the document to be saved has an actual document type. In such case, the number of space characters is: (\fB-2\fR - \fIinteger\fR).
+
+Default:
+.BR -4 .
+.
+.TP
+.BI -maxlinelength \ positive_integer
+
+Specifies the maximum line length for elements containing text interspersed with child elements.
+
+Default:
+.BR 78 .
+.
+.TP
+.B -noopenlines
+
+Do not add open lines between the child elements of elements having an "element-only" content model.
+
+Default: add open lines.
+.
+.TP
+.B -xhtml
+
+Favor the interoperability with HTML as recommended in the XHTML spec.
+
+In practice, if this option has been specified:
+
+ Empty elements having a non empty content are saved as "<tag></tag>".
+
+ Empty elements having an empty content are saved as "<tag />" (with a space after the tag).
+
+Note that specifying this option for document types other than XHTML does not really make sense.
+
+Default: do not favor the interoperability with HTML.
+.
+.TP
+.B -nocharentities
+
+Do not save characters not supported by the encoding as entity references. Instead, save them as numeric references.
+
+Default: when possible and when needed to, save characters as entity references.
+.
+.TP
+.BI -specialchars \ list_of_chars_or_char_ranges
+
+Always save specified characters as entity references.
+
+Example:
+.B -specialchars
+"reg 174 0x00ae 0256 pound:yen 163:165 0xA3:0xA5 0243:0245".
+
+No default.
+.
+.TP
+.BI -cdatasections \ list_of_simple_XPaths
+
+Save the textual contents of specified elements as CDATA sections.
+
+XHTML example:
+.B -cdatasections
+"htm:script htm:style".
+
+No default.
+.
+.TP
+.B -prefix \fIprefix namespace
+
+Associates a
+.I prefix
+to a namespace.
+
+Multiple
+.B -prefix
+options are allowed.
+
+This may be needed to allow parsing the XPaths argument of the above
+.B -cdatasections
+option. Options
+.B -prefix
+must precede the
+.B -cdatasections
+option.
+
+XHTML example:
+.B -prefix htm http://www.w3.org/1999/xhtml\fR.
+
+No default.
+.
+.TP
+.B -nooriginalprefixes
+
+Do not use the namespace prefixes originally specified in the document. Instead, generate prefixes.
+
+Default: Reuse the original prefixes as much as possible.
+.
+.TP
+.B -nodefaultnamespace
+
+Do not use the default namespace originally specified in the document.
+
+Default: Reuse the default namespace if any.
+.
+.TP
+.B -xmlversion 1.0\fR|\fB1.1\fR|\fBoriginal
+
+Specifies the
+.B version
+pseudo-attribute of the XML declaration.
+.B original
+means: reuse the XML version originally specified in the document.
+
+Default: original.
+.
+.TP
+.B -encoding \fIjava_supported_encoding\fR|\fBoriginal
+
+Specifies which encoding to use when saving a document.
+.B original
+means: reuse the encoding originally specified in the
+.B encoding
+pseudo-attribute of the XML declaration of the document.
+
+Default: original.
+.
+.TP
+.B -standalone yes\fR|\fBno\fR|\fBoriginal
+
+Specifies the
+.B standalone
+pseudo-attribute of the XML declaration.
+.B original
+means: reuse the
+.B standalone
+pseudo-attribute originally specified in the document.
+
+No default: do not add a "standalone" pseudo-attribute to the XML declaration.
+.
+.TP
+.B -noinvalid
+
+Do not save specified documents if any of them is found to have validity errors (even harmless cross-reference errors).
+
+Default: save documents even if some of them are found to be invalid.
+.
+.TP
+.BI -script \ URL_or_filename
+
+Run specified .xed script in order to modify the document before saving it to disk. Note that it's possible to specify the
+.B -script
+option several times in order to use several scripts in turn.
+.
+.SH INDENTION EXAMPLES
+.
+.TP
+Indent docbook-table.xml using the default settings. The original docbook-table.xml is saved to docbook-table.xml.BAK.
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool indent
+docbook-table.xml
+
+.B ls
+docbook-table.xml*
+
+docbook-table.xml docbook-table.xml.BAK
+.
+.TP
+Indent docbook-table.xml using specified settings. Save indented file to out.xml.
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool indent -indent
+1
+.B -noopenlines -nolegacy -o
+out.xml docbook-table.xml
+.
+.TP
+Force the indentation of schema-less file xhtml_strict.xxe.
+
+cd /usr/share/java/xxe/addon/config/xhtml
+
+.B xmltool indent -indent
+2
+.B -o
+indented.xxe xhtml_strict.xxe
+
+WARNING: Cannot determine which schema to use for validating "xhtml_strict.xxe"
+.
+.TP
+Indent all .xhtml files contained in current directory. Create save files in directory /tmp/out/.
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool indent -v -encoding
+Windows-1252
+.B -o
+/tmp/out *.xhtml
+.
+.TP
+Transclude all XInclude elements contained docbook-modular-book.xml (\fB-f\fR is needed otherwise out.xml would contain a number of duplicate ID errors).
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool indent -xi -f -flat -o
+out.xml docbook-modular-book.xml
+.
+.TP
+Modify doc.xml using edit.xed before saving it, indented, to /tmp/out.xml.
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool indent -script
+edit.xed
+.B -o
+/tmp/out.xml doc.xml
+.
+.SH SCHEMATRON OPTIONS
+.
+Validate specified XML documents against specified Schematron.
+
+Optionally validate the Schematron itself.
+
+Unless the
+.B -iso
+option is used, the Schematron may be embedded in another type of XML document (e.g. a DocBook 5 RELAX NG grammar not using the compact syntax).
+.
+.TP
+.B -iso
+
+Fully validate the Schematron as an ISO Schematron schema.
+
+Default: do not validate the Schematron, just load it.
+
+Note that the Schematron loader is very lenient and accepts ISO Schematron as well as Schematron 1.5 schemas.
+.
+.TP
+.BI -o \ out_schematron_file
+
+Save the Schematron to specified file. The written schema is in all cases an ISO Schematron schema using the minimal syntax.
+.
+.TP
+.BI -phase \ phase_id
+
+Specifies the ID of the phase which is to be used for validation. May also be #ALL or #DEFAULT.
+
+Default:
+.BR #DEFAULT ,
+if any,
+.B #ALL
+otherwise.
+.
+.TP
+.B -var \fIname value
+
+Specify overrides for some of the let variables defined in the Schematron.
+
+Note that value must be a valid XPath expression and not a plain string.
+.
+.SH SCHEMATRON EXAMPLES
+.
+.TP
+Validate docbook.sch as an ISO Schematron schema. Additionally save a copy in /tmp/out.sch.
+
+cd /usr/share/java/xxe/addon/config/docbook
+
+.B xmltool schematron -iso -o
+/tmp/out.sch docbook.sch
+.
+.TP
+Validate docbook-image.xml against docbook.sch.
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool schematron
+\\
+ /usr/share/java/xxe/addon/config/docbook/docbook.sch \\
+ docbook-image.xml
+.
+.TP
+Validate docbook-image.xml against docbook.sch, using phase #ALL. Pass to the Schematron variable foo having XPath string literal "bar" as its value.
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool schematron -phase
+\'#ALL\'
+.B -var
+foo '"bar"' \\
+ /usr/share/java/xxe/addon/config/docbook/docbook.sch \\
+ docbook-image.xml
+.
+.SH SCHEMADOC OPTIONS
+.
+Generate in directory
+.I doc_dir
+a reference manual in HTML format for schema file
+.IR schema .
+
+.I Schema
+must be a DTD having a
+.B .dtd
+extension or a W3C XML Schema having a
+.BR .xsd ,
+.BR .xs \ or \ .wxs
+extension or a RELAX NG schema having a
+.BR .rng \ or \ .rnc
+(compact syntax) extension.
+
+.I doc_dir
+is automatically created if it does not exist.
+.
+.TP
+.BI -css \ css_url
+
+Specifies the URL of the CSS style sheet used for the generated HTML.
+
+Default: generated HTML does not have a <link rel="stylesheet">.
+.
+.TP
+.BI -charset\ encoding
+
+Specifies the charset used for the generated HTML.
+
+Default: use platform default encoding and generated HTML does not have a <meta http-equiv="Content-Type">.
+.
+.TP
+.B -xxe
+
+Generate annotations which are meaningful when using the schema with XMLmind XML Editor.
+.
+.SH SCHEMADOC EXAMPLE
+.
+.TP
+cd /usr/share/doc/xxe/demo
+
+.B xmltool schemadoc
+bugreport/bugreport.xsd /tmp/bugreport_doc
+
+.B ls
+/tmp/bugreport_doc
+
+a__6sv96.html abbr__79rrv.html ... \fBindex.html\fR ... workaround__jus1.html
+.
+.SH COMMON OPTIONS
+.
+.TP
+.B -xi
+
+When loading a document, transclude XInclude elements.
+
+Default: XInclude elements are treated as any other element.
+
+This option is equivalent to "-inclscheme com.xmlmind.xml.xinclude.XIncludeScheme".
+.
+.TP
+.BI -inclscheme \ class_name
+
+When loading a document, transclude nodes specifying an inclusion directive belonging to specified inclusion scheme.
+
+Default: nodes specifying an inclusion directive are treated as any other node.
+
+Specifying several -inclscheme options is permitted. Mixing
+.B -xi
+and
+.B -inclscheme
+options is permitted.
+.
+.TP
+.BI -cache \ schema_cache_dir
+
+Specifies the directory to be used as a schema cache. This directory is automatically created if it does not exist.
+
+Default: do not cache schemas.
+
+RELAX NG schemas can be cached only in memory and not on disk.
+.
+.TP
+.BI -rncencoding \ encoding
+
+Specifies the
+.I encoding
+used for RELAX NG compact syntax schemas.
+
+Default: do not cache schemas.
+.
+.TP
+.B -v
+
+Verbose.
+.
+.SH COMMON OPTIONS EXAMPLES
+.
+.TP
+Transclude all XInclude elements contained docbook-modular-book.xml (\fB-f\fR is needed otherwise out.xml would contain a number of duplicate ID errors).
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool indent -xi -f -flat -o
+out.xml docbook-modular-book.xml
+.
+.TP
+Transclude all conref elements contained in topic1.dita.
+
+cd /tmp
+
+.B xmltool indent -inclscheme
+"com.xmlmind.xmleditext.dita.ConrefScheme" \\
+ \fB-f -flat -o\fR out.dita topic1.dita
+.
+.TP
+Validate docbook-table.xml. Cache the DocBook DTD if it is not already cached. If it is already cached, use the cached copy.
+
+cd /usr/share/doc/xxe/demo
+
+.B xmltool validate -cache
+/tmp/cache docbook-table.xml
+
+.B ls
+/tmp/cache
+
+directory.txt docbookx.ser
+.
+.TP
+Validate mathml.pane against pane.rnc, a RELAX NG schema using the compact syntax, encoded in ISO-8859-1.
+
+cd /usr/share/java/xxe/addon/mathml_config/common/pane
+
+.B xmltool validate
+\\
+ \fB-rncencoding\fR ISO-8859-1 \\
+ \fB-s\fR pane.rnc \\
+ mathml.pane
+.
+.
+.SH ABOUT THIS MANPAGE
+.
+This manual page was created from http://www.xmlmind.com/xmleditor/_distrib/doc/xmltool/index.html and refers to the version from 5. March 2021.
+
+An offline html version of that web site is found at /usr/share/doc/xxe/doc/xmltool/index.html
+
+Similarly, a PDF variant is located at /usr/share/doc/xxe/doc/xmltool/xmltool.pdf
+
+
+
diff --git a/xmltool.sh b/xmltool.sh
new file mode 100644
index 000000000000..9f6fcd4dd0c0
--- /dev/null
+++ b/xmltool.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+dist=/usr/share/java/xxe/bin/
+config_dir="/usr/share/java/xxe/addon/config"
+
+jars="$dist/xerces.jar:$dist/resolver.jar:$dist/relaxng.jar"
+jars="$config_dir/common/xhtml.jar:$jars"
+cp="$dist/xxe.jar:$jars"
+
+c1="$config_dir/catalog.xml"
+c2="$config_dir/dita/catalog.xml"
+c3="$config_dir/docbook/catalog.xml"
+c4="$config_dir/xhtml/catalog.xml"
+c5="$config_dir/docbook5/catalog.xml"
+c6="$config_dir/docbook51/catalog.xml"
+if [ -f "$c1" ]; then
+ XML_CATALOG_FILES="$c1;$c2;$c3;$c4;$c5;$c6;$XML_CATALOG_FILES"
+ export XML_CATALOG_FILES
+fi
+
+exec java -Xss4m -Xmx512m \
+ -Dxml.catalog.files="$XML_CATALOG_FILES" \
+ -classpath "$cp:$CLASSPATH" \
+ com.xmlmind.xml.xmltool.Main "$@"
diff --git a/xxe.install b/xxe.install
index fff0d9f7040c..f8fcc5bad504 100644
--- a/xxe.install
+++ b/xxe.install
@@ -1,3 +1,5 @@
+#!/hint/bash
+
post_install() {
echo ""
echo ""
@@ -9,17 +11,25 @@ post_install() {
echo ">>> Localisation files may be available from Options -> Install Add-ons"
echo ">>> UI Scaling can be activated from Options -> Preferences -> General"
echo ""
- echo ""
+ manual
}
post_upgrade() {
+ manual
fix_scaling=$(vercmp $2 9.4.1-2 )
if [[ $fix_scaling -le 0 ]]
then
echo ""
- echo ">>> The _JAVA_OPTIONS variable is now set at launch to improve the UI-scaling."
+ echo ">>> Options to improve the UI-scaling are now set at launch."
echo ">>> You may want to reconsider enabliung UI-scaling if you had issues."
echo ">>> The setting is at Options -> Preferences -> General"
echo ""
fi
}
+
+manual() {
+ echo ""
+ echo "A user manual for XXE is at"
+ echo "/usr/share/doc/xxe/doc/index.html"
+ echo ""
+}
diff --git a/xxe.sh b/xxe.sh
new file mode 100644
index 000000000000..6a685c776ca5
--- /dev/null
+++ b/xxe.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+dist=/usr/share/java/xxe/bin
+jars="$dist/xerces.jar:$dist/resolver.jar:$dist/relaxng.jar:$dist/saxon.jar:$dist/saxon9.jar"
+cp="$dist/xxe.jar:$jars"
+
+# Disabled Java 9+ native HiDPI mode because the rendering of
+# text and graphics is nicer using built-in HiDPI support:
+# -Dsun.java2d.uiScale.enabled=false
+# You may re-enable Java 9+ native HiDPI mode by removing
+# this option.
+
+exec java -Xss4m -Xmx512m \
+ -Dsun.java2d.uiScale.enabled=false \
+ -Dawt.useSystemAAFontSettings=on \
+ -Dswing.aatext=true \
+ -DXXE_GUI="$XXE_GUI" \
+ -DXXE_ADDON_PATH="$XXE_ADDON_PATH" \
+ -DXXE_PREFS_DIR="$XXE_PREFS_DIR" \
+ $XXE_JAVA_OPTS \
+ -classpath "$cp" \
+ com.xmlmind.xmleditapp.app.QuickStart "$@"
diff --git a/xxetool.sh b/xxetool.sh
new file mode 100644
index 000000000000..97d94533c4e5
--- /dev/null
+++ b/xxetool.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+dist=/usr/share/java/xxe/bin
+jars="$dist/xerces.jar:$dist/resolver.jar:$dist/relaxng.jar:$dist/saxon.jar:$dist/saxon9.jar"
+cp="$dist/xxe.jar:$jars"
+
+# Adding -Djava.awt.headless=true below seems to work.
+# However this is not officially supported by XMLmind Software yet.
+
+exec java -Xss4m -Xmx512m \
+ -Djava.awt.headless=true \
+ -Dawt.useSystemAAFontSettings=on \
+ -Dswing.aatext=true \
+ -DXXE_GUI="$XXE_GUI" \
+ -DXXE_ADDON_PATH="$XXE_ADDON_PATH" \
+ -DXXE_PREFS_DIR="$XXE_PREFS_DIR" \
+ -classpath "$cp" \
+ com.xmlmind.xmleditapp.tool.StartTool "$@"