Debian Codegraph @

DOC/HTML/SGMLSpm/sgmlsattribute.html

raw symbols SCIP
1 <HTML>
2 <HEAD>
3 <TITLE>What do I do with an
4 SGMLS_Attribute?</TITLE>
5 </HEAD>
6 <BODY>
7
8 <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>
9
10 <H1>What do I do with an
11 <TT>SGMLS_Attribute</TT>?</H1>
12
13 <P>Note that objects of the <TT>SGMLS_Attribute</TT>
14 class do not have events in their own right, and are available only
15 through the <TT>attributes</TT> or
16 <TT>attribute(<IT>aname</IT>)</TT> methods for
17 <A HREF=sgmlselement.html><TT>SGMLS_Element</TT></A>
18 objects. An object belonging to the
19 <TT>SGMLS_Attribute</TT> class will recognise the
20 methods listed in table 4.</P>
21
22
23 <H3>Table 4: The <TT>SGMLS_Attribute</TT> class</H3>
24
25 <HR>
26 <DL>
27 <DT><B>Method</B></DT>
28 <DD><TT>name</TT></DD>
29 <DT><B>Return Type</B></DT>
30 <DD>string</DD>
31 <DT><B>Description</B></DT>
32 <DD>The name of the attribute (in upper-case).</DD>
33
34 </DL>
35 <HR>
36
37
38 <DL>
39 <DT><B>Method</B></DT>
40 <DD><TT>type</TT></DD>
41 <DT><B>Return Type</B></DT>
42 <DD>string</DD>
43 <DT><B>Description</B></DT>
44 <DD>The type of the attribute: <TT>'IMPLIED'</TT>,
45 <TT>'CDATA'</TT>, <TT>'NOTATION'</TT>,
46 <TT>'ENTITY'</TT>, or <TT>'TOKEN'</TT>.</DD>
47
48 </DL>
49 <HR>
50
51
52 <DL>
53 <DT><B>Method</B></DT>
54 <DD><TT>value</TT></DD>
55 <DT><B>Return Type</B></DT>
56 <DD>string, <TT>SGMLS_Entity</TT>, or
57 <TT>SGMLS_Notation</TT>.</DD>
58 <DT><B>Description</B></DT>
59 <DD>The value of the attribute. If the type is
60 <TT>'CDATA'</TT> or <TT>'TOKEN'</TT>, it will be a
61 simple string; if it is <TT>'NOTATION'</TT> it will be an
62 object belonging to the <TT>SGMLS_Notation</TT> class,
63 and if it is <TT>'Entity'</TT> it will be an object
64 belonging to the <TT>SGMLS_Entity</TT> class.</DD>
65
66 </DL>
67 <HR>
68
69
70 <DL>
71 <DT><B>Method</B></DT>
72 <DD><TT>is_implied</TT></DD>
73 <DT><B>Return Type</B></DT>
74 <DD>boolean</DD>
75 <DT><B>Description</B></DT>
76 <DD>Return true if the value of the attribute is implied, or false if
77 it has an explicit value.</DD>
78
79 </DL>
80 <HR>
81
82
83 <DL>
84 <DT><B>Method</B></DT>
85 <DD><TT>set_type(<IT>type</IT>)</TT></DD>
86 <DT><B>Return Type</B></DT>
87 <DD>[none]</DD>
88 <DT><B>Description</B></DT>
89 <DD>Provide a new type for the current attribute -- no sanity
90 checking will be performed, so be careful.</DD>
91
92 </DL>
93 <HR>
94
95
96 <DL>
97 <DT><B>Method</B></DT>
98 <DD><TT>set_value(<IT>value</IT>)</TT></DD>
99 <DT><B>Return Type</B></DT>
100 <DD>[none]</DD>
101 <DT><B>Description</B></DT>
102 <DD>Provide a new value for the current attribute -- no sanity
103 checking will be performed, so be careful.</DD>
104
105 </DL>
106 <HR>
107
108
109 <P>Note that the type <TT>'TOKEN'</TT> includes both
110 individual tokens and lists of tokens (ie <TT>'TOKENS'</TT>,
111 <TT>'IDS'</TT>, or <TT>'IDREFS'</TT> in the
112 original <A HREF="http://www.sil.org/sgml/sgml.html"><B>SGML</B></A> document), so you might need to use the perl function
113 'split' to break the value string into a list.</P>
114
115
116 <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>
117
118
119 <ADDRESS>David Megginson <A HREF="mailto:[email protected]">&lt;[email protected]&gt;</A></ADDRESS>
120 </BODY>
121 </HTML>