File: vc_page.xml

package info (click to toggle)
virtuoso-opensource 6.1.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 213,384 kB
  • ctags: 120,485
  • sloc: ansic: 631,183; sql: 420,245; xml: 272,257; java: 62,959; sh: 39,240; cpp: 37,890; cs: 24,942; php: 12,251; yacc: 8,812; lex: 7,135; makefile: 6,331; jsp: 3,739; asm: 3,281; ada: 1,681; awk: 1,639; pascal: 1,089; perl: 1,017; ruby: 1,000; python: 329
file content (228 lines) | stat: -rw-r--r-- 9,631 bytes parent folder | download | duplicates (2)
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
<refentry id="vc_page">
  <refmeta>
  <refentrytitle>page</refentrytitle>
  <refmiscinfo>vspx_control</refmiscinfo>
  </refmeta>
  <refnamediv>
  <refname>page</refname>
  <refpurpose>Container of VSPX code.</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
   <funcsynopsis id="vc_syn_page">
    <funcprototype id="vc_proto_page">
      <funcdef>
            &lt;<function>page</function> <attribute>
          <parameter>name</parameter> (required) </attribute>
        <attribute>
          <parameter>decor</parameter> (optional) </attribute>
        <attribute>
          <parameter>style</parameter> (optional) </attribute>
        <attribute>
          <parameter>on-error-redirect</parameter> (optional) </attribute>
        <attribute>
          <parameter>on-deadlock-retry</parameter> (optional) </attribute>
        <attribute>
          <parameter>doctype</parameter> (optional) </attribute>
        <attribute>
          <parameter>doctype-system</parameter> (optional) </attribute>
        <attribute>
          <parameter>page-subclass</parameter> (optional) </attribute>
        <attribute>
          <parameter>file-name</parameter> (optional) </attribute>
        <attribute>
          <parameter>no-script-function</parameter> (optional) </attribute>
        <attribute>
          <parameter>xsd-stub-xhtml</parameter> (optional) </attribute>
        <attribute>
          <parameter>width</parameter> (optional) </attribute>
        <attribute>
          <parameter>height</parameter> (optional) </attribute>
        <attribute>
          <parameter>debug-srcfile</parameter> (optional) </attribute>
        <attribute>
          <parameter>debug-srcline</parameter> (optional) </attribute>
        <attribute>
          <parameter>debug-log</parameter> (optional) </attribute>
 /&gt;</funcdef>
    </funcprototype>
   </funcsynopsis>
  </refsynopsisdiv>
  <refsect1 id="vc_desc_page">
  <title>Description</title>
  <para>The container for the rest of the vspx code.
The page or a subclass of it will be the outermost VSPX element  on any VSPX page.
Each .vspx file defines explicitly one custom page class derived from vspx_page.
This element can enclose all HTML elements or can be incorporated in it&#39;s children on place apropriate for
rendering the VSPX controls, but one VSPX page must contain only one vspx:page element. and noe VSPX-specific element may appear outside the vspx:page. It can be placed in other HTML stuff or around it, does not matter, but VSP &amp; VSPX code must be inside it (the same applies to customized HTML attributes, i.e. containing &lt;?V &amp; &lt;?U shortcuts).
Note that when using &#39;include&#39; or &#39;decoration&#39; features the top level page element will be : in case of include - &#39;this&#39; page, in case of &#39;decoration&#39; - the decoration page.
Also page variables, controls will be combined in all cases of inclusion or macro-expansion, so their names must not be duplicated; this means that names of variables introduced by macro expansion or inclusion must not conflict with cnames of variables or controls in the top level page or any included or macro content.
</para>
  </refsect1>
  <refsect1 id="vc_attrs_page">
  <title>Attributes</title>
  <formalpara>
   <title>name = <link linkend="vc_type_SqlName">SqlName</link>
   </title>
    <para>The name of subclass of vspx_page to be generated. The name of class will be prefixed with &#39;page_&#39; plus that name.
</para>
  </formalpara>
  <formalpara>
    <title>decor</title>
    <para>This attribute specifies a &#39;decoration&#39; page URL. The decoration page is a VSPX page that is wrapped around the including page.  The content of the including page is then put in the place indicated by a placeholder element in the decor page.  This is useful for defining enclosing tables, headers, footers and other repeating content.
</para>
  </formalpara>
  <formalpara>
    <title>style</title>
    <para>This designates an external XSL-T style sheet to be apply over the page, before page compilation.  This is useful as a &#39;macro&#39; feature.  The XSLT sheet may define rules for macroexpanding things in the page body.
	  </para>
  </formalpara>
  <formalpara>
    <title>on-error-redirect</title>
    <para>This specifies where to redirect the HTTP client in the event of an  an unhandled error.
This  will pass a __SQL_STATE, __SQL_MESSAGE and __PAGE as parameters to the error page.
</para>
  </formalpara>
  <formalpara>
    <title>on-deadlock-retry</title>
    <para>This specifies how many times to retry page execution upon deadlock.
