|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xwt.util.XML.Element
Used as a struct for holding information about a current element, and acts as a linked list entry.
Each element stores a hashtable of namespace definitions against their respective prefix, and a variable holding their default uri. If they did not specify a default uri, their parent's uri is copied in to keep up the sembelence of speedy parsing.
To implement the Namespace Specification exactly, we have to store prefix mappings for elements away from its parents and siblings. This means if a child of a child of-a child uses a prefix defined in the root, we have to search each Hashtable in each Element until we get to the root.
Unfortunetally, every other solution I can think of requires more work than this one, shifted to different parts of the parser.
Field Summary | |
java.lang.String |
defaultUri
Default URI for this element and its children with no prefix. |
XML.XMLException[] |
errors
An array of non-fatal errors related to this element. |
java.lang.String[] |
keys
An array of attribute names. |
int |
len
Current number of attributes in the keys and vals arrays. |
java.lang.String |
localName
LocalPart of current element. |
XML.Element |
next
|
java.lang.String |
prefix
Prefix of current element. |
XML.Element |
prev
|
java.lang.String |
qName
Qualified Name of current element. |
java.lang.String |
uri
URI of current tag. |
Hash |
urimap
A hashtable of all namespace prefixes that are defined by this element. |
java.lang.String[] |
vals
An array of attribute values. |
Constructor Summary | |
XML.Element()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public XML.Element next
public XML.Element prev
public Hash urimap
public java.lang.String[] keys
public java.lang.String[] vals
public XML.XMLException[] errors
public int len
public java.lang.String defaultUri
public java.lang.String uri
public java.lang.String localName
public java.lang.String qName
public java.lang.String prefix
Constructor Detail |
public XML.Element()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |