Project

Profile

Help

Bug #2731

closed

Unknown configuration property http://saxon.sf.net/feature/occurrenceLimits

Added by Cyril Dangerville almost 8 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
User error
Sprint/Milestone:
Start date:
2016-04-29
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7, trunk
Fix Committed on Branch:
9.7, trunk
Fixed in Maintenance Release:
Platforms:

Description

Hello,

I tried to use the xsd/occurrenceLimits property in a SAXON configuration file wit Saxon-HE/9.6.0-5, as documented here:

http://www.saxonica.com/documentation9.6/index.html#!configuration/configuration-file/config-xsd

This fails with the following error when trying to load a SAXON processor with such file:

Warning: on line 109 column 23 of saxon.xml:
  Invalid configuration property global/@occurrenceLimits. Supplied value '100,250'. Unknown
  configuration property http://saxon.sf.net/feature/occurrenceLimits
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.RuntimeException: Error loading Saxon processor from configuration file at this location: saxon.xml
	at test.XMLUtils.<clinit>(XMLUtils.java:74)
Caused by: net.sf.saxon.s9api.SaxonApiException: Invalid configuration property global/@occurrenceLimits. Supplied value '100,250'. Unknown configuration property http://saxon.sf.net/feature/occurrenceLimits
	at net.sf.saxon.s9api.Processor.<init>(Processor.java:100)
	at test.XMLUtils.<clinit>(XMLUtils.java:71)
Caused by: net.sf.saxon.trans.XPathException: Invalid configuration property global/@occurrenceLimits. Supplied value '100,250'. Unknown configuration property http://saxon.sf.net/feature/occurrenceLimits
	at net.sf.saxon.trans.ConfigurationReader.error(ConfigurationReader.java:456)
	at net.sf.saxon.trans.ConfigurationReader.applyProperty(ConfigurationReader.java:282)
	at net.sf.saxon.trans.ConfigurationReader.readXsdElement(ConfigurationReader.java:445)
	at net.sf.saxon.trans.ConfigurationReader.startElement(ConfigurationReader.java:176)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
	at net.sf.saxon.trans.ConfigurationReader.makeConfiguration(ConfigurationReader.java:96)
	at net.sf.saxon.Configuration.readConfigurationFile(Configuration.java:323)
	at net.sf.saxon.Configuration.readConfiguration(Configuration.java:311)
	at net.sf.saxon.s9api.Processor.<init>(Processor.java:97)
	... 1 more

Am I configuring the occurrenceLimits in a wrong way?

Below is the configuration file I'm using:

<?xml version="1.0"?>
<configuration
   edition="HE"
   xmlns="http://saxon.sf.net/ns/configuration"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://saxon.sf.net/ns/configuration config.xsd">
   <global
      dtdValidation="false"
      dtdValidationRecoverable="true"
      lineNumbering="true"
      treeModel="tinyTree"
      stripSpace="all"
      expandAttributeDefaults="true"
      versionOfXml="1.0"
      preferJaxpParser="true"
      sourceResolver=""
      uriResolver="net.sf.saxon.lib.StandardURIResolver"
      collectionUriResolver="net.sf.saxon.lib.StandardCollectionURIResolver"
      defaultCollection="file:///e:/temp"
      recognizeUriQueryParameters="true"
      useTypedValueCache="false"
      parser=""
      timing="false"
      allowExternalFunctions="false"
      traceExternalFunctions="false"
      optimizationLevel="10"
      traceOptimizerDecisions="false"
      collationUriResolver="net.sf.saxon.lib.StandardCollationURIResolver"
      lazyConstructionMode="false"
      preEvaluateDoc="false"
      serializerFactory=""
      errorListener="net.sf.saxon.lib.StandardErrorListener"
      traceListener="net.sf.saxon.trace.XSLTTraceListener"
      usePiDisableOutputEscaping="false"
      validationWarnings="true" />
   <serialization
      method="xml"
      indent="yes" />
   <collations>
      <collation
         uri="http://codepoint/"
         class="net.sf.saxon.expr.sort.CodepointCollator" />
      <collation
         uri="http://www.microsoft.com/collation/caseblind"
         lang="en"
         ignore-case="yes" />
   </collations>
   <localizations
      defaultLanguage="en"
      defaultCountry="US">
      <localization
         lang="da"
         class="net.sf.saxon.option.local.Numberer_da" />
      <localization
         lang="de"
         class="net.sf.saxon.option.local.Numberer_de" />
      <localization
         lang="en"
         class="net.sf.saxon.expr.number.Numberer_en" />
      <localization
         lang="fr"
         class="net.sf.saxon.option.local.Numberer_fr" />
      <localization
         lang="fr-BE"
         class="net.sf.saxon.option.local.Numberer_frBE" />
      <localization
         lang="it"
         class="net.sf.saxon.option.local.Numberer_it" />
      <localization
         lang="nl"
         class="net.sf.saxon.option.local.Numberer_nl" />
      <localization
         lang="nl-BE"
         class="net.sf.saxon.option.local.Numberer_nlBE" />
      <localization
         lang="sv"
         class="net.sf.saxon.option.local.Numberer_sv" />
   </localizations>
   <xslt
      recoveryPolicy="recoverWithWarnings"
      version="2.0"
      versionWarning="false"
      schemaAware="false"
      messageReceiver=""
      errorListener="net.sf.saxon.StandardErrorListener"
      outputUriResolver=""
      stylesheetParser="">
   </xslt>
   <xquery
      version="1.1"
      allowUpdate="false"
      errorListener="net.sf.saxon.StandardErrorListener"
      moduleUriResolver="net.sf.saxon.lib.StandardModuleURIResolver"
      inheritNamespaces="true"
      preserveNamespaces="true"
      constructionMode="preserve"
      defaultFunctionNamespace="http://www.w3.org/2005/xpath-functions"
      defaultElementNamespace=""
      preserveBoundarySpace="false"
      requiredContextItemType="document-node()"
      emptyLeast="true" />
  <xsd
      occurrenceLimits="100,250"
      version="1.1" />    
