Top Description Inners Fields Constructors Methods
com.sun.msv.relaxns.reader

public Class NamespaceState

extends State
Class Inheritance
Imports
java.util.Vector, org.iso_relax.dispatcher.IslandSchema, .IslandSchemaReader, org.iso_relax.dispatcher.impl.IgnoredSchema, org.xml.sax.Attributes, .InputSource, .SAXException, .XMLReader, org.xml.sax.helpers.XMLFilterImpl, com.sun.msv.reader.AbortException, .GrammarReader, .IgnoreState, .State, com.sun.msv.util.StartTagInfo

parses <namespace> element of RELAX Namespace.
Author
Kohsuke KAWAGUCHI

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private boolean
bailOut

this flag indicates we are in bail-out mode.

private boolean
inlineModuleExpected

this flag indicates this object expects a module element to appear as the child.

pack-priv IslandSchemaReader
moduleReader

this object will parse inlined grammar.

private String
namespace

inline module should have this primary namespace

Inherited from com.sun.msv.reader.State:
baseURIlocationparentStatereaderstartTag

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
endDocument()

Implements org.xml.sax.ContentHandler.endDocument.

Receive notification of the end of a document.
public void
endElement(String
the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed
namespace
,
String
the local name (without prefix), or the empty string if Namespace processing is not being performed
localName
,
String
the qualified XML name (with prefix), or the empty string if qualified names are not available
qName
)

Implements org.xml.sax.ContentHandler.endElement.

Receive notification of the end of an element.
protected RELAXNSReader
getReader()

gets reader in type-safe fashion

private void
public void
startElement(String
the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed
namespace
,
String
the local name (without prefix), or the empty string if Namespace processing is not being performed
localName
,
String
the qualified name (with prefix), or the empty string if qualified names are not available
qName
,
Attributes
the attributes attached to the element. If there are no attributes, it shall be an empty Attributes object. The value of this object after startElement returns is undefined
atts
)

Implements org.xml.sax.ContentHandler.startElement.

Receive notification of the beginning of an element.
protected void
startSelf()

Overrides com.sun.msv.reader.State.startSelf.

performs a task that should be done before reading any child elements.
Inherited from com.sun.msv.reader.State:
_assertcallInterceptExpressioncharactersendPrefixMappinggetBaseURIgetLocationgetParentStategetStartTagignorableWhitespaceinitprocessingInstructionsetDocumentLocatorskippedEntitystartDocumentstartPrefixMapping

Field Detail

bailOutback to summary
private boolean bailOut

this flag indicates we are in bail-out mode. any contents of <namespace> element will be ignored. this flag is used for error recovery.

inlineModuleExpectedback to summary
private boolean inlineModuleExpected

this flag indicates this object expects a module element to appear as the child.

moduleReaderback to summary
pack-priv IslandSchemaReader moduleReader

this object will parse inlined grammar.

namespaceback to summary
private String namespace

inline module should have this primary namespace

Constructor Detail

NamespaceStateback to summary
public NamespaceState()

Method Detail

endDocumentback to summary
public void endDocument()

Implements org.xml.sax.ContentHandler.endDocument.

Doc from org.xml.sax.ContentHandler.endDocument.

Receive notification of the end of a document.

This method is invoked by the parser to signal it has reached the end of the document after successfully completing the parsing process. After the event, the parser will return the control to the application.

endElementback to summary
public void endElement(String namespace, String localName, String qName)

Implements org.xml.sax.ContentHandler.endElement.

Doc from org.xml.sax.ContentHandler.endElement.

Receive notification of the end of an element.

The SAX parser will invoke this method at the end of every element in the XML document; there will be a corresponding startElement event for every endElement event (even when the element is empty).

For information on the names, see startElement.

Parameters
namespace:String

the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed

localName:String

the local name (without prefix), or the empty string if Namespace processing is not being performed

qName:String

the qualified XML name (with prefix), or the empty string if qualified names are not available

getReaderback to summary
protected RELAXNSReader getReader()

gets reader in type-safe fashion

getSchemaback to summary
private void getSchema(IslandSchemaReader moduleReader)
startElementback to summary
public void startElement(String namespace, String localName, String qName, Attributes atts) throws SAXException

