root / framework / tags / fusebox550 / circuit.dtd

Revision 531, 14.5 kB (checked in by scorfield, 1 year ago)

Fixes #251 by updating the copyright date in every file.

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3Copyright 2006-2007 TeraTech, Inc. http://teratech.com/
4
5Licensed under the Apache License, Version 2.0 (the "License");
6you may not use this file except in compliance with the License.
7You may obtain a copy of the License at
8
9http://www.apache.org/licenses/LICENSE-2.0
10
11Unless required by applicable law or agreed to in writing, software
12distributed under the License is distributed on an "AS IS" BASIS,
13WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14See the License for the specific language governing permissions and
15limitations under the License.
16-->
17
18<!--
19Used within the circuit.xml page to contain the elements that define a circuit.
20The <circuit></circuit> element can contain zero or more fuseactions as well as
21the <prefuseaction></prefuseaction and <postfuseaction></postfuseaction> elements.
22-->
23<!ELEMENT circuit (fuseaction*,
24                                        ((prefuseaction?, fuseaction*, postfuseaction?) |
25                                                (postfuseaction?, fuseaction*, prefuseaction?)),
26                                        fuseaction*)>
27<!ATTLIST circuit
28        access (internal | public | private) "internal"
29        permissions CDATA #IMPLIED
30>
31
32<!--
33Provides a mechanism to execute a fuseaction at the beginning of every call to any
34fuseaction in the circuit. Typically used to perform any processing that is required
35to happen before each fuseaction in the circuit is triggered.
36
37Note: Items within a <prefuseaction></prefuseaction> container will execute with
38each call to a fuseaction within its circuit.
39
40callsuper If this is set to true then the <prefuseaction /> in the parent circuit
41(if any) will be triggered. The parent for a circuit is defined in the <circuit />
42definition in the fusebox.xml file.
43-->
44<!ELEMENT prefuseaction (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*>
45<!ATTLIST prefuseaction
46        callsuper (true | false | yes | no) "false"
47>
48<!--
49Provides a mechanism to execute a fuseaction at the end of every call to any
50fuseaction in the circuit. Typically used to perform any processing that is
51required to happen after each fuseaction in the circuit is triggered.
52
53Note: Items within a <postfuseaction></postfuseaction> container will execute
54at the end of each call to a fuseaction within its circuit.
55
56callsuper If this is set to true then the <postfuseaction /> in the parent
57circuit (if any) will be triggered. The parent for a circuit is defined in
58the <circuit /> definition in the fusebox.xml file.
59-->
60<!ELEMENT postfuseaction (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*>
61<!ATTLIST postfuseaction
62        callsuper (true | false | yes | no) "false"
63>
64
65<!--
66Every fuseaction is defined within a circuit.xml file within the
67<circuits></circuits> container. A fuseaction defines at an architectural
68level all of the functionality needed to execute. As an example, a fuseaction
69of book.read might encompass ideas such as retrieve the book, find a chair,
70open the book, etc. While the actual implementation of each of these items is
71not explicitly defined in this fuseaction, these are the major functionalities
72that are required to happen when executing these fuseactions.
73
74name Required. The name of the fuseaction.
75access Optional. Defines the default access method for this specific fuseaction.
76        Can take one of three values:
77
78        internal - fuseaction can only be accessed by other fuseactions;
79        private - fuseaction can only be accessed by other fuseactions in the
80                        same circuit;
81        public - fuseaction can be accessed by any other fuseaction or directly
82                        by URL or other non-fusebox invocation method
83 
84
85Note: This value overrides the access attribute in the circuit definition.
86If it is not defined, the fuseaction inherits the access attribute defined
87for its circuit.
88 
89permissions Optional. Defines the default access method for each fuseaction
90        in the circuit. Can take a single text value or a comma-delimited list
91        of permissions.
92
93 
94
95Note: Permissions can be used to implement security via a plugin.
96 
97
98-->
99<!ELEMENT fuseaction (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*>
100<!ATTLIST fuseaction
101        name CDATA #REQUIRED
102        permissions CDATA #IMPLIED
103        access (internal | public | private) #IMPLIED
104>
105<!--
106Creates a variable, "name" having a "value.
107
108ATTRIBUTES
109 name Required if overwrite is present. Name of the variable.
110value Required. The actual value that the variable should be set to.
111evaluate Optional. defaults to false. If set to true, allows for dynamic
112        evaluation of a variable. See second example.
113overwrite Optional, defaults to true. If set to false, evaluate will test
114        if this variable exists and if it does not exist, creates the variable
115        with the value provided.
116-->
117<!ELEMENT set EMPTY>
118<!ATTLIST set
119        name CDATA #IMPLIED
120        value CDATA #REQUIRED
121        evaluate (true | false | yes | no) "false"
122        overwrite (true | false | yes | no) "true"
123>
124<!--
125Duplicates the functionality of the <set /> element, but automatically
126puts the variable in the "xfa." scope for explicitly setting eXit FuseActions.
127
128Note: This should only (and always) be used to specify Fusebox XFAs.
129Do not specify the xfa scope when using this tag, the variable will
130automatically be created with it.
131
132
133ATTRIBUTES
134 name Required. Name of the variable. It will automatically be put in the
135        Fusebox XFA structure (e.g. XFA.someExitFuseaction). XFA Scopes
136        are defined in the local scope.
137value Required. The actual fuseaction that the xfa should be set to.
138        (includes both circuit and fuseaction name.)
139
140Note: If the fuseaction being called in the xfa is in the same circuit,
141the circuit name can be omitted and just the fuseaction specified.
142 
143evaluate Optional. defaults to false. If set to true, allows for dynamic
144        evaluation of a variable. See second example.
145overwrite Optional, defaults to true. If set to false, evaluate will test
146        for a variable xfa.#name# and if it does not exist, creates
147        the xfa with the value provided.
148-->
149<!ELEMENT xfa (parameter*)>
150<!ATTLIST xfa
151        name CDATA #REQUIRED
152        value CDATA #REQUIRED
153        evaluate (true | false | yes | no) "false"
154        overwrite (true | false | yes | no) "true"
155>
156<!--
157Executes a fuseaction and optionally assigns the output of the fuseaction
158to a variable specified in the contentvariable attribute.
159
160Note: Using <do /> commands can help with the replacement of recursive
161fusebox calls. <do /> commands operate in the same memory space as the
162currently executing fuseaction. <do /> commands can contain fuseactions
163that also execute <do /> commands as well.
164
165
166ATTRIBUTES
167 action Required. Defines the fuseaction to add to the Fuseaction queue.
168        Can be either a fully-qualified fuseaction (e.g. someCircuit.someFuseaction)
169        or another fuseaction in the same circuit (e.g. someOther).
170 contentvariable Optional. If a contentvariable name is specified, all the
171        output of the fuseaction in the action attribute will be saved to this
172        variable name.
173 append Optional, defaults to false. Determines whether output from the
174        fuseaction will be appended to (true) or overwrite (false) the
175        contentvariable specified in the contentvariable attribute. 
176-->
177<!ELEMENT do (parameter*)>
178<!ATTLIST do
179        action CDATA #REQUIRED
180        contentvariable CDATA #IMPLIED
181        append (true | false | yes | no) "false"
182        overwrite (true | false | yes | no) "true"
183>
184<!ELEMENT parameter EMPTY>
185<!ATTLIST parameter
186        name CDATA #REQUIRED
187        value CDATA #IMPLIED
188>
189<!--
190Includes a template as part of the current fuseaction.
191
192Notes: If a filename with no extension is specified (e.g. dsp_myPage),
193the fusebox scriptFileDelimiter will be automatically appended to the name.
194
195A circuits fuses should all exist in that circuit's directory. Although
196a circuit's fuseactions can exist in other directories, this is a poor
197programming practice since now the applications execution is now coupled
198directly to the underlying directory structure.
199
200
201ATTRIBUTES
202 template Required. The name of a file located in the circuit directory.
203 required Optional, defaults to true. If this attribute is set to true,
204        then an exception is thrown if the file does not exist. If the
205        value is set to false, the missing file will silently be ignored.
206 circuit Optional, defaults to current circuit. If this attribute is present,
207        Fusebox will look in the specified circuit's directory for the
208        included file.
209 overwrite Optional, defaults to true. If contentvariable is specified
210        and this attribute is "false", the template is only included if
211        the specified contentvariable is not already defined.
212 append Optional, defaults to false. If this attributes is set to true,
213        and contentvariable is specified, the output of the included
214        template will be appended to the current value of the contentvariable.
215 prepend Optional, defaults to false. If this attributes is set to true,
216        and contentvariable is specified, the output of the included
217        template will be prepended to the current value of the contentvariable.
218 contentvariable Optional. If present, specifies the name of a variable
219        into which the output of the included template will be stored.
220        Affected by the values of the append/prepend attributes if present.
221-->
222<!ELEMENT include (parameter*)>
223<!ATTLIST include
224        template CDATA #REQUIRED
225        required (true | false | yes | no) "true"
226        circuit CDATA #IMPLIED
227        overwrite (true | false | yes | no) "true"
228        append (true | false | yes | no) "false"
229        prepend (true | false | yes | no) "false"
230        contentvariable CDATA #IMPLIED
231>
232<!--
233Used to instantiate an object defined in the <classes> tag
234
235ATTRIBUTES
236 arguments Optional, defaults to empty. This attribute may be
237        used to specify the arguments that should be passed to
238        the object's constructor, if one was specified. Alternately,
239        arguments may be specified using nested <argument> tags.
240 class Optional. Specifies the class name (declared in the
241        <classes> declaration of fusebox.xml).
242 webservice Optional. Specifies a URL for the WSDL file (Web
243        Service Description Language) that defines the web service
244        to be used.
245 object Required. The variable into which the instantiated class
246        or web service should be stored.
247 overwrite Optional, defaults to true. If this attribute is
248        "false", the instantiation only happens if the specified
249        object variable is not already defined.
250
251Note: one of "class" or "webservice" must be specified.
252-->
253<!ELEMENT instantiate (argument*)>
254<!ATTLIST instantiate
255        arguments CDATA #IMPLIED
256        class CDATA #IMPLIED
257        webservice CDATA #IMPLIED
258        object CDATA #IMPLIED
259        overwrite (true | false | yes | no) "true"
260>
261<!ELEMENT argument EMPTY>
262<!ATTLIST argument
263        name CDATA #IMPLIED
264        value CDATA #REQUIRED
265>
266        <!--
267Used to invoke an object defined in the <classes> tag
268
269ATTRIBUTES
270 object Optional. Specifies the object to be used for the method
271        invocation.
272 class Optional. Specifies a class to instantiate, to create the
273        object to be used for the method invocation.
274 webservice Optional. Specifies a URL for the WSDL file (Web
275        Service Description Language) that defines a web service
276        to be used, to create the object to be used for the method
277        invocation.
278 method Optional. Specifies the method name to be used. Arguments
279        are specified using nested <argument> verbs.
280 methodcall Optional. Specifies the method name and arguments to
281        be used for the method invocation, e.g., "setData('theData')".
282 overwrite Optional, defaults to true. Only meaningful if
283        returnvariable is also specified. If this attribute is "false",
284        the invocation only happens if the specified returnvariable
285        is not already defined.
286 returnvariable Optional. Specifies the variable into which the
287        value returned by the method invocation is stored.
288
289Note: one of "object" or "class" or "webservice" must be specified.
290Note: one of "method" or "methodcall" must be specified.
291-->
292<!ELEMENT invoke (argument*)>
293<!ATTLIST invoke
294        object CDATA #IMPLIED
295        class CDATA #IMPLIED
296        webservice CDATA #IMPLIED
297        method CDATA #IMPLIED
298        methodcall CDATA #IMPLIED
299        overwrite (true | false | yes | no) "true"
300        returnvariable CDATA #IMPLIED
301>
302<!--
303Indicates a page redirect to another URL. Similar to <CFLOCATION> in CFML.
304Can be used for both client-side and server-side redirections and the
305CFID/CFTOKEN information can be appended to the URL automatically.
306
307ATTRIBUTES
308 url Required. Any URL. Web page target for redirection.
309addtoken Optional. true|false.
310
311Defaults to false.
312
313If true, the CFID/CFTOKEN values are appended to the URL parameter.
314 
315type Optional. client|server. Indicates whether the page redirection
316        should be server-side or client-side.
317
318server - CFMX only: uses page-forward for true server side only relocation.
319client - Available on CF5 and CFMX - uses the <cflocation> tag for
320        relocation that hits the client browser before redirection takes place.
321
322Note: Client Side Relocation DOES NOT use JavaScript
323-->
324<!ELEMENT relocate EMPTY>
325<!ATTLIST relocate
326        url CDATA #IMPLIED
327        xfa CDATA #IMPLIED
328        type (client | server | javascript | moved) "client"
329        addtoken (true | false | yes | no) "false"
330>
331<!--
332Used to iterate through a series of fuses in the fuseaction based on the
333same five basic loop types as ColdFusion:
334        condition - loop until the condition becomes false
335        query - loop over the records in the query
336        from/to/index/step - loop over the specified range of values
337        collection/item - loop over the keys in the specified structure
338        list/index - loop over the elements of the list
339
340Note: For the condition form of loop, you must provide a way for the
341condition to reach a value of  "false" or the loop will be endless.
342
343
344ATTRIBUTES
345 see loop types above.
346-->
347<!ELEMENT loop (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*>
348<!ATTLIST loop
349        condition CDATA #IMPLIED
350        from CDATA #IMPLIED
351        to CDATA #IMPLIED
352        index CDATA #IMPLIED
353        step CDATA #IMPLIED
354        item CDATA #IMPLIED
355        collection CDATA #IMPLIED
356        query CDATA #IMPLIED
357        list CDATA #IMPLIED
358>
359<!--
360Used to implement simple decisions inside of a fuseaction. Can include the
361capability to execute actions based only on whether the condition is true or
362false. There can only be one iteration of <true></true> and one iteration of
363<false></false> within every <if></if> block.
364
365ATTRIBUTES
366 condition Required. Any logical expression that can evaluate to either true or false.
367-->
368<!ELEMENT if ((true, false?) | (false, true?))>
369<!ATTLIST if
370        condition CDATA #REQUIRED
371>
372<!-- The <true/> tag is an optional subelement of the <if/> element. It contains
373        the logic to execute if the condition in the <if/> tag evaluates to "true". -->
374<!ELEMENT true (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*>
375<!-- The <false/> tag is an optional subelement of the <if/> element. It contains
376        the logic to execute if the condition in the <if/> tag evaluates to "false". -->
377<!ELEMENT false (set | xfa | do | include | relocate | loop | if | instantiate | invoke)*>
Note: See TracBrowser for help on using the browser.