Skip to content

v12.5.0

Latest

Choose a tag to compare

@phax phax released this 01 Dec 13:31
· 6 commits to master since this release
  • Extended ves-1.0.xsd (v1.0.0-RC8) with the optional namespaces element in xsd, used by the XPath expression of the precondition
  • The VES engine now applies the precondition of xsd elements (resource types xsd and zip); previously it was ignored with a warning.
    If the precondition is not fulfilled, the XML Schema validation is skipped.
  • ValidationExecutorXSD and ValidationExecutorXSDBuilder support an optional prerequisite XPath expression with a namespace context.
    It is evaluated on the document that is validated (for partial sources the part only).
  • CustomErrorDetails has a new optional description (the reason for the customisation), filled from customError/description of a VES
  • LoadedVES.Header now contains the license elements of a VES (getAllLicenses, new record LoadedVES.License)
  • The VES engine now reports an error instead of throwing an IllegalStateException if a Schematron engine is known to ph-schematron but not supported (pure-xslt, xslt)
  • The VES engine now applies the catalog of xsd elements with the resource type xsd; previously it was ignored with a warning
  • A catalog entry of an xsd element must reference a resource of type xsd, otherwise loading the VES fails
  • The id of a system catalog entry and the referenced system ID are normalised before comparison (e.g. ./common.xsd matches common.xsd)
  • The VES engine now applies the input/option elements of a schematron element; previously they were ignored.
    The option phase selects the Schematron phase (not for the resource type xslt), all other options are passed as XSLT parameters (not for the engine pure-xpath).
    The option langCode, duplicate option names and unsupported options give a loading error.
  • ValidationExecutorSchematron and its builder have the new methods setPhase/phase and addParameter/parameter to set the Schematron phase and custom XSLT parameters
  • Updated to ph-schematron 10.3.6, which caches Schematrons with XSLT parameters and applies the phase for the engine schxslt2
  • Removed the misleading warning about missing catalog support for public IDs; XML Schema imports and includes never provide one, and the public catalog entries match namespace URIs
  • LoadedVES.Header now contains the metadata elements of a VES (getAllMetadata); previously they were ignored.
    Keys and values must follow the rules of SMP custom properties (VESLoader.isValidMetadataKey/isValidMetadataValue); invalid or duplicate keys give a loading error.
    Keys starting with the reserved prefix ves- are loaded as well; their treatment is up to the application.
  • VESStatus1Helper.convert no longer drops the classifier of the replacement element of a VES status
  • Added VESStatus1Helper.convert (VesStatusType, ErrorList): an invalid replacement of a VES status (invalid version, but also invalid group ID, artifact ID or classifier, which previously threw an exception) is reported as an error.
    The VES engine treats it as a loading error.
    convert (VesStatusType) logs it and ignores the replacement
  • Changed ves-1.0.xsd (v1.0.0-RC8): the namespaces element was removed from requires, as it was never used there.
    It is only part of partialRequires now (unchanged element order).
    A VES with requires/namespaces is no longer valid
  • The VES engine no longer loads external DTDs referenced via a DOCTYPE in XML Schemas by default; an empty DTD is used instead.
    This can be changed via DefaultVESLoaderXSD.setLoadExternalDtds (true).
    Remote DTDs were already blocked by ph-xml
  • Changed ves-1.0.xsd (v1.0.0-RC8): added the optional xsltProcessor element to schematron, to select the XSLT processor in preparation of ph-schematron 11.
    If absent, saxon is used.
    Currently only saxon is supported - phoxtrot (ph-schematron 11) and unknown values give a loading error, as does any value for the engine pure-xpath
  • The VES engine no longer accepts aliases of the Schematron engine IDs (like iso, sch or pure) - only pure-xpath, iso-schematron, schxslt and schxslt2 are supported.
    An alias is a loading error that names the ID to use
  • The VES engine now reads XML Schemas of resource type xsd already when loading the VES (also without catalog entries), and reports XML Schemas that cannot be read as loading errors instead of throwing an exception
  • ValidationExecutorPartial and ValidationExecutorXSDPartial can now be used from multiple threads at the same time.
    According to its specification an XPathExpression is not thread-safe, so XSDPartialContext and the prerequisite of ValidationExecutorPartial now store the XPath as a String together with a namespace context and compile a new XPathExpression for every evaluation (like the prerequisites of ValidationExecutorXSD and ValidationExecutorSchematron)
    • New: XSDPartialContext (String, NamespaceContext, Integer, Integer), XSDPartialContextBuilder.xpath (String, NamespaceContext), XSDPartialContext.getXPath (), XSDPartialContext.getNamespaceContext () and XSDPartialContext.evaluateNodeSet (Node)
    • New: ValidationExecutorPartial (IValidationExecutor, XSDPartialContext, String, NamespaceContext), ValidationExecutorPartial.getPrerequisiteXPathString (), ValidationExecutorPartial.getPrerequisiteNamespaceContext (), VesXmlBuilder.addPartialVES (IValidationExecutorSet, XSDPartialContext, String, NamespaceContext) and LoadedVES.PartialRequiredVES.getPrerequisiteXPathString ()
    • Deprecated for removal: all methods and constructors taking or returning an XPathExpression in these classes.
      They keep working; a pre-compiled XPathExpression is evaluated synchronised on that object, and the getters compile a new XPathExpression on each call if the XPath was given as a String
    • There is no test for concurrent use: the JDK implementation creates a new evaluation context per call and does not show the problem, so it cannot be reproduced
  • Messages (e.g. warnings) of lazily loaded required VES are now logged instead of being discarded

Full Changelog: phive-parent-pom-12.4.0...phive-parent-pom-12.5.0