@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public class ParserCreator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.ClassLoader |
alternateClassLoader
An alternate class loader.
|
static java.lang.String |
ASSERT_COMMENT_PI_CHECKING_ID
Feature identifier: Enables comments and PIs for assertions processing
|
static java.lang.String |
BASE_URI_FIXUP
Feature identifier: base uri fixup.
|
static java.lang.String |
CTA_FULL_XPATH_FEATURE_ID
Feature identifier: Full XPath 2.0 for CTA evaluations
|
static java.lang.String |
OXYGEN_XI_LOCATION_ATTR_NAME
When the XINCLUDE_LOCATION_FEATURE feature is set, each XInclude top element
will have this attribute set with the following form:
absoluteSystemId + '#' + XPointer_value
|
static int |
VALIDATE
Check that the document is conformant to a strict set of rules.
|
static int |
VALIDATE_OR_WELLFORMED
If the document declares the use of a schema, then it will be used validation, otherwise only a
wellformed check will be done.
|
static int |
WELLFORMED
Check if the document is conformant to a relaxed set of rules.
|
static java.lang.String |
XINCLUDE_FEATURE
Feature identifier: XInclude processing
|
static java.lang.String |
XML_SCHEMA_VERSION
The XML schema version Xerces parser property
|
Constructor and Description |
---|
ParserCreator() |
Modifier and Type | Method and Description |
---|---|
static org.xml.sax.XMLReader |
changeValidationMode(org.xml.sax.XMLReader parser,
int validationMode)
Changes the validation mode.
|
static javax.xml.transform.sax.SAXSource |
createCatalogSAXSource(javax.xml.transform.stream.StreamSource streamSource)
Create a SAX source starting from a stream source/
|
static javax.xml.transform.Source |
createCatalogSource(javax.xml.transform.Source source)
Adds an XML reader with a catalog resolver in case of a stream source
transforming it into a SAXSource.
|
static org.apache.xerces.parsers.DOMParser |
createDOMParser()
Create a DOM parser.
|
static org.apache.xerces.parsers.XMLGrammarPreparser |
createDTDValidationPreparser()
Creates a preparser for DTD validation.
|
static org.apache.xerces.parsers.DOMParser |
createGrammarCachedDOMParser(ro.sync.xml.parser.GrammarCache xgp)
Create a DOM parser with cached grammar
|
static org.xml.sax.XMLReader |
createGrammarCachedXMLReader(ro.sync.xml.parser.GrammarCache xgp,
boolean valid)
Create an XML reader with cached grammar
|
static org.xml.sax.XMLReader |
createGrammarCachedXMLReader(ro.sync.xml.parser.GrammarCache xgp,
boolean valid,
ro.sync.exml.editor.xsdeditor.XMLSchemaVersion version)
Create an XML reader with cached grammar
|
static org.apache.xerces.parsers.XMLGrammarPreparser |
createMultipleSchemasPreparser(org.xml.sax.InputSource[] sources)
Gets the XSD's Grammars from XSD Files URLs
|
static org.apache.xerces.parsers.XMLGrammarPreparser |
createSchemaValidationPreparser(ro.sync.exml.editor.xsdeditor.XMLSchemaVersion schemaVersion)
Creates a preparser for schema validation.
|
static java.lang.ClassLoader |
getAlternateClassLoader()
Get the alternate class loader from the parser creator.
|
static ro.sync.exml.editor.xsdeditor.XMLSchemaVersion |
getSchemaVersionFromParser(org.xml.sax.XMLReader parser)
Gets the schema version set the parser and
converts the Xerces schema version, that can be Constants.W3C_XML_SCHEMA11_NS_URI,
or Constants.W3C_XML_SCHEMA10_NS_URI, to an
XMLSchemaVersion object. |
static java.lang.String |
getXercesSchemaVersionPropertyValue(ro.sync.exml.editor.xsdeditor.XMLSchemaVersion schemaVersion)
Converts the given
enum constant representing an XML Schema version to a
String value to be set for the Xerces property XML_SCHEMA_VERSION . |
static org.apache.xerces.xni.parser.XMLInputSource |
getXMLInputSource(org.xml.sax.InputSource source)
Carefully creates an XMLInputSource from an InputSource.
|
static org.apache.xerces.parsers.DOMParser |
newAttrOrderDomParser(boolean sortAttributes,
boolean preserveNotNormalizedAttributeValues)
Creates a DOM parser that preserves the order of attributes as they are received from Xerces.
|
static javax.xml.parsers.DocumentBuilder |
newDocumentBuilder()
Creates a document buider with a catalog reslover.
|
static javax.xml.parsers.DocumentBuilder |
newDocumentBuilder(boolean fakeResolver,
boolean noExpand,
boolean namespaceAware)
Create a document builder.
|
static javax.xml.parsers.DocumentBuilder |
newDocumentBuilder(boolean fakeResolver,
boolean noExpand,
boolean namespaceAware,
java.net.URL schemaUrl)
Create a document builder.
|
static javax.xml.parsers.DocumentBuilder |
newDocumentBuilder(boolean fakeResolver,
boolean noExpand,
boolean namespaceAware,
java.net.URL schemaUrl,
boolean schemaAware)
Create a document builder.
|
static javax.xml.parsers.DocumentBuilder |
newDocumentBuilder(boolean fakeResolver,
boolean noExpand,
boolean namespaceAware,
java.net.URL schemaUrl,
boolean schemaAware,
boolean forceXIncludeAndBaseURIFixup)
Create a document builder.
|
static javax.xml.parsers.DocumentBuilder |
newDocumentBuilder(boolean fakeResolver,
boolean noExpand,
boolean namespaceAware,
java.net.URL schemaUrl,
boolean schemaAware,
boolean forceXIncludeAndBaseURIFixup,
boolean dynamicValidation)
Create a document builder.
|
static javax.xml.parsers.DocumentBuilder |
newDocumentBuilderFakeResolver()
Creates a document buider with a fake resolver.
|
static javax.xml.parsers.DocumentBuilder |
newDocumentBuilderNoExpand()
Creates a document buider with a catalog reslover.
|
static javax.xml.parsers.DocumentBuilder |
newDocumentBuilderNS()
Creates a document builder which is namespace aware.
|
static org.xml.sax.XMLReader |
newDTDXRFullValidIdCollector(java.util.List<ro.sync.xml.parser.IDValue> idValues,
ro.sync.xml.parser.XMLGrammarPoolImpl xgp)
Creates an XMLReader that collects ID Attributes values with full validation and schema
checking, disabled std.output and with no resolver set.
|
static ro.sync.xml.parser.LocationDomParser |
newLocationDomParser()
Creates a DOM Parser that populates with location information the nodes.
|
static ro.sync.xml.parser.LocationDomParser |
newLocationDomParser(org.apache.xerces.xni.parser.XMLParserConfiguration config,
boolean dtdAware)
Creates a DOM Parser that populates with location information the nodes.
|
static ro.sync.xml.parser.LocationDomParser |
newLocationDomParserForXpath()
Creates a Location DOM Parser that is tuned for XPath.
|
static ro.sync.xml.parser.LocationDomParser |
newLocationDomParserForXpath(ro.sync.exml.editor.xmleditor.transform.stopper.ExecutionStopper executionStopper)
Creates a Location DOM Parser that is tuned for XPath.
|
static ro.sync.xml.parser.LocationDomParser |
newLocationDomParserNoResolver()
Creates a DOM parser that has no catalog resolver.
|
static ro.sync.xml.parser.LocationDomParser |
newLocationDomParserNoResolverForDiff()
Creates a DOM parser that has no catalog resolver, no DTD validation for last stage and no RNG defaults processing.
|
static com.thaiopensource.validate.ValidationDriver |
newRelaxNGValidator(org.xml.sax.ErrorHandler errorHandler,
boolean useCompactSyntax)
Creates a Relax NG validation engine to validate against schemas in XML or compact syntax.
|
static com.thaiopensource.validate.ValidationDriver |
newRelaxNGValidator(org.xml.sax.ErrorHandler errorHandler,
boolean useCompactSyntax,
java.util.List<ro.sync.xml.parser.IDValue> idList)
Creates a Relax NG validation engine to validate against schemas in XML or compact syntax.
|
static com.thaiopensource.validate.ValidationDriver |
newRelaxNGValidator(org.xml.sax.ErrorHandler errorHandler,
boolean useCompactSyntax,
java.util.List idList,
com.thaiopensource.xml.sax.XMLReaderCreator readerCreator)
Creates a Relax NG validation engine to validate against schemas in XML or compact syntax.
|
static com.thaiopensource.validate.ValidationDriver |
newRelaxNGValidatorNoOptions(org.xml.sax.ErrorHandler errorHandler,
boolean useCompactSyntax)
Creates a Relax NG validation engine to validate against schemas in XML or compact syntax.
|
static javax.xml.parsers.DocumentBuilder |
newSchemaAwareDocumentBuilder()
Creates a document buider with a catalog resolver.
|
static org.xml.sax.XMLReader |
newWSDLFullValid(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Creates a XMLReader with full validation and schema checking, disabled std.output and with no
resolver set for WSDL validation.
|
static org.apache.xerces.xni.parser.XMLParserConfiguration |
newXmlParserConfiguration(org.apache.xerces.util.SymbolTable st,
org.apache.xerces.xni.grammars.XMLGrammarPool xgp,
java.util.List<ro.sync.xml.parser.IDValue> idValues,
boolean fakeResolver)
Creates new XMLParserConfiguration depending on options and the list of idValues.
|
static org.apache.xerces.xni.parser.XMLParserConfiguration |
newXmlParserConfiguration(org.apache.xerces.util.SymbolTable st,
org.apache.xerces.xni.grammars.XMLGrammarPool xgp,
java.util.List<ro.sync.xml.parser.IDValue> idValues,
boolean fakeResolver,
boolean dtdValidateForLastStage)
Creates new XMLParserConfiguration depending on options and the list of idValues.
|
static org.apache.xerces.xni.parser.XMLParserConfiguration |
newXmlParserConfiguration(org.apache.xerces.util.SymbolTable st,
org.apache.xerces.xni.grammars.XMLGrammarPool xgp,
java.util.List<ro.sync.xml.parser.IDValue> idValues,
boolean fakeResolver,
boolean dtdValidateForLastStage,
boolean forceDisableRNGDefaults)
Creates new XMLParserConfiguration depending on options and the list of idValues.
|
static org.xml.sax.XMLReader |
newXRFullValid()
Creates a XMLReader with full validation and schema checking, disabled std.output and with no
resolver set.
|
static org.xml.sax.XMLReader |
newXRFullValid(ro.sync.xml.parser.XMLGrammarPoolImpl xgp)
Creates a XMLReader with full validation and schema checking, disabled std.output and with no
resolver set.
|
static org.xml.sax.XMLReader |
newXRFullValid(org.apache.xerces.xni.parser.XMLParserConfiguration parserConfig)
Creates a XMLReader with full validation and schema checking, disabled std.output and with no
resolver set.
|
static org.xml.sax.XMLReader |
newXRFullValidCompoundResolver(org.xml.sax.EntityResolver entityResolver)
Creates a XMLReader with disabled std.output and a compond resolver, from the catalog resolver
and the given resolver.
|
static org.xml.sax.XMLReader |
newXRFullValidIdCollector(java.util.List<ro.sync.xml.parser.IDValue> idValues)
Creates an XMLReader that collects ID Attributes values with full validation and schema
checking, disabled std.output and with no resolver set.
|
static org.xml.sax.XMLReader |
newXRNoValid()
Creates a XMLReader with disabled std.output and with no extra resolver.
|
static org.xml.sax.XMLReader |
newXRNoValid(org.apache.xerces.xni.grammars.XMLGrammarPool gp)
Creates a XMLReader with disabled std.output and with no extra resolver.
|
static org.xml.sax.XMLReader |
newXRNoValidCompoundResolver(org.xml.sax.EntityResolver entityResolver)
Creates a XMLReader with disabled std.output and a compound resolver, from the catalog resolver
and the given resolver.
|
static org.xml.sax.XMLReader |
newXRNoValidFakeResolver()
Creates a XMLReader with disabled std.output and with a fake resolver.
|
static org.xml.sax.XMLReader |
newXRValid(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Creates a XMLReader with validation support.
|
static void |
setAcceptUndeclaredEntities(org.apache.xerces.parsers.DOMParser parser)
Set accept undeclared entities for the DOM parser.
|
static void |
setAlternateClassLoader(java.lang.ClassLoader alternateClassLoader)
Set an alternate class loader for the parser creator.
|
static void |
setGrammarCacheToParser(ro.sync.xml.parser.GrammarCache xgp,
org.apache.xerces.parsers.DOMParser parser)
Set the grammar cache to the parser.
|
static void |
setParserSystemProperties()
Sets the parser JAXP properties to point to the correct implementation.
|
protected static java.lang.ClassLoader alternateClassLoader
public static final java.lang.String XINCLUDE_FEATURE
public static final java.lang.String OXYGEN_XI_LOCATION_ATTR_NAME
public static final java.lang.String BASE_URI_FIXUP
public static int VALIDATE
public static int WELLFORMED
public static int VALIDATE_OR_WELLFORMED
public static final java.lang.String XML_SCHEMA_VERSION
public static final java.lang.String CTA_FULL_XPATH_FEATURE_ID
public static final java.lang.String ASSERT_COMMENT_PI_CHECKING_ID
public static void setAlternateClassLoader(java.lang.ClassLoader alternateClassLoader)
alternateClassLoader
- public static java.lang.ClassLoader getAlternateClassLoader()
public static javax.xml.parsers.DocumentBuilder newDocumentBuilder(boolean fakeResolver, boolean noExpand, boolean namespaceAware) throws javax.xml.parsers.ParserConfigurationException
fakeResolver
- true
if a fake resolver should be used as
an entity resolver. If false
it will use oxygen catalog an
entity resolver from CatalogResolverFactory.noExpand
- If true
the entities will not be expanded.namespaceAware
- true
to activate namespace awareness.javax.xml.parsers.ParserConfigurationException
public static javax.xml.parsers.DocumentBuilder newDocumentBuilder(boolean fakeResolver, boolean noExpand, boolean namespaceAware, java.net.URL schemaUrl) throws javax.xml.parsers.ParserConfigurationException
fakeResolver
- true
if a fake resolver should be used as
an entity resolver. If false
it will use oxygen catalog an
entity resolver from CatalogResolverFactory.noExpand
- If true
the entities will not be expanded.namespaceAware
- true
to activate namespace awareness.schemaUrl
- The XML schema that should be used for validation.javax.xml.parsers.ParserConfigurationException
public static javax.xml.parsers.DocumentBuilder newDocumentBuilder(boolean fakeResolver, boolean noExpand, boolean namespaceAware, java.net.URL schemaUrl, boolean schemaAware) throws javax.xml.parsers.ParserConfigurationException
fakeResolver
- true
if a fake resolver should be used as
an entity resolver. If false
it will use oxygen catalog an
entity resolver from CatalogResolverFactory.noExpand
- If true
the entities will not be expanded.namespaceAware
- true
to activate namespace awareness.schemaUrl
- The XML schema that should be used for validation.schemaAware
- True if schema awarejavax.xml.parsers.ParserConfigurationException
public static javax.xml.parsers.DocumentBuilder newDocumentBuilder(boolean fakeResolver, boolean noExpand, boolean namespaceAware, java.net.URL schemaUrl, boolean schemaAware, boolean forceXIncludeAndBaseURIFixup) throws javax.xml.parsers.ParserConfigurationException
fakeResolver
- true
if a fake resolver should be used as
an entity resolver. If false
it will use oxygen catalog an
entity resolver from CatalogResolverFactory.noExpand
- If true
the entities will not be expanded.namespaceAware
- true
to activate namespace awareness.schemaUrl
- The XML schema that should be used for validation.schemaAware
- True if schema awareforceXIncludeAndBaseURIFixup
- true
if the XInclude support must be enabled
no matter the options. Base URI fixup will also be enabled.javax.xml.parsers.ParserConfigurationException
public static javax.xml.parsers.DocumentBuilder newDocumentBuilder(boolean fakeResolver, boolean noExpand, boolean namespaceAware, java.net.URL schemaUrl, boolean schemaAware, boolean forceXIncludeAndBaseURIFixup, boolean dynamicValidation) throws javax.xml.parsers.ParserConfigurationException
fakeResolver
- true
if a fake resolver should be used as
an entity resolver. If false
it will use oxygen catalog an
entity resolver from CatalogResolverFactory.noExpand
- If true
the entities will not be expanded.namespaceAware
- true
to activate namespace awareness.schemaUrl
- The XML schema that should be used for validation.schemaAware
- True if schema awareforceXIncludeAndBaseURIFixup
- true
if the XInclude support must be enabled
no matter the options. Base URI fixup will also be enabled.dynamicValidation
- true
if the dynamic valication feature should be active.javax.xml.parsers.ParserConfigurationException
public static javax.xml.parsers.DocumentBuilder newSchemaAwareDocumentBuilder() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
- When the parsers are not conf. properly.public static javax.xml.parsers.DocumentBuilder newDocumentBuilder() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
- When the parsers are not conf. properly.public static javax.xml.parsers.DocumentBuilder newDocumentBuilderFakeResolver() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
- When the parsers are not conf. properly.public static javax.xml.parsers.DocumentBuilder newDocumentBuilderNoExpand() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
- When the parsers are not conf. properly.public static javax.xml.parsers.DocumentBuilder newDocumentBuilderNS() throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
- When the parsers are not conf. properly.public static org.apache.xerces.xni.parser.XMLParserConfiguration newXmlParserConfiguration(org.apache.xerces.util.SymbolTable st, org.apache.xerces.xni.grammars.XMLGrammarPool xgp, java.util.List<ro.sync.xml.parser.IDValue> idValues, boolean fakeResolver)
st
- The symbol table used during parsing.xgp
- The grammar pool.idValues
- The list of the collected id values. If not null creates a PSVIConfiguration.fakeResolver
- true
if a fake resolver will be imposed on the parser at a
later time. This means the default XInclude processing
should be disabled in this case, otherwise the document parsing will
break in the first xi:include reference.public static org.apache.xerces.xni.parser.XMLParserConfiguration newXmlParserConfiguration(org.apache.xerces.util.SymbolTable st, org.apache.xerces.xni.grammars.XMLGrammarPool xgp, java.util.List<ro.sync.xml.parser.IDValue> idValues, boolean fakeResolver, boolean dtdValidateForLastStage)
st
- The symbol table used during parsing.xgp
- The grammar pool.idValues
- The list of the collected id values. If not null creates a PSVIConfiguration.fakeResolver
- true
if a fake resolver will be imposed on the parser at a
later time. This means the default XInclude processing
should be disabled in this case, otherwise the document parsing will
break in the first xi:include reference.dtdValidateForLastStage
- Add the DTD validation as the last stage in the parser.public static org.apache.xerces.xni.parser.XMLParserConfiguration newXmlParserConfiguration(org.apache.xerces.util.SymbolTable st, org.apache.xerces.xni.grammars.XMLGrammarPool xgp, java.util.List<ro.sync.xml.parser.IDValue> idValues, boolean fakeResolver, boolean dtdValidateForLastStage, boolean forceDisableRNGDefaults)
st
- The symbol table used during parsing.xgp
- The grammar pool.idValues
- The list of the collected id values. If not null creates a PSVIConfiguration.fakeResolver
- true
if a fake resolver will be imposed on the parser at a
later time. This means the default XInclude processing
should be disabled in this case, otherwise the document parsing will
break in the first xi:include reference.dtdValidateForLastStage
- Add the DTD validation as the last stage in the parser.forceDisableRNGDefaults
- true
if the RNG defaults should be disabled no matter what the option says.
This is used for diff parser.public static org.xml.sax.XMLReader newXRNoValidFakeResolver()
public static org.xml.sax.XMLReader newXRFullValidCompoundResolver(org.xml.sax.EntityResolver entityResolver)
entityResolver
- The entity resolver to be compound with the xml catalog resolver.public static org.xml.sax.XMLReader newXRNoValidCompoundResolver(org.xml.sax.EntityResolver entityResolver)
entityResolver
- The entity resolver to be compound with the xml catalog resolver.public static org.xml.sax.XMLReader newXRNoValid(org.apache.xerces.xni.grammars.XMLGrammarPool gp)
gp
- Grammar pool which can be reused.public static org.xml.sax.XMLReader newXRNoValid()
public static org.xml.sax.XMLReader newXRFullValid(ro.sync.xml.parser.XMLGrammarPoolImpl xgp)
The parser has the catalog entity resolver.
xgp
- XML Grammar poolpublic static org.xml.sax.XMLReader newXRFullValid()
The parser has the catalog entity resolver.
public static org.xml.sax.XMLReader newXRFullValid(org.apache.xerces.xni.parser.XMLParserConfiguration parserConfig)
The parser has the catalog entity resolver.
parserConfig
- The parser configurationpublic static org.xml.sax.XMLReader newWSDLFullValid(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
The parser has the catalog entity resolver.
grammarPool
- The pool containing the grammars the parser must use to validate the documents.public static org.xml.sax.XMLReader newXRValid(org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
grammarPool
- In this pool the parser stores the grammars. They can be further used to examine them.public static com.thaiopensource.validate.ValidationDriver newRelaxNGValidator(org.xml.sax.ErrorHandler errorHandler, boolean useCompactSyntax)
errorHandler
- The error handler to be set to the parser.useCompactSyntax
- If true the Relax NG grammar is in compact syntax otherwise in XML syntax.public static com.thaiopensource.validate.ValidationDriver newRelaxNGValidator(org.xml.sax.ErrorHandler errorHandler, boolean useCompactSyntax, java.util.List<ro.sync.xml.parser.IDValue> idList)
errorHandler
- The error handler to be set to the parser.useCompactSyntax
- If true the Relax NG grammar is in compact syntax otherwise in XML syntax.idList
- The list of id values to be colected.public static com.thaiopensource.validate.ValidationDriver newRelaxNGValidatorNoOptions(org.xml.sax.ErrorHandler errorHandler, boolean useCompactSyntax)
errorHandler
- The error handler to be set to the parser.useCompactSyntax
- If true the Relax NG grammar is in compact syntax otherwise in XML syntax.public static com.thaiopensource.validate.ValidationDriver newRelaxNGValidator(org.xml.sax.ErrorHandler errorHandler, boolean useCompactSyntax, java.util.List idList, com.thaiopensource.xml.sax.XMLReaderCreator readerCreator)
errorHandler
- The error handler to be set to the parser.useCompactSyntax
- If true the Relax NG grammar is in compact syntax otherwise in XML syntax.idList
- The list of id values to be colected.readerCreator
- The XMLReaderCreator to be used.public static org.apache.xerces.parsers.DOMParser newAttrOrderDomParser(boolean sortAttributes, boolean preserveNotNormalizedAttributeValues) throws org.xml.sax.SAXException
sortAttributes
- True if the attributes must be sorted. This is the
default implementation in the DOMParser. False if the order of the
attributes must be stored in a userdata in a node.preserveNotNormalizedAttributeValues
- True if the not normalized (original) attribute
values must be preserved.org.xml.sax.SAXException
- If the features of the parser could not be set.public static org.xml.sax.XMLReader newXRFullValidIdCollector(java.util.List<ro.sync.xml.parser.IDValue> idValues)
The parser has the catalog entity resolver.
idValues
- The list of ID values to be modified.public static org.xml.sax.XMLReader newDTDXRFullValidIdCollector(java.util.List<ro.sync.xml.parser.IDValue> idValues, ro.sync.xml.parser.XMLGrammarPoolImpl xgp)
The parser has the catalog entity resolver.
idValues
- The list of ID values to be modified.xgp
- The XML Grammar pool, if availablepublic static org.xml.sax.XMLReader changeValidationMode(org.xml.sax.XMLReader parser, int validationMode)
parser
- The xml reader to be changed the mode.validationMode
- The validation operation.public static ro.sync.xml.parser.LocationDomParser newLocationDomParser()
public static ro.sync.xml.parser.LocationDomParser newLocationDomParser(org.apache.xerces.xni.parser.XMLParserConfiguration config, boolean dtdAware)
config
- The parser configuration.dtdAware
- true
if the parser is DTD aware.public static ro.sync.xml.parser.LocationDomParser newLocationDomParserNoResolver()
public static ro.sync.xml.parser.LocationDomParser newLocationDomParserNoResolverForDiff()
public static void setAcceptUndeclaredEntities(org.apache.xerces.parsers.DOMParser parser)
parser
- The DOM parser to set the feature on.public static void setParserSystemProperties()
public static ro.sync.xml.parser.LocationDomParser newLocationDomParserForXpath()
public static ro.sync.xml.parser.LocationDomParser newLocationDomParserForXpath(ro.sync.exml.editor.xmleditor.transform.stopper.ExecutionStopper executionStopper)
executionStopper
- The execution stopper.public static org.apache.xerces.parsers.XMLGrammarPreparser createSchemaValidationPreparser(ro.sync.exml.editor.xsdeditor.XMLSchemaVersion schemaVersion)
schemaVersion
- An XML Schema version.public static java.lang.String getXercesSchemaVersionPropertyValue(ro.sync.exml.editor.xsdeditor.XMLSchemaVersion schemaVersion)
enum
constant representing an XML Schema version to a
String
value to be set for the Xerces property XML_SCHEMA_VERSION
.schemaVersion
- An XML Schema version.String
value to be set for the Xerces property XML_SCHEMA_VERSION
.public static ro.sync.exml.editor.xsdeditor.XMLSchemaVersion getSchemaVersionFromParser(org.xml.sax.XMLReader parser)
XMLSchemaVersion
object.parser
- The parser to get the schema version from.XMLSchemaVersion
object.public static org.apache.xerces.parsers.XMLGrammarPreparser createDTDValidationPreparser()
public static org.apache.xerces.parsers.XMLGrammarPreparser createMultipleSchemasPreparser(org.xml.sax.InputSource[] sources)
sources
- The URLspublic static org.apache.xerces.xni.parser.XMLInputSource getXMLInputSource(org.xml.sax.InputSource source)
source
- The input source.public static javax.xml.transform.Source createCatalogSource(javax.xml.transform.Source source)
source
- The source.public static javax.xml.transform.sax.SAXSource createCatalogSAXSource(javax.xml.transform.stream.StreamSource streamSource)
streamSource
- The stream source.public static org.xml.sax.XMLReader createGrammarCachedXMLReader(ro.sync.xml.parser.GrammarCache xgp, boolean valid) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
xgp
- The grammar pool cachingvalid
- True if also validatesorg.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public static org.xml.sax.XMLReader createGrammarCachedXMLReader(ro.sync.xml.parser.GrammarCache xgp, boolean valid, ro.sync.exml.editor.xsdeditor.XMLSchemaVersion version) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
xgp
- The grammar pool cachingvalid
- True if also validatesversion
- The XML Schema version to use. Can be null
.org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public static org.apache.xerces.parsers.DOMParser createDOMParser() throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public static org.apache.xerces.parsers.DOMParser createGrammarCachedDOMParser(ro.sync.xml.parser.GrammarCache xgp) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
xgp
- The grammar pool caching.org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public static void setGrammarCacheToParser(ro.sync.xml.parser.GrammarCache xgp, org.apache.xerces.parsers.DOMParser parser) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
xgp
- The grammar cache.parser
- The parser.org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.