public final class XmlSchemaCollection extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
XmlSchemaCollection.SchemaKey
Key that identifies a schema in a collection, composed of a targetNamespace
and a system ID.
|
| Constructor and Description |
|---|
XmlSchemaCollection()
Creates new XmlSchemaCollection
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(XmlSchemaCollection.SchemaKey pKey)
Return an indication of whether a particular schema is in the working stack of
schemas.
|
XmlSchemaAttribute |
getAttributeByQName(QName schemaAttributeName)
Find a global attribute by QName in this collection of schemas.
|
XmlSchemaElement |
getElementByQName(QName qname)
Retrieve a global element from the schema collection.
|
EntityResolver |
getEntityResolver() |
ExtensionRegistry |
getExtReg() |
Map |
getKnownNamespaceMap()
get the namespace map
|
NamespacePrefixList |
getNamespaceContext()
Retrieve the namespace context.
|
URIResolver |
getSchemaResolver()
Retrieve the custom URI resolver, if any.
|
XmlSchemaType |
getTypeByQName(QName schemaTypeName)
Retrieve a global type from the schema collection.
|
XmlSchema[] |
getXmlSchema(String systemId)
Retrieve a set containing the XmlSchema instances with the given system ID.
|
XmlSchema[] |
getXmlSchemas()
Returns an array of all the XmlSchemas in this collection.
|
void |
init()
This section should comply to the XMLSchema specification; see
http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/datatypes.html#built-in-datatypes.
|
void |
pop()
Pop the stack of schemas.
|
void |
push(XmlSchemaCollection.SchemaKey pKey)
Push a schema onto the stack of schemas.
|
XmlSchema |
read(Document doc,
String systemId,
ValidationEventHandler veh)
Read an XML Schema from a complete XSD XML DOM Document into this collection.
|
XmlSchema |
read(Document doc,
String systemId,
ValidationEventHandler veh,
TargetNamespaceValidator validator)
Read an XML Schema from a complete XSD XML DOM Document into this collection.
|
XmlSchema |
read(Document doc,
ValidationEventHandler veh)
Read an XML schema into the collection from a DOM document.
|
XmlSchema |
read(Element elem)
Read an XML Schema into the collection from a DOM element.
|
XmlSchema |
read(Element elem,
String systemId)
Read a schema from a DOM tree into the collection.
|
XmlSchema |
read(InputSource inputSource,
ValidationEventHandler veh)
Read an XML schema into the collection from a SAX InputSource.
|
XmlSchema |
read(Reader r,
ValidationEventHandler veh) |
XmlSchema |
read(Source source,
ValidationEventHandler veh)
Read an XML schema into the collection from a TRaX source.
|
XmlSchema |
schemaForNamespace(String uri)
Return the schema from this collection for a particular targetNamespace.
|
void |
setBaseUri(String baseUri)
Set the base URI.
|
void |
setEntityResolver(EntityResolver entityResolver) |
void |
setExtReg(ExtensionRegistry extReg) |
void |
setKnownNamespaceMap(Map knownNamespaceMap)
sets the known namespace map
|
void |
setNamespaceContext(NamespacePrefixList namespaceContext)
Set the namespace context for this collection, which controls the assignment of
namespace prefixes to namespaces.
|
void |
setSchemaResolver(URIResolver schemaResolver)
Register a custom URI resolver
|
String |
toString() |
public ExtensionRegistry getExtReg()
public void setExtReg(ExtensionRegistry extReg)
public Map getKnownNamespaceMap()
public void setKnownNamespaceMap(Map knownNamespaceMap)
knownNamespaceMap - a map of previously known XMLSchema objects keyed by their namespace (String)public void setBaseUri(String baseUri)
baseUri - baseUri for this collection.public void setSchemaResolver(URIResolver schemaResolver)
schemaResolver - resolverpublic URIResolver getSchemaResolver()
public void init()
public XmlSchema read(Reader r, ValidationEventHandler veh)
public XmlSchema read(InputSource inputSource, ValidationEventHandler veh)
inputSource - the XSD document.veh - handler that is called back for validation.public XmlSchema read(Source source, ValidationEventHandler veh)
source - the XSD document.veh - handler that is called back for validation.public XmlSchema read(Document doc, ValidationEventHandler veh)
doc - the XSD document.veh - handler that is called back for validation.public XmlSchema read(Element elem)
elem - the DOM element for the schema.public XmlSchema read(Document doc, String systemId, ValidationEventHandler veh)
doc - The schema document.systemId - System ID for this schema.veh - handler to be called to check validity of the schema.public XmlSchema read(Document doc, String systemId, ValidationEventHandler veh, TargetNamespaceValidator validator)
doc - Source document.systemId - System id.veh - Stub for future capability to handle validation errors.validator - object that is called back to check validity of the target namespace.public XmlSchema read(Element elem, String systemId)
elem - xs:schema DOM element.systemId - System id.public XmlSchema[] getXmlSchema(String systemId)
systemId - the system id for this schemapublic XmlSchema[] getXmlSchemas()
public XmlSchemaElement getElementByQName(QName qname)
qname - the element QName.public XmlSchemaType getTypeByQName(QName schemaTypeName)
schemaTypeName - the QName of the type.public XmlSchemaAttribute getAttributeByQName(QName schemaAttributeName)
schemaAttributeName - the name of the attribute.public XmlSchema schemaForNamespace(String uri)
uri - target namespace URI.public NamespacePrefixList getNamespaceContext()
public void setNamespaceContext(NamespacePrefixList namespaceContext)
namespaceContext - the context.public void push(XmlSchemaCollection.SchemaKey pKey)
pKey - the schema key.public void pop()
public boolean check(XmlSchemaCollection.SchemaKey pKey)
pKey - schema keypublic EntityResolver getEntityResolver()
public void setEntityResolver(EntityResolver entityResolver)
Copyright © 2004–2017 The Apache Software Foundation. All rights reserved.