root / framework / tags / fusebox51B1 / circuit.dtd

Revision 268, 13.9 kB (checked in by scorfield, 2 years ago)

Addresses #157 by updating the DTD to match what the verbs now allow.

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