Skip to content

Commit

Permalink
XSLWeb version 4.0.1 FINAL
Browse files Browse the repository at this point in the history
  • Loading branch information
Maarten Kroon committed May 4, 2021
1 parent 970957f commit 7d3a311
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 22 deletions.
37 changes: 22 additions & 15 deletions docs/XSLWeb Developer Manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
:underscore: _
:docinfo: shared,shared-head
:window-blank: _blank
:xslweb-version: 4.0.1-RC3
:xslweb-version-download: 4-0-1-RC3
:saxon-version: 10.3
:saxon-version-download: 10-3J
:xslweb-version: 4.0.1
:xslweb-version-download: 4-0-1
:saxon-version: 10.5
:saxon-version-download: 10-5J

= XSLWeb version {xslweb-version} Developer Manual
Authors: Maarten Kroon, Arjan Loeffen
Expand Down Expand Up @@ -964,7 +964,7 @@ All of the Apache Shiro documentation on https://shiro.apache.org/documentation.
<security>
<shiro-ini><![CDATA[
[main]
shiro.loginUrl = /${webapp-name}/security/login.html
shiro.loginUrl = ${webapp-path}/security/login.html
shiro.postOnlyLogout = true
authcBasic.enabled = true
Expand Down Expand Up @@ -992,11 +992,11 @@ user = portal:read,portal:write
webdav = *
[urls]
/${webapp-name}/security/login.html = authc
/${webapp-name}/security/secured-for-admin-role.html = authc, roles[admin]
/${webapp-name}/security/secured-for-read-permission.html = authc, perms["portal:read"]
/${webapp-name}/security/logout.html = logout
/${webapp-name}/webdav/** = authcBasic]]>
${webapp-path}/security/login.html = authc
${webapp-path}/security/secured-for-admin-role.html = authc, roles[admin]
${webapp-path}/security/secured-for-read-permission.html = authc, perms["portal:read"]
${webapp-path}/security/logout.html = logout
${webapp-path}/webdav/** = authcBasic]]>
</shiro-ini>
</security>
Expand Down Expand Up @@ -2764,7 +2764,7 @@ Every XSLWeb webapp has it's own WebDAV configuration. WebDAV access is disabled

You can access the top-level WebDAV folder using the url http://my-domain:my-port/my-webapp/webdav/, for instance http://localhost:8080/examples/webdav/.

When you enable WebDAV access you probably want to authenticate users before accessing the resources, see <<security>>. By default there is no authentication.
When you enable WebDAV access you probably want to authenticate users before accessing the resources, see <<security>>. By default there is no authentication. If a security/shiro-ini configuration is present in webapp.xml, users must have role "webdav" to be able to access the WebDAV functionality.

Example how to configure authentication for WebDAV requests:

Expand Down Expand Up @@ -2807,7 +2807,7 @@ webdavuser = secret,webdav
webdav = *
[urls]
/${webapp-name}/webdav/** = authcBasic]]>
${webapp-path}/webdav/** = authcBasic]]>
</shiro-ini>
</security>
Expand Down Expand Up @@ -2883,7 +2883,14 @@ IMPORTANT: Do not install the XSLWeb distribution in a directory that contains s

XSLWeb can be started by running the batch file `<install-dir>\bin\run-service.bat` (Windows) or `<install-dir>/bin/run-service.sh` (*nix). After the service is started, the correct installation can be tested by opening a browser and going to the url http://localhost:8152. XSLWeb can be stopped by running the corresponding batch file `stop-service.bat` or shell script `stop-service.sh` from another command prompt or shell.

IMPORTANT: To increase or decrease the Java heap memory size that is available to the XSLWeb process please alter the variable `MAXMEM` in the file `<install-dir>\bin\service\config.cmd` (Windows) or `<install-dir>/bin/run-service.sh` (Linux and macOS). The default is 256m (megabytes).
IMPORTANT: To increase or decrease the Java heap memory size that is available to the XSLWeb process please alter the variable `MAXMEM` in the file `<install-dir>\bin\service\config.cmd` (Windows) or `<install-dir>/bin/run-service.sh` (Linux and macOS). The default is 256m (megabytes).

IMPORTANT: If you get an error message on macOS like "java cannot be opened because the developer cannot be verified" you must remove the “quarantine” attribute from the java executable (which tells the system that java should not be run automatically before being explicitly approved by the user). This can be done running a command like:

[source,bash]
----
xattr -d com.apple.quarantine /path-to-xslweb/xslweb-ready-to-run-v4.0.0-osx-x64/jre/bin/java
----

=== Optional: install XSLWeb as a Windows service or Linux/macOS daemon

Expand Down Expand Up @@ -3063,8 +3070,8 @@ This distribution contains the XSLWeb home directory and a web application archi

You can download the archives from the following locations:

* https://armatiek.nl/downloads/xslweb-war-v{xslweb-version}.tar.gz (Linux/macOS)
* https://armatiek.nl/downloads/xslweb-war-v{xslweb-version}.zip (Windows)
* https://armatiek.nl/downloads/xslweb/xslweb-war-v{xslweb-version}.tar.gz (Linux/macOS)
* https://armatiek.nl/downloads/xslweb/xslweb-war-v{xslweb-version}.zip (Windows)

==== Install

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<groupId>nl.armatiek.xslweb</groupId>
<artifactId>xslweb</artifactId>
<packaging>war</packaging>
<version>4.0.1-RC3-SNAPSHOT</version>
<version>4.0.1-SNAPSHOT</version>

<inceptionYear>2013</inceptionYear>

Expand All @@ -37,7 +37,7 @@
<compiler.source.version>1.8</compiler.source.version>
<compiler.target.version>1.8</compiler.target.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<saxon.version>10.3</saxon.version>
<saxon.version>10.5</saxon.version>
<shiro.version>1.6.0</shiro.version>
<fop.version>2.5</fop.version>
<log4j.version>1.2.17</log4j.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
public class Definitions {

public final static String PROJECT_NAME = "xslweb";
public final static String PROJECT_VERSION = "4.0.1-RC3";
public final static String PROJECT_VERSION = "4.0.1";
public final static String PATHNAME_REQUESTDISPATCHER_XSL = "xsl/request-dispatcher.xsl";
public final static String FILENAME_PROPERTIES = "xslweb.properties";
public final static String FILENAME_QUARTZ = "xslweb-quartz.properties";
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/nl/armatiek/xslweb/configuration/WebApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@
import nl.armatiek.xslweb.quartz.XSLWebJob;
import nl.armatiek.xslweb.saxon.configuration.XSLWebConfiguration;
import nl.armatiek.xslweb.saxon.debug.DebugTraceCodeInjector;
import nl.armatiek.xslweb.saxon.debug.DebugXMLFilter;
import nl.armatiek.xslweb.saxon.errrorlistener.TransformationErrorListener;
import nl.armatiek.xslweb.saxon.errrorlistener.ValidatorErrorHandler;
import nl.armatiek.xslweb.saxon.utils.SaxonUtils;
Expand Down Expand Up @@ -696,11 +695,13 @@ public XsltExecutable tryXsltExecutableCache(String transformationPath, ErrorLis
spf.setValidating(false);
SAXParser parser = spf.newSAXParser();
XMLReader reader = parser.getXMLReader();
/*
if (Context.getInstance().getDebugEnable() && debugMode) {
DebugXMLFilter debugXMLFilter = new DebugXMLFilter();
debugXMLFilter.setParent(reader);
reader = debugXMLFilter;
}
*/
Source source;
if (transformationPath.startsWith("classpath:")) {
source = new StreamSource(getClass().getClassLoader().getResourceAsStream(StringUtils.substringAfter(transformationPath, ":")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.stream.XMLStreamWriter;
import javax.xml.transform.ErrorListener;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Result;
Expand Down Expand Up @@ -71,6 +72,7 @@
import net.sf.saxon.s9api.XdmValue;
import net.sf.saxon.s9api.Xslt30Transformer;
import net.sf.saxon.s9api.XsltExecutable;
import net.sf.saxon.stax.XMLStreamWriterDestination;
import nl.armatiek.xslweb.configuration.Context;
import nl.armatiek.xslweb.configuration.Definitions;
import nl.armatiek.xslweb.configuration.WebApp;
Expand Down Expand Up @@ -104,6 +106,7 @@
import nl.armatiek.xslweb.saxon.utils.SaxonUtils;
import nl.armatiek.xslweb.utils.Closeable;
import nl.armatiek.xslweb.utils.XSLWebUtils;
import nl.armatiek.xslweb.xml.CleanupXMLStreamWriter;

public class XSLWebServlet extends HttpServlet {

Expand Down Expand Up @@ -245,9 +248,8 @@ private Destination getDestination(WebApp webApp, HttpServletRequest req, HttpSe
serializer.setOutputProperty(prop, value);
}
}
//XMLStreamWriter xsw = new CleanupXMLStreamWriter(serializer.getXMLStreamWriter());
//dest = new XMLStreamWriterDestination(xsw);
dest = serializer;
XMLStreamWriter xsw = new CleanupXMLStreamWriter(serializer.getXMLStreamWriter());
dest = new XMLStreamWriterDestination(xsw);
} else if (nextStep instanceof TransformerStep || nextStep instanceof SchemaValidatorStep || nextStep instanceof SchematronValidatorStep) {
dest = new XdmSourceDestination();
} else if (nextStep instanceof JSONSerializerStep) {
Expand Down

0 comments on commit 7d3a311

Please sign in to comment.