Package com.ctc.wstx.dtd
Class DTDSubsetImpl
- java.lang.Object
-
- com.ctc.wstx.dtd.DTDSubset
-
- com.ctc.wstx.dtd.DTDSubsetImpl
-
- All Implemented Interfaces:
DTDValidationSchema,XMLValidationSchema
public final class DTDSubsetImpl extends DTDSubset
The default implementation ofDTDSubset
-
-
Field Summary
-
Fields inherited from interface org.codehaus.stax2.validation.XMLValidationSchema
SCHEMA_ID_DTD, SCHEMA_ID_RELAXNG, SCHEMA_ID_TREX, SCHEMA_ID_W3C_SCHEMA
-
-
Method Summary
-
Methods inherited from class com.ctc.wstx.dtd.DTDSubset
getSchemaType
-
-
-
-
Method Detail
-
constructInstance
public static DTDSubsetImpl constructInstance(boolean cachable, HashMap<String,EntityDecl> genEnt, Set<String> refdGEs, HashMap<String,EntityDecl> paramEnt, Set<String> refdPEs, HashMap<String,NotationDeclaration> notations, HashMap<PrefixedName,DTDElement> elements, boolean fullyValidating)
-
combineWithExternalSubset
public DTDSubset combineWithExternalSubset(InputProblemReporter rep, DTDSubset extSubset) throws XMLStreamException
Method that will combine definitions from internal and external subsets, producing a single DTD set.- Specified by:
combineWithExternalSubsetin classDTDSubset- Throws:
XMLStreamException
-
createValidator
public XMLValidator createValidator(ValidationContext ctxt) throws XMLStreamException
- Specified by:
createValidatorin interfaceXMLValidationSchema- Specified by:
createValidatorin classDTDSubset- Throws:
XMLStreamException
-
getEntityCount
public int getEntityCount()
- Specified by:
getEntityCountin interfaceDTDValidationSchema- Specified by:
getEntityCountin classDTDSubset- Returns:
- Number of general (non-parameter) entities (of all types) declared in this DTD schema (in subsets [internal, external] included)
-
getNotationCount
public int getNotationCount()
- Specified by:
getNotationCountin interfaceDTDValidationSchema- Specified by:
getNotationCountin classDTDSubset- Returns:
- Number of notations declared in this DTD schema (in subsets [internal, external] included)
-
isCachable
public boolean isCachable()
- Specified by:
isCachablein classDTDSubset
-
getGeneralEntityMap
public HashMap<String,EntityDecl> getGeneralEntityMap()
- Specified by:
getGeneralEntityMapin classDTDSubset
-
getGeneralEntityList
public List<EntityDecl> getGeneralEntityList()
- Specified by:
getGeneralEntityListin classDTDSubset
-
getParameterEntityMap
public HashMap<String,EntityDecl> getParameterEntityMap()
- Specified by:
getParameterEntityMapin classDTDSubset
-
getNotationMap
public HashMap<String,NotationDeclaration> getNotationMap()
- Specified by:
getNotationMapin classDTDSubset
-
getNotationList
public List<NotationDeclaration> getNotationList()
- Specified by:
getNotationListin classDTDSubset
-
getElementMap
public HashMap<PrefixedName,DTDElement> getElementMap()
- Specified by:
getElementMapin classDTDSubset
-
isReusableWith
public boolean isReusableWith(DTDSubset intSubset)
Method used in determining whether cached external subset instance can be used with specified internal subset. If ext. subset references any parameter/general entities int subset (re-)defines, it can not; otherwise it can be used.- Specified by:
isReusableWithin classDTDSubset- Returns:
- True if this (external) subset refers to a parameter entity defined in passed-in internal subset.
-
throwNotationException
public static void throwNotationException(NotationDeclaration oldDecl, NotationDeclaration newDecl) throws XMLStreamException
- Throws:
XMLStreamException
-
throwElementException
public static void throwElementException(DTDElement oldElem, Location loc) throws XMLStreamException
- Throws:
XMLStreamException
-
-