Implements org.xml.sax.ContentHandler.startElement.

Doc from org.xml.sax.ContentHandler.startElement.

Receive notification of the beginning of an element.

The Parser will invoke this method at the beginning of every element in the XML document; there will be a corresponding endElement event for every startElement event (even when the element is empty). All of the element's content will be reported, in order, before the corresponding endElement event.

This event allows up to three name components for each element:

  1. the Namespace URI;
  2. the local name; and
  3. the qualified (prefixed) name.

Any or all of these may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties:

  • the Namespace URI and local name are required when the namespaces property is true (the default), and are optional when the namespaces property is false (if one is specified, both must be);
  • the qualified name is required when the namespace-prefixes property is true, and is optional when the namespace-prefixes property is false (the default).

Note that the attribute list provided will contain only attributes with explicit values (specified or defaulted): #IMPLIED attributes will be omitted. The attribute list will contain attributes used for Namespace declarations (xmlns* attributes) only if the http://xml.org/sax/features/namespace-prefixes property is true (it is false by default, and support for a true value is optional).

Like characters(), attribute values may have characters that need more than one char value.

Parameters
namespace:String

the Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed

localName:String

the local name (without prefix), or the empty string if Namespace processing is not being performed

qName:String

the qualified name (with prefix), or the empty string if qualified names are not available

atts:Attributes

the attributes attached to the element. If there are no attributes, it shall be an empty Attributes object. The value of this object after startElement returns is undefined

Exceptions
SAXException:
any SAX exception, possibly wrapping another exception
startSelfback to summary
protected void startSelf()

Overrides com.sun.msv.reader.State.startSelf.

Doc from com.sun.msv.reader.State.startSelf.

performs a task that should be done before reading any child elements. derived-class can safely read startTag and/or parentState values.

com.sun.msv.relaxns.reader back to summary

private Class NamespaceState.CutInFilter

extends XMLFilterImpl
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
endElement(String
The element's Namespace URI, or the empty string.
a
,
String
The element's local name, or the empty string.
b
,
String
The element's qualified (prefixed) name, or the empty string.
c
)

Overrides org.xml.sax.helpers.XMLFilterImpl.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Filter an end element event.
public void
startElement(String
The element's Namespace URI, or the empty string.
a
,
String
The element's local name, or the empty string.
b
,
String
The element's qualified (prefixed) name, or the empty string.
c
,
Attributes
The element's attributes.
d
)

Overrides org.xml.sax.helpers.XMLFilterImpl.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Filter a start element event.
Inherited from org.xml.sax.helpers.XMLFilterImpl:
charactersendDocumentendPrefixMappingerrorfatalErrorgetContentHandlergetDTDHandlergetEntityResolvergetErrorHandlergetFeaturegetParentgetPropertyignorableWhitespacenotationDeclparseparseprocessingInstructionresolveEntitysetContentHandlersetDocumentLocatorsetDTDHandlersetEntityResolversetErrorHandlersetFeaturesetParentsetPropertyskippedEntitystartDocumentstartPrefixMappingunparsedEntityDeclwarning

Field Detail

depthback to summary
private int depth

Constructor Detail

CutInFilterback to summary
private CutInFilter()

Method Detail

endElementback to summary
public void endElement(String a, String b, String c) throws SAXException

Overrides org.xml.sax.helpers.XMLFilterImpl.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Doc from org.xml.sax.helpers.XMLFilterImpl.endElement.

Filter an end element event.

Parameters
a:String

The element's Namespace URI, or the empty string.

b:String

The element's local name, or the empty string.

c:String

The element's qualified (prefixed) name, or the empty string.

Exceptions
SAXException:
The client may throw an exception during processing.
startElementback to summary
public void startElement(String a, String b, String c, Attributes d) throws SAXException

Overrides org.xml.sax.helpers.XMLFilterImpl.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Doc from org.xml.sax.helpers.XMLFilterImpl.startElement.

Filter a start element event.

Parameters
a:String

The element's Namespace URI, or the empty string.

b:String

The element's local name, or the empty string.

c:String

The element's qualified (prefixed) name, or the empty string.

d:Attributes

The element's attributes.

Exceptions
SAXException:
The client may throw an exception during processing.