public static class SchemaMapping.DoctypeRule extends SchemaMapping.Mapping
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
target
typeId or URL of the schema to use if this rule matches
|
protected boolean |
targetIsTypeId
for serialisation : output typeId="..." or url="..."
|
base, baseURI, parent
Constructor and Description |
---|
DoctypeRule(java.net.URI baseURI,
java.lang.String doctype,
java.lang.String target,
boolean targetIsTypeId) |
Modifier and Type | Method and Description |
---|---|
SchemaMapping.Mapping |
getMappingForDocument(java.lang.String publicId,
java.lang.String systemId,
java.lang.String namespace,
java.lang.String prefix,
java.lang.String localName)
iterate over the mappings and return the first hit.
|
SchemaMapping.Result |
getSchemaForDocument(java.lang.String publicId,
java.lang.String systemId,
java.lang.String namespace,
java.lang.String prefix,
java.lang.String localName,
boolean followTypeId)
iterate over the mappings and return the first hit.
|
java.lang.String |
toString() |
getBaseURI, getParent
protected final java.lang.String target
protected final boolean targetIsTypeId
public DoctypeRule(java.net.URI baseURI, java.lang.String doctype, java.lang.String target, boolean targetIsTypeId)
doctype
- matched doctypetarget
- typeID or URLtargetIsTypeId
- typeID / URL ?java.lang.IllegalArgumentException
- if doctype is nullpublic java.lang.String toString()
toString
in class java.lang.Object
public final SchemaMapping.Result getSchemaForDocument(java.lang.String publicId, java.lang.String systemId, java.lang.String namespace, java.lang.String prefix, java.lang.String localName, boolean followTypeId)
SchemaMapping.Mapping
getSchemaForDocument
in class SchemaMapping.Mapping
publicId
- public ID of the parsed documentsystemId
- system ID of the parsed documentnamespace
- namespace of the root element of the parsed documentprefix
- prefix of the root element of the parsed documentlocalName
- localName of the root element of the parsed documentfollowTypeId
- if the schema referenced from a typeId must be returnedpublic final SchemaMapping.Mapping getMappingForDocument(java.lang.String publicId, java.lang.String systemId, java.lang.String namespace, java.lang.String prefix, java.lang.String localName)
SchemaMapping.Mapping
getMappingForDocument
in class SchemaMapping.Mapping
publicId
- public ID of the parsed documentsystemId
- system ID of the parsed documentnamespace
- namespace of the root element of the parsed documentprefix
- prefix of the root element of the parsed documentlocalName
- localName of the root element of the parsed document