/usr/share/doc/sgmls-doc/SGMLSpm/sgmlselement.html is in sgmls-doc 1.03ii-34.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | <HTML>
<HEAD>
<TITLE>What do I do with an SGMLS_Element?</TITLE>
</HEAD>
<BODY>
<P><B>Links</B>: <A HREF=sgmlsattribute.html>Next</A> <A HREF=events.html>Previous</A> <A HREF=sgmlspm.html>Up</A> <A HREF=sgmlspm.html>Top</A></P>
<H1>What do I do with an <TT>SGMLS_Element</TT>?</H1>
<P>Altogether, there are six classes in <A HREF=sgmlspm.html><TT>SGMLS.pm</TT></A>, each with its
own methods: in addition to <A HREF=sgmls.html><TT>SGMLS</TT></A> (for the parse) and
<A HREF=sgmlsevent.html><TT>SGMLS_Event</TT></A>
(for a specific event), the classes are
<TT>SGMLS_Element</TT>, <A HREF=sgmlsattribute.html><TT>SGMLS_Attribute</TT></A>,
<A HREF=sgmlsentity.html><TT>SGMLS_Entity</TT></A>,
and <A HREF=sgmlsnotation.html><TT>SGMLS_Notation</TT></A>.
Like all of these, <TT>SGMLS_Element</TT> has a number
of methods available for obtaining different types of information.
For example, if you were to use</P>
<P>
<PRE>my $element = $event->data</PRE>
</P>
<P>to retrieve the data for a <TT>'start_element'</TT> or
<TT>'end_element'</TT> event, then you could use the methods
listed in table 3 to find more
information about the element.</P>
<H3>Table 3: The <TT>SGMLS_Element</TT> class</H3>
<HR>
<DL>
<DT><B>Method</B></DT>
<DD><TT>name</TT></DD>
<DT><B>Return Type</B></DT>
<DD>string</DD>
<DT><B>Description</B></DT>
<DD>The name (or GI), in upper-case.</DD>
</DL>
<HR>
<DL>
<DT><B>Method</B></DT>
<DD><TT>parent</TT></DD>
<DT><B>Return Type</B></DT>
<DD><TT>SGMLS_Element</TT></DD>
<DT><B>Description</B></DT>
<DD>The parent element, or <TT>''</TT> if this is the top
element.</DD>
</DL>
<HR>
<DL>
<DT><B>Method</B></DT>
<DD><TT>attributes</TT></DD>
<DT><B>Return Type</B></DT>
<DD>HASH</DD>
<DT><B>Description</B></DT>
<DD>Return a reference to a hash table of
<TT>SGMLS_Attribute</TT> objects, keyed by the attribute
names (in upper-case).</DD>
</DL>
<HR>
<DL>
<DT><B>Method</B></DT>
<DD><TT>attribute_names</TT></DD>
<DT><B>Return Type</B></DT>
<DD>ARRAY</DD>
<DT><B>Description</B></DT>
<DD>A list of all attribute names for the current element (in
upper-case).</DD>
</DL>
<HR>
<DL>
<DT><B>Method</B></DT>
<DD><TT>attribute(<IT>aname</IT>)</TT></DD>
<DT><B>Return Type</B></DT>
<DD><TT>SGMLS_Attribute</TT></DD>
<DT><B>Description</B></DT>
<DD>Return the attribute named ANAME.</DD>
</DL>
<HR>
<DL>
<DT><B>Method</B></DT>
<DD><TT>set_attribute(<IT>attribute</IT>)</TT></DD>
<DT><B>Return Type</B></DT>
<DD>[none]</DD>
<DT><B>Description</B></DT>
<DD>The <IT>attribute</IT> argument should be an
object belonging to the <A HREF="sgmlsattribute.html"><TT>SGMLS_Attribute</TT></A>
class. Add it to the element, replacing any previous attribute with
the same name.</DD>
</DL>
<HR>
<DL>
<DT><B>Method</B></DT>
<DD><TT>in(<IT>name</IT>)</TT></DD>
<DT><B>Return Type</B></DT>
<DD><TT>SGMLS_Element</TT></DD>
<DT><B>Description</B></DT>
<DD>If the current element's parent is named
<IT>name</IT>, return the parent; otherwise, return
<TT>''</TT>.</DD>
</DL>
<HR>
<DL>
<DT><B>Method</B></DT>
<DD><TT>within(<IT>name</IT>)</TT></DD>
<DT><B>Return Type</B></DT>
<DD><TT>SGMLS_Element</TT></DD>
<DT><B>Description</B></DT>
<DD>If any ancestor of the current element is named
<IT>name</IT>, return it; otherwise, return
<TT>''</TT>.</DD>
</DL>
<HR>
<P><B>Links</B>: <A HREF=sgmlsattribute.html>Next</A> <A HREF=events.html>Previous</A> <A HREF=sgmlspm.html>Up</A> <A HREF=sgmlspm.html>Top</A></P>
<ADDRESS>David Megginson <A HREF="mailto:dmeggins@aix1.uottawa.ca"><dmeggins@aix1.uottawa.ca></A></ADDRESS>
</BODY>
</HTML>
|