com.simonstl.moe.explicit
Class EndNamespace
java.lang.Object
|
+--com.simonstl.moe.CoreComponent
|
+--com.simonstl.moe.explicit.Attribute
|
+--com.simonstl.moe.Namespace
|
+--com.simonstl.moe.explicit.EndNamespace
- All Implemented Interfaces:
- AnnotableI, java.lang.Cloneable, CoreComponentI, NamingI
- public class EndNamespace
- extends Namespace
The Namespace class provides a foundation for MOE objects to store namespaces.
There are some real complications in dealing with namespaces in an event context,
made only more difficult by the potential creation of partial trees.
The SAX event startPrefixMapping() takes place before the startElement() call,
and similarly endPrefixMapping() is reported after endElement().
SAX also provides options for reporting/not reporting the attributes which
define namespaces. In MOE, when events are assembled, the namespaces will be
associated with the elements containing the definitions.
I've defined the Namespace class to be something of a broken attribute, much like
Namespace declarations in XML 1.0. The prefix of the attribute is fixed to xmlns,
the localName defines the prefix defined by the namespace. The toString() method
handles the xmlns/xmlns:prefix issues.
The namespace URI is stored as textual content, just as with attributes. This
potentially supports some rather perverse things like the use of general entities
in the attribute values used to define namespaces.
nsURI is fixed to http://www.w3.org/TR/REC-xml-names/
.
version 0.01 is the initial release and contains plenty of bogus placeholder functionality.
- Version:
- 0.01 25 August 2001
- Author:
- Simon St.Laurent
Fields inherited from interface com.simonstl.moe.CoreComponentI |
ATTRIBUTE, CDATA, CHARS, COMMENT, CONTAINER, DOCTYPE, DOCUMENT, ELEMENT, END_ATTRIBUTE, END_CDATA, END_COMMENT, END_CONTAINER, END_DOCTYPE, END_DOCUMENT, END_ELEMENT, END_NAMESPACE, END_PI, END_PROPERTY, GEN_ENTITY_END, GEN_ENTITY_REF, GEN_ENTITY_START, IG_WHITESPACE, NAMESPACE_DECL, PI, PROPERTY, UNPARSED, VALUE, XML_DECL |
Method Summary |
java.lang.Object |
clone()
Non-clone implementation needs replacement. |
int |
getBasicType()
EndNamespace has the basic type END_NAMESPACE. |
boolean |
listen(CoreComponentI component)
End classes don't listen. |
Methods inherited from class com.simonstl.moe.Namespace |
getCurrent, getLevel, getLocalName, getName, getNsURI, getPrefix, getQName, main, setCurrent, setLevel, setLocalName, setName, setNsURI, setPrefix, setQName, toString, toString |
Methods inherited from class com.simonstl.moe.CoreComponent |
add, addAll, addContent, addUnorderedContent, annotate, clearAll, clearContent, clearName, clearUnorderedContent, getAllAnnotations, getAnnotations, getContent, getIsComplete, getParent, getTextContent, getTypes, getUnorderedContent, hasAnnotation, hasAnnotationOfType, hasAnnotations, hashCode, print, removeAllAnnotations, removeAnnotation, setContent, setContent, setIsComplete, setParent, setUnorderedContent, textComponent |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
EndNamespace
public EndNamespace()
getBasicType
public int getBasicType()
- EndNamespace has the basic type END_NAMESPACE.
- Overrides:
getBasicType
in class Namespace
clone
public java.lang.Object clone()
- Description copied from class:
CoreComponent
- Non-clone implementation needs replacement. Will be made abstract when subclasses have implementation.
- Overrides:
clone
in class Namespace
listen
public boolean listen(CoreComponentI component)
- End classes don't listen.
- Overrides:
listen
in class Namespace