</configuration>

Thanks for your help.

Regards,

Cyril

Actions #1

Updated by Michael Kay almost 8 years ago

This configuration property relates to XSD processing and is therefore recognized only in a Saxon-EE configuration.

We should probably ignore it, perhaps with a warning, rather than rejecting the configuration file completely.

Actions #2

Updated by Cyril Dangerville almost 8 years ago

OK, thanks for the hint. In this case, I would recommend to fix the documentation:

http://www.saxonica.com/documentation9.6/index.html#!configuration/configuration-file/config-xsd

We miss some indication there about which XML configuration element (xslt, xquery, xsd...), and which attribute in each element (e.g. if some attribute in is supported only in Saxon-EE by any chance) - if there is such a granularity - is supported by which Saxon edition. So that end-users - that are not well aware of the differences between SAXON editions - don't get confused and don't even try to use unsupported features ;)

Please also note that if I remove occurrenceLimits and just keep the version attribute of xsd element, I do not get a configuration error anymore, which is a bit confusing if SAXON-HE has no support for XSD processing:

<xsd version="1.1" /> 

Some minor issue: the error message in my previous post says Invalid configuration property global/@occurrenceLimits

... although the occurrenceLimits attribute is not in the global element.

Actions #3

Updated by Michael Kay almost 8 years ago

I'm not seeing that "minor issue". In both 9.6 and 9.7 I'm getting "Invalid configuration property xsd/@occurrenceLimits."

Actions #4

Updated by Michael Kay almost 8 years ago

  • Status changed from New to In Progress

As a first step I'm changing the error message so it now reads

Invalid configuration property xsd/@occurrenceLimits. Supplied value '100,250'. Property

not available in Saxon-HE

(This applies to all cases where a configuration property is used that is not available in the particular Saxon edition)

Actions #5

Updated by Michael Kay almost 8 years ago

  • Status changed from In Progress to Resolved
  • Applies to branch 9.7, 9.8 added
  • Applies to branch deleted (9.6)
  • Fix Committed on Branch 9.7, 9.8 added

I have committed a patch to change the error message. This will be done on the 9.7 and 9.8 branches; I'm not retrofitting it to 9.6.

I have also made a modification to the stylesheet that generates the configuration file documentation so it includes an extra "Applies to" column which will list the Saxon editions to which each property is applicable (the information is present in the master XML source for configuration options, but is not copied through to the config file documentation. This will only become visible when we regenerate the documentation, which is usually only at major releases.

Actions #6

Updated by Cyril Dangerville almost 8 years ago

OK, I'll upgrade to 9.7 then. Thanks for the work and the prompt response :)

Actions #7

Updated by O'Neil Delpratt almost 8 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.7.0.5 added

Bug fix applied in the Saxon 9.7.0.5 maintenance release.

Actions #8

Updated by O'Neil Delpratt almost 8 years ago

  • Sprint/Milestone set to 9.7.0.5
Actions #9

Updated by O'Neil Delpratt almost 7 years ago

  • Applies to branch trunk added
  • Applies to branch deleted (9.8)
Actions #10

Updated by O'Neil Delpratt almost 7 years ago

  • Fix Committed on Branch trunk added
  • Fix Committed on Branch deleted (9.8)

Please register to edit this issue

Also available in: Atom PDF