com.sun.msv.reader.relax.core
Class ModuleMergeState

java.lang.Object
  extended by com.sun.msv.reader.State
      extended by com.sun.msv.reader.SimpleState
          extended by com.sun.msv.reader.relax.core.DivInModuleState
              extended by com.sun.msv.reader.relax.core.ModuleMergeState
All Implemented Interfaces:
XSTypeOwner, ExpressionOwner, ContentHandler
Direct Known Subclasses:
ModuleState

public class ModuleMergeState
extends DivInModuleState

Used to parse module. As stand-alone, this state is used to parse a module included by another module. By a base class, this state is used to parse a "head" module. This class checks consistency between targetNamespace attribute and the namespace specified by its caller (grammar/module).

Author:
Kohsuke KAWAGUCHI

Field Summary
protected  String expectedTargetNamespace
          expected targetNamespace for this module.
protected  String targetNamespace
          computed targetNamespace.
 
Fields inherited from class com.sun.msv.reader.State
baseURI, location, parentState, reader, startTag
 
Constructor Summary
protected ModuleMergeState(String expectedTargetNamespace)
           
 
Method Summary
protected  void startSelf()
          performs a task that should be done before reading any child elements.
 
Methods inherited from class com.sun.msv.reader.relax.core.DivInModuleState
createChildState, getReader, getTargetNamespaceUri, onEndChild, onEndChild
 
Methods inherited from class com.sun.msv.reader.SimpleState
endDocument, endElement, endSelf, isGrammarElement, startElement
 
Methods inherited from class com.sun.msv.reader.State
_assert, callInterceptExpression, characters, endPrefixMapping, getBaseURI, getLocation, getParentState, getStartTag, ignorableWhitespace, init, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

expectedTargetNamespace

protected final String expectedTargetNamespace
expected targetNamespace for this module. null indicates that module must have targetNamespace attribute.

If RELAX module has 'targetNamespace' attribute, then its value must be equal to this value, or this value must be null.

If RELAX module doesn't have the attribute, then this value is used as the target namespace. If this value is null, then it is an error.


targetNamespace

protected String targetNamespace
computed targetNamespace. actual target namespace depends on expected target namespace and module. this field is set in startSelf method.

Constructor Detail

ModuleMergeState

protected ModuleMergeState(String expectedTargetNamespace)
Method Detail

startSelf

protected void startSelf()
Description copied from class: State
performs a task that should be done before reading any child elements. derived-class can safely read startTag and/or parentState values.

Overrides:
startSelf in class State


MSV