The element structure
=====================
- Data type: element
The basic data type representing the element structure is the
Element (this happens to be a node in the parse tree).
Mapping buffer positions to elements
------------------------------------
- Function: sgml-find-context-of POS
Return the element current at buffer position POS. If POS is in
markup, `sgml-markup-type' will be a symbol identifying the markup
type. It will be `nil' if POS is outside markup.
- Function: sgml-find-element-of POS
Return the element containing the character at buffer position POS.
Functions operating on elements
-------------------------------
- Function: sgml-element-name ELEMENT
Returns the name of the element. (obsolete)
- Function: sgml-element-gi ELEMENT
Return the general identifier (string) of ELEMENT.
- Function: sgml-element-level ELEMENT
Returns the level of ELEMENT in the element structure. The
document element is level 1.
Structure
.........
- Function: sgml-top-element
Return the document element.
- Function: sgml-off-top-p ELEMENT
True if ELEMENT is the pseudo element above the document element.
These functions return other related elements, or possibly `nil'.
- Function: sgml-element-content ELEMENT
First element in content of ELEMENT, or nil.
- Function: sgml-element-next ELEMENT
Next sibling of ELEMENT. To loop thru all sub elements of an
element, `el', You could do like this:
(let ((c (sgml-element-content el)))
(while c
<<Do something with c>>
(setq c (sgml-element-next c))))
- Function: sgml-element-parent ELEMENT
Parent of ELEMENT.
Tags
....
- Function: sgml-element-stag-optional ELEMENT
Return true if the start-tag of ELEMENT is omissible.
- Function: sgml-element-etag-optional ELEMENT
Return true if the end-tag of ELEMENT is omissible.
- Function: sgml-element-stag-len ELEMENT
Return the length of the start-tag of ELEMENT. If the start-tag
has been omitted the length is 0.
- Function: sgml-element-etag-len ELEMENT
Return the length of the end-tag of ELEMENT. If the end-tag has
been omitted the length is 0.
- Function: sgml-element-net-enabled ELEMENT
Return true, if ELEMENT or some parent of the element has null end
tag (NET) enabled. Return `t', if it is ELEMENT that has NET
enabled.
Positions
.........
These functions relates an element to positions in the buffer.
- Function: sgml-element-start ELEMENT
Position of start of ELEMENT.
- Function: sgml-element-end ELEMENT
Position after ELEMENT.
- Function: sgml-element-stag-end ELEMENT
Position after start-tag of ELEMENT.
- Function: sgml-element-etag-start ELEMENT
Position before end-tag of ELEMENT.
Attributes
..........
- Function: sgml-element-attlist ELEMENT
Return the attribute declaration list for ELEMENT.
- Function: sgml-element-attribute-specification-list ELEMENT
Return the attribute specification list for ELEMENT.
- Function: sgml-element-attval ELEMENT ATTRIBUTE
Return the value of the ATTRIBUTE in ELEMENT, string or nil.
Misc technical
..............
- Function: sgml-element-data-p ELEMENT
True if ELEMENT can contain data characters.
- Function: sgml-element-mixed ELEMENT
True if ELEMENT has mixed content.
- Function: sgml-element-eltype ELEMENT
- Function: sgml-element-empty ELEMENT
True if ELEMENT is empty.
- Function: sgml-element-excludes ELEMENT
- Function: sgml-element-includes ELEMENT
- Function: sgml-element-model ELEMENT
Declared content or content model of ELEMENT.
- Function: sgml-element-context-string ELEMENT
Return string describing context of ELEMENT.