Skip to content

Commit

Permalink
Updated to Saxon 9.8.0-1 HE
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Jun 9, 2017
1 parent 39eea1d commit 7dbc1d4
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 9 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Continue reading the **full documentation** at http://phax.github.io/ph-schematr

## News and noteworthy

* v4.3.2 - work in progress
* Updated to Saxon-HE 9.8.0-1
* Changed all XSLT scripts to use and create only XSLT 2.0 (because Saxon 9.8.0-1 does not support XSLT 1.0 anymore)
* v4.3.1 - 2017-05-29
* Updated to ph-commons 8.6.5
* Fixed too verbose logging of created XSLT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class ThirdPartyModuleProvider_ph_schematron implements IThirdParty
public static final IThirdPartyModule SAXON_HE = new ThirdPartyModule ("Saxon HE",
"Saxonica Limited",
ELicense.MPL20,
new Version (9, 7, 0, "18 HE"),
new Version (9, 8, 0, "1 HE"),
"http://saxon.sourceforge.net/");

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
import net.sf.saxon.jaxp.TransformerImpl;
import net.sf.saxon.lib.StandardLogger;
import net.sf.saxon.s9api.XsltTransformer;
import net.sf.saxon.trace.RuleTraceListener;
import net.sf.saxon.trace.TraceEventMulticaster;
import net.sf.saxon.trace.XSLTTraceListener;

Expand Down Expand Up @@ -255,7 +254,7 @@ public final Document applySchematronValidation (@Nonnull final Node aXMLNode) t
aXT.getUnderlyingController ().setTraceListener (new XSLTTraceListener ());
if (false)
{
final RuleTraceListener aTL = new RuleTraceListener ();
final XSLTTraceListener aTL = new XSLTTraceListener ();
aTL.setOutputDestination (new StandardLogger (System.err));
aXT.getUnderlyingController ().setTraceListener (TraceEventMulticaster.add (aTL, null));
}
Expand Down
32 changes: 32 additions & 0 deletions ph-schematron/src/main/resources/net/sf/saxon/data/categories.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ VERSION INFORMATION
* Original written for old namespace
* http://www.topologi.com/resources/iso-pre-pro.xsl
-->
<xslt:stylesheet version="1.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
<!-- [ph] change from 1.0 to 2.0 -->
<xslt:stylesheet version="2.0" xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:iso="http://purl.oclc.org/dsdl/schematron"
xmlns:nvdl="http://purl.oclc.org/dsdl/nvdl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ THE SOFTWARE.
* RJ New
-->

<xslt:stylesheet version="1.0"
<!-- [ph] change from 1.0 to 2.0 -->
<xslt:stylesheet version="2.0"
xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:iso="http://purl.oclc.org/dsdl/schematron"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,8 @@ which require a preprocess.
select="iso:ns" />

<!-- Handle the namespaces before the version attribute: reported to help SAXON -->
<xsl:attribute name="version">1.0</xsl:attribute>
<!-- [ph] change from 1.0 to 2.0 -->
<xsl:attribute name="version">2.0</xsl:attribute>

<xsl:apply-templates select="." mode="stylesheetbody"/>
<!-- was xsl:call-template name="stylesheetbody"/ -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ THE SOFTWARE.
Note: whether any output at all is generated depends on the XSLT implementation.
-->

<!-- [ph] change from 1.0 to 2.0 -->
<xsl:stylesheet
version="1.0"
version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,28 @@ public void testInvalidSchematron ()
public void testXSLTPreprocessor ()
{
for (final IReadableResource aRes : SchematronTestHelper.getAllValidSchematronFiles ())
// BIICORE-UBL-*.sch works but takes forever
// EUGEN-UBL-*.sch has a StackOverflow
// The others have errors (required parameters etc.)
if (!aRes.getPath ().endsWith ("/BIICORE-UBL-T01.sch") &&
!aRes.getPath ().endsWith ("/BIICORE-UBL-T10.sch") &&
!aRes.getPath ().endsWith ("/BIICORE-UBL-T14.sch") &&
!aRes.getPath ().endsWith ("/BIICORE-UBL-T15.sch") &&
!aRes.getPath ().endsWith ("/EUGEN-UBL-T14.sch") &&
!aRes.getPath ().endsWith ("/EUGEN-UBL-T15.sch") &&
!aRes.getPath ().endsWith ("/CellarBook.sch") &&
!aRes.getPath ().endsWith ("/pattern-example-with-includes.sch") &&
!aRes.getPath ().endsWith ("/pattern-example.sch") &&
!aRes.getPath ().endsWith ("/schematron-svrl.sch"))
{
if (true)
System.out.println (aRes.toString ());

final CollectingTransformErrorListener aCEH = new CollectingTransformErrorListener ();
final ISchematronXSLTBasedProvider aPreprocessor = SchematronResourceSCHCache.createSchematronXSLTProvider (aRes,
new SCHTransformerCustomizer ().setErrorListener (aCEH)
.setLanguageCode ("de"));
assertNotNull (aPreprocessor);
assertNotNull ("Failed to parse: " + aRes.toString (), aPreprocessor);
assertTrue (aRes.getPath (), aPreprocessor.isValidSchematron ());
assertNotNull (aPreprocessor.getXSLTDocument ());

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.7.0-18</version>
<version>9.8.0-1</version>
</dependency>

<!-- RelaxNG -->
Expand Down

0 comments on commit 7dbc1d4

Please sign in to comment.