|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.ecs.GenericElement | +--org.apache.ecs.ElementAttributes | +--org.apache.ecs.ConcreteElement | +--org.apache.ecs.SinglePartElement | +--org.apache.ecs.Doctype
This class creates a <!DOCTYPE> tag.
Format:
<!DOCTYPE [name] [visibility] [identifier] [uri]>
usage:
Document d = new Document()
.setDoctype(new Doctype.Html40Strict())
or
XMLDocument d = new XMLDocument()
.addToProlog( new Doctype( "foo", "\"--/bar/baz/en\"", "\"http://qoz.net/foo.dtd\"" );
.addElement( new XML( ...
Doctype.Html40Strict
,
Doctype.Html40Transitional
,
Doctype.Html40Frameset
,
Doctype.XHtml10Strict
,
Doctype.XHtml10Transitional
,
Doctype.XHtml10Frameset
, Serialized FormInner Class Summary | |
static class |
Doctype.Html401Frameset
The HTML 4.01 Frameset DTD includes everything in the transitional DTD plus frames as well. |
static class |
Doctype.Html401Strict
The HTML 4.01 Strict DTD includes all elements and attributes that have not been deprecated or do not appear in frameset documents. |
static class |
Doctype.Html401Transitional
The HTML 4.01 Transitional DTD includes everything in the strict DTD plus deprecated elements and attributes (most of which concern visual presentation). |
static class |
Doctype.Html40Frameset
The HTML 4.0 Frameset DTD includes everything in the transitional DTD plus frames as well. |
static class |
Doctype.Html40Strict
The HTML 4.0 Strict DTD includes all elements and attributes that have not been deprecated or do not appear in frameset documents. |
static class |
Doctype.Html40Transitional
The HTML 4.0 Transitional DTD includes everything in the strict DTD plus deprecated elements and attributes (most of which concern visual presentation). |
static class |
Doctype.XHtml10Frameset
The XHTML 1.0 Frameset DTD This is the same as HTML 4.0 Frameset except for changes due to the differences between XML and SGML. |
static class |
Doctype.XHtml10Strict
The XHTML 1.0 Strict DTD This is the same as HTML 4.0 Strict except for changes due to the differences between XML and SGML. |
static class |
Doctype.XHtml10Transitional
The XHTML 1.0 Transitional DTD This is the same as HTML 4.0 Transitional except for changes due to the differences between XML and SGML. |
Field Summary | |
static java.lang.String |
elementName
|
protected java.lang.String |
identifier
|
protected java.lang.String |
name
|
static java.lang.String |
PUBLIC
|
protected java.lang.String |
uri
|
protected java.lang.String |
visibility
|
Fields inherited from class org.apache.ecs.ConcreteElement |
lineSeparator, registry, registryList |
Fields inherited from class org.apache.ecs.ElementAttributes |
attribute_equality_sign, attribute_filter, attribute_quote, attribute_quote_char, filter_attribute_state |
Fields inherited from class org.apache.ecs.GenericElement |
__text, _defaultFilter, begin_end_modifier, begin_end_modifier_defined, begin_start_modifier, begin_start_modifier_defined, case_type, codeset, element, element_type, end_element, end_end_modifier, end_end_modifier_defined, end_modifier_defined, end_start_modifier, end_start_modifier_defined, end_tag, filter, filter_state, position, pretty_print, start_modifier_defined, start_tag, tabLevel, VERSION |
Fields inherited from interface org.apache.ecs.Attributes |
NO_ATTRIBUTE_VALUE |
Fields inherited from interface org.apache.ecs.Element |
CENTER, LEFT, LOWERCASE, MIXEDCASE, RIGHT, UPPERCASE |
Constructor Summary | |
Doctype()
Basic Constructor. |
|
Doctype(java.lang.String name,
java.lang.String id,
java.lang.String uri)
Constructor. |
|
Doctype(java.lang.String name,
java.lang.String visibility,
java.lang.String id,
java.lang.String uri)
Constructor. |
Method Summary | |
(package private) void |
Private Initializer |
Doctype |
addElement(Element element)
Adds an Element to the element. |
Doctype |
addElement(java.lang.String element)
Adds an Element to the element. |
Doctype |
addElement(java.lang.String hashcode,
Element element)
Adds and Element to the element. |
Doctype |
addElement(java.lang.String hashcode,
java.lang.String element)
Adds an Element to the element. |
Doctype |
removeElement(java.lang.String hashcode)
Removes an Element from the element. |
Doctype |
setIdentifier(java.lang.String identifier)
Updates the name of the public identifier. |
Doctype |
setName(java.lang.String name)
Updates the name of the root element. |
Doctype |
setUri(java.lang.String uri)
Updates the URI of the dtd. |
Doctype |
setVisibility(java.lang.String visibility)
Updates the name of the root element. |
protected void |
updateElementType()
Should be called when any of the fields are changed. |
Methods inherited from class org.apache.ecs.ConcreteElement |
addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, addElementToRegistry, clone, elements, getElement, isEmpty, keys, output, output, output, output, registryHasElement, registryHasElement, removeElementFromRegistry, removeElementFromRegistry |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
public static final java.lang.String elementName
public static final java.lang.String PUBLIC
protected java.lang.String name
protected java.lang.String visibility
protected java.lang.String identifier
protected java.lang.String uri
Constructor Detail |
public Doctype()
public Doctype(java.lang.String name, java.lang.String id, java.lang.String uri)
name
- Root element of the XML document.id
- Public identifier.uri
- URI of the DTD.public Doctype(java.lang.String name, java.lang.String visibility, java.lang.String id, java.lang.String uri)
name
- Root element of the XML document.id
- Public identifier.uri
- URI of the DTD.Method Detail |
void()
SinglePartElement
in class SinglePartElement
protected void updateElementType()
public Doctype setName(java.lang.String name)
name
- Name of the root element.public Doctype setVisibility(java.lang.String visibility)
name
- Name of the root element.public Doctype setIdentifier(java.lang.String identifier)
identifier
- The public identifier.public Doctype setUri(java.lang.String uri)
uri
- URI of the dtd.public Doctype addElement(java.lang.String hashcode, Element element)
hashcode
- name of the element for hash table.element
- Adds an Element to the element.public Doctype addElement(java.lang.String hashcode, java.lang.String element)
hashcode
- name of the element for the hash table.element
- Adds an Element to the element.public Doctype addElement(Element element)
element
- Adds an Element to the element.public Doctype addElement(java.lang.String element)
element
- Adds an Element to the element.public Doctype removeElement(java.lang.String hashcode)
hashcode
- the name of the element to be removed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |