Top Description Fields Methods
com.sun.org.apache.xerces.internal.xni.grammars

public Interface XMLSchemaDescription

extends XMLGrammarDescription
Known Direct Implementers
com.sun.org.apache.xerces.internal.impl.xs.XSDDescription
Imports
com.sun.org.apache.xerces.internal.xni.QName, .XMLAttributes

All information specific to XML Schema grammars.
Author
Sandy Gao, IBM

Field Summary

Modifier and TypeField and Description
public static final short
CONTEXT_ATTRIBUTE

Indicate that the parse of the current schema document is triggered by the occurrence of an attribute whose namespace is the target namespace of this schema document.

public static final short
CONTEXT_ELEMENT

Indicate that the parse of the current schema document is triggered by the occurrence of an element whose namespace is the target namespace of this schema document.

public static final short
CONTEXT_IMPORT

Indicate that the current schema document is <import>ed by another schema document.

public static final short
CONTEXT_INCLUDE

Indicate that the current schema document is <include>d by another schema document.

public static final short
CONTEXT_INSTANCE

Indicate that the parse of the current schema document is triggered by xsi:schemaLocation/noNamespaceSchemaLocation attribute(s) in the instance document.

public static final short
CONTEXT_PREPARSE

Indicate that the current schema document is being preparsed.

public static final short
CONTEXT_REDEFINE

Indicate that the current schema document is <redefine>d by another schema document.

public static final short
CONTEXT_XSITYPE

Indicate that the parse of the current schema document is triggered by the occurrence of an "xsi:type" attribute, whose value (a QName) has the target namespace of this schema document as its namespace.

Inherited from com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription:
XML_DTDXML_SCHEMA

Method Summary

Modifier and TypeMethod and Description
public XMLAttributes

Returns:

all attributes of the tiggering/enclosing element
getAttributes
()

If a call is triggered by an element/attribute/xsi:type in the instance, this call returns all attribute of such element (or enclosing element).

public short

Returns:

the value indicating the context
getContextType
()

Get the context.

public QName

Returns:

the name of the enclosing element
getEnclosingElementName
()

If a call is triggered by an attribute or xsi:type, then this method returns the enclosing element of such element.

public String[]

Returns:

an array of all location hints associated to the expected target namespace
getLocationHints
()

For import and references from the instance document, it's possible to have multiple hints for one namespace.

public String

Returns:

the expected/enclosing target namespace
getTargetNamespace
()

If the context is "include" or "redefine", then return the target namespace of the enclosing schema document; otherwise, the expected target namespace of this document.

public QName

Returns:

the name of the triggering component
getTriggeringComponent
()

If a call is triggered by an element/attribute/xsi:type in the instance, this call returns the name of such triggering component: the name of the element/attribute, or the value of the xsi:type.

Inherited from com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription:
getGrammarType

Field Detail

CONTEXT_ATTRIBUTEback to summary
public static final short CONTEXT_ATTRIBUTE

Indicate that the parse of the current schema document is triggered by the occurrence of an attribute whose namespace is the target namespace of this schema document. This value is only used if we do defer the loading of schema documents until a component from that namespace is referenced from the instance.

CONTEXT_ELEMENTback to summary
public static final short CONTEXT_ELEMENT

Indicate that the parse of the current schema document is triggered by the occurrence of an element whose namespace is the target namespace of this schema document. This value is only used if we do defer the loading of schema documents until a component from that namespace is referenced from the instance.

CONTEXT_IMPORTback to summary
public static final short CONTEXT_IMPORT

Indicate that the current schema document is <import>ed by another schema document.

CONTEXT_INCLUDEback to summary
public static final short CONTEXT_INCLUDE

Indicate that the current schema document is <include>d by another schema document.

CONTEXT_INSTANCEback to summary
public static final short CONTEXT_INSTANCE

Indicate that the parse of the current schema document is triggered by xsi:schemaLocation/noNamespaceSchemaLocation attribute(s) in the instance document. This value is only used if we don't defer the loading of schema documents.

CONTEXT_PREPARSEback to summary
public static final short CONTEXT_PREPARSE

Indicate that the current schema document is being preparsed.

CONTEXT_REDEFINEback to summary
public static final short CONTEXT_REDEFINE

Indicate that the current schema document is <redefine>d by another schema document.

CONTEXT_XSITYPEback to summary
public static final short CONTEXT_XSITYPE

Indicate that the parse of the current schema document is triggered by the occurrence of an "xsi:type" attribute, whose value (a QName) has the target namespace of this schema document as its namespace. This value is only used if we do defer the loading of schema documents until a component from that namespace is referenced from the instance.

Method Detail

getAttributesback to summary
public XMLAttributes getAttributes()

If a call is triggered by an element/attribute/xsi:type in the instance, this call returns all attribute of such element (or enclosing element).

Returns:XMLAttributes

all attributes of the tiggering/enclosing element

getContextTypeback to summary
public short getContextType()

Get the context. The returned value is one of the pre-defined CONTEXT_xxx constants.

Returns:short

the value indicating the context

getEnclosingElementNameback to summary
public QName getEnclosingElementName()

If a call is triggered by an attribute or xsi:type, then this method returns the enclosing element of such element.

Returns:QName

the name of the enclosing element

getLocationHintsback to summary
public String[] getLocationHints()

For import and references from the instance document, it's possible to have multiple hints for one namespace. So this method returns an array, which contains all location hints.

Returns:String[]

an array of all location hints associated to the expected target namespace

getTargetNamespaceback to summary
public String getTargetNamespace()

If the context is "include" or "redefine", then return the target namespace of the enclosing schema document; otherwise, the expected target namespace of this document.

Returns:String

the expected/enclosing target namespace

getTriggeringComponentback to summary
public QName getTriggeringComponent()

If a call is triggered by an element/attribute/xsi:type in the instance, this call returns the name of such triggering component: the name of the element/attribute, or the value of the xsi:type.

Returns:QName

the name of the triggering component