File: sgmlsattribute.html

package info (click to toggle)
libsgmls-perl 1.03ii-38
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 900 kB
  • sloc: perl: 1,387; lisp: 262; makefile: 130
file content (121 lines) | stat: -rw-r--r-- 3,090 bytes parent folder | download | duplicates (9)
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
<HTML>
<HEAD>
<TITLE>What do I do with an
SGMLS_Attribute?</TITLE>
</HEAD>
<BODY>

<P><B>Links</B>: <A HREF=sgmlsentity.html>Next</A> <A HREF=sgmlselement.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_Attribute</TT>?</H1>

<P>Note that objects of the <TT>SGMLS_Attribute</TT>
class do not have events in their own right, and are available only
through the <TT>attributes</TT> or
<TT>attribute(<IT>aname</IT>)</TT> methods for
<A HREF=sgmlselement.html><TT>SGMLS_Element</TT></A>
objects.  An object belonging to the
<TT>SGMLS_Attribute</TT> class will recognise the
methods listed in table 4.</P>


<H3>Table 4: The <TT>SGMLS_Attribute</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 of the attribute (in upper-case).</DD>

</DL>
<HR>


<DL>
<DT><B>Method</B></DT>
<DD><TT>type</TT></DD>
<DT><B>Return Type</B></DT>
<DD>string</DD>
<DT><B>Description</B></DT>
<DD>The type of the attribute: <TT>'IMPLIED'</TT>,
<TT>'CDATA'</TT>, <TT>'NOTATION'</TT>,
<TT>'ENTITY'</TT>, or <TT>'TOKEN'</TT>.</DD>

</DL>
<HR>


<DL>
<DT><B>Method</B></DT>
<DD><TT>value</TT></DD>
<DT><B>Return Type</B></DT>
<DD>string, <TT>SGMLS_Entity</TT>, or
<TT>SGMLS_Notation</TT>.</DD>
<DT><B>Description</B></DT>
<DD>The value of the attribute.  If the type is
<TT>'CDATA'</TT> or <TT>'TOKEN'</TT>, it will be a
simple string; if it is <TT>'NOTATION'</TT> it will be an
object belonging to the <TT>SGMLS_Notation</TT> class,
and if it is <TT>'Entity'</TT> it will be an object
belonging to the <TT>SGMLS_Entity</TT> class.</DD>

</DL>
<HR>


<DL>
<DT><B>Method</B></DT>
<DD><TT>is_implied</TT></DD>
<DT><B>Return Type</B></DT>
<DD>boolean</DD>
<DT><B>Description</B></DT>
<DD>Return true if the value of the attribute is implied, or false if
it has an explicit value.</DD>

</DL>
<HR>


<DL>
<DT><B>Method</B></DT>
<DD><TT>set_type(<IT>type</IT>)</TT></DD>
<DT><B>Return Type</B></DT>
<DD>[none]</DD>
<DT><B>Description</B></DT>
<DD>Provide a new type for the current attribute -- no sanity
checking will be performed, so be careful.</DD>

</DL>
<HR>


<DL>
<DT><B>Method</B></DT>
<DD><TT>set_value(<IT>value</IT>)</TT></DD>
<DT><B>Return Type</B></DT>
<DD>[none]</DD>
<DT><B>Description</B></DT>
<DD>Provide a new value for the current attribute -- no sanity
checking will be performed, so be careful.</DD>

</DL>
<HR>


<P>Note that the type <TT>'TOKEN'</TT> includes both
individual tokens and lists of tokens (ie <TT>'TOKENS'</TT>,
<TT>'IDS'</TT>, or <TT>'IDREFS'</TT> in the
original <A HREF="http://www.sil.org/sgml/sgml.html"><B>SGML</B></A> document), so you might need to use the perl function
'split' to break the value string into a list.</P>


<P><B>Links</B>: <A HREF=sgmlsentity.html>Next</A> <A HREF=sgmlselement.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">&lt;dmeggins@aix1.uottawa.ca&gt;</A></ADDRESS>
</BODY>
</HTML>