Parser Settings

Configuring Parser

The application can set a variety of ManekiNeko settings to more precisely control the behavior of the parser. These settings can be set directly on the JingConfiguration class or on the supplied parser classes by calling the setFeature and setProperty methods. For example:

// settings on JingConfiguration
org.apache.xerces.xni.parser.XMLParserConfiguration config =
  new org.cyberneko.relaxng.JingConfiguration();
config.setFeature("http://xml.org/sax/features/namespaces", true);
config.setFeature("http://xml.org/sax/features/validation", true);
config.setProperty("http://cyberneko.org/xml/properties/relaxng/schema-location", 
                   "data/relaxng/personal.rng");

// settings on DOMParser
org.cyberneko.relaxng.parsers.DOMParser parser = 
  new org.cyberneko.relaxng.parsers.DOMParser();
parser.setFeature("http://xml.org/sax/features/namespaces", true);
parser.setFeature("http://xml.org/sax/features/validation", true);
parser.setProperty("http://cyberneko.org/xml/properties/relaxng/schema-location", 
                   "data/relaxng/personal.rng");

Features

The ManekiNeko parser supports the following features:
Feature Id / DescriptionDefault
http://cyberneko.org/xml/features/relaxng/validation/check-ids
Specifies whether the Jing validator should additionally check ID/IDREF/IDREFs.
true
http://cyberneko.org/xml/features/relaxng/validation/feasible
Specifies whether the Jing validator should check if the document is feasibly valid.
false
http://cyberneko.org/xml/features/relaxng/compact-syntax
Specifies whether the Jing validator should parse the Relax NG grammar using the compact syntax.
false

Properties

The ManekiNeko parser supports the following properties:
Property Id / DescriptionValuesDefault
http://cyberneko.org/xml/properties/relaxng/schema-location
This property is used to set the location of the Relax NG grammar used to validate the parse document. If this property is not set, validation will not be performed, regardless of the state of the http://xml.org/sax/features/validation feature.
String null