When the number of retries is reached, the behaviour will be as for other SQL errors.
</para>
  </formalpara>
  <formalpara>
    <title>doctype</title>
    <para>This is to specify the resulting document type declaration (DTD) public URI.
</para>
  </formalpara>
  <formalpara>
    <title>doctype-system</title>
    <para>This is to specify the resulting document type declaration (DTD) system URI.
</para>
  </formalpara>
  <formalpara>
   <title>page-subclass = <link linkend="vc_type_SqlName">SqlName</link>
   </title>
    <para>The name of page subclass to be instantiated for processing.
		The subclass with this name MUST already be  defined.
		The subclass definition can be kept in a code-behind file (see code-file element).
</para>
  </formalpara>
  <formalpara>
    <title>file-name</title>
    <para>The name of page to be generated.
	    Used by wizards to designate where generated page will be stored.
	    This attribute do not affect VSPX processing.
</para>
  </formalpara>
  <formalpara>
    <title>no-script-function</title>
    <para>A function to enable or disable automatic NOSCRIPT element generation.</para>
  </formalpara>
  <formalpara>
    <title>xsd-stub-xhtml</title>
    <para>This attribute is for internal use only. It has no effect if added to the source VSPX file.</para>
  </formalpara>
  <formalpara>
    <title>width</title>
    <para>Visible width of the control when it is displayed in WYSIWYG tools when the source VSPX text is edited.
The value of this attribute will not be used when the resulting HTML is rendered.</para>
  </formalpara>
  <formalpara>
    <title>height</title>
    <para>Visible width of the control when it is displayed in WYSIWYG tools when the source VSPX text is edited.
The value of this attribute will not be used when the resulting HTML is rendered.</para>
  </formalpara>
  <formalpara>
    <title>debug-srcfile</title>
    <para>URI of the source document where the tag comes from.</para>
  </formalpara>
  <formalpara>
    <title>debug-srcline</title>
    <para>Line number in the source document where the tag comes from.</para>
  </formalpara>
  <formalpara>
    <title>debug-log</title>
    <para>This defines what sort of data are saved to the debugging log.
</para>
  </formalpara>
  </refsect1>
  <refsect1 id="vc_udt_page">
  <title>Declaration of type vspx_page</title>
  <para>
 VSPX Page Class , from it must be derived all VSPX pages, no subcalsses for others
</para>
  <screen>
create type vspx_page under vspx_control
as (
    vc_view_state any,
    vc_is_postback int default 0,
    vc_persisted_vars any,
    vc_event vspx_event,
    vc_is_valid int default 1,          -- set to 0 when first validator fails
    vc_authenticated int default 0,     -- is true if login control in the page suceeded
    vc_current_id int default 0,
    vc_browser_caps any default 0,
    vc_authentication_mode int default 1, -- authentication mode 0 - cookie, 1 - url, 2 - digest
    vc_debug_log_acc any default null	-- The accumulator in xte_nodebld_... style for keeping debugging info.
    )  temporary self as ref
  method vc_state_deserialize (stream any, n int) returns any,
  method vc_get_debug_log (title varchar) returns any
</screen>
  </refsect1>
  <refsect1 id="vc_ex_page">
  <title>Examples</title>
   <example id="vc_ex_page__0">
    <title>
  Sample VSPX page
</title>
    <para>
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!--
 -  
 -  $Id: page__0.vspx,v 1.2 2006/08/16 00:04:15 source Exp $
 -
 -  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
 -  project.
 -  
 -  Copyright (C) 1998-2006 OpenLink Software
 -  
 -  This project is free software; you can redistribute it and/or modify it
 -  under the terms of the GNU General Public License as published by the
 -  Free Software Foundation; only version 2 of the License, dated June 1991.
 -  
 -  This program is distributed in the hope that it will be useful, but
 -  WITHOUT ANY WARRANTY; without even the implied warranty of
 -  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 -  General Public License for more details.
 -  
 -  You should have received a copy of the GNU General Public License along
 -  with this program; if not, write to the Free Software Foundation, Inc.,
 -  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 -  
 -  



</para>
    <screen>
&lt;v:page name=&quot;page__0&quot; xmlns:v=&quot;http://www.openlinksw.com/vspx/&quot;&gt;
  &lt;html&gt;
    &lt;head&gt;&lt;title&gt;VSPX samples | v:page&lt;/title&gt;&lt;/head&gt;
    &lt;body&gt;
      &lt;p&gt;This VSPX page does nothing.&lt;br/&gt;
It does not even print traditional &#39;Hello world&#39; phrase.&lt;/p&gt;
    &lt;/body&gt;
  &lt;/html&gt;
&lt;/v:page&gt;
</screen>
   </example>
  </refsect1>
  <tip>
  <title>See Also: Reference Material in the Tutorial:</title>
   <para>
    <ulink url="/tutorial/web/vx_s_1/simple.vspx">VX-S-1</ulink>
   </para>
   <para>
    <ulink url="/tutorial/web/vx_s_8/formsty.vspx">VX-S-8</ulink>
   </para>
  </tip>
</refentry>