1/*description:
2{
3	Walks through the AST of a DTD file parsed previously, and generates a \CodeWorker\ script
4	for parsing and validating any XML file that conforms to the DTD.
5
6	If you encounter some bugs, please send a mail to \email{\WebSite\ }.
7}
8*/
9
10function normalizeClauseName(sClauseName) {
11	return replaceString("-", "_", sClauseName);
12}
13
14/**
15This is the XML DTD for the EJB 2.0 deployment descriptor.
16All EJB 2.0 deployment descriptors must include a DOCTYPE
17of the following form:
18
19  <!DOCTYPE ejb-jar PUBLIC
20	"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
21	"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
22
23The following conventions apply to all J2EE deployment descriptor
24elements unless indicated otherwise.
25
26- In elements that contain PCDATA, leading and trailing whitespace
27  in the data may be ignored.
28
29- In elements whose value is an "enumerated type", the value is
30  case sensitive.
31
32- In elements that specify a pathname to a file within the same
33  JAR file, relative filenames (i.e., those not starting with "/")
34  are considered relative to the root of the JAR file's namespace.
35  Absolute filenames (i.e., those starting with "/") also specify
36  names in the root of the JAR file's namespace.  In general, relative
37  names are preferred.  The exception is .war files where absolute
38  names are preferred for consistency with the servlet API.
39**/
40
41XML_DOCUMENT	::=
42		#ignore(XML)
43		[
44			"<?xml" #continue
45			"version" '=' STRING_LITERAL
46			["encoding" #continue '=' STRING_LITERAL]?
47			"?>"
48		]?
49		[
50			"<!DOCTYPE" #continue
51			IDENTIFIER EXTERNAL_DOCTYPE
52			[STRING_LITERAL]*
53			[
54				'['
55				["<!" ->'>']+
56				']'
57			]?
58			'>'
59		]?
60		#continue ejb_jar(this) #empty;
61
62/**
63The ejb-jar element is the root element of the EJB deployment
64descriptor. It contains
65
66	- an optional description of the ejb-jar file
67	- an optional display name
68	- an optional small icon file name
69	- an optional large icon file name
70	- mandatory structural information about all included
71	  enterprise beans
72	- a descriptor for container managed relationships, if any
73	- an optional application-assembly descriptor
74	- an optional name of an ejb-client-jar file for the ejb-jar.
75**/
76ejb_jar(myCurrentNode : node)	::=
77		'<' IDENTIFIER:"ejb-jar"
78		#continue
79		[
80				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
81		]?
82		'>'
83		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
84		[#pushItem(myCurrentNode.display_name) display_name(myCurrentNode.display_name#back)]?
85		[#pushItem(myCurrentNode.small_icon) small_icon(myCurrentNode.small_icon#back)]?
86		[#pushItem(myCurrentNode.large_icon) large_icon(myCurrentNode.large_icon#back)]?
87		enterprise_beans(myCurrentNode.enterprise_beans)
88		[#pushItem(myCurrentNode.relationships) relationships(myCurrentNode.relationships#back)]?
89		[#pushItem(myCurrentNode.assembly_descriptor) assembly_descriptor(myCurrentNode.assembly_descriptor#back)]?
90		[#pushItem(myCurrentNode.ejb_client_jar) ejb_client_jar(myCurrentNode.ejb_client_jar#back)]?
91		"</ejb-jar>"
92		;
93
94/**
95The abstract-schema-name element specifies the name of the abstract
96schema type of an entity bean with cmp-version 2.x. It is used in EJB
97QL queries.
98
99For example, the abstract-schema-name for an entity bean whose local
100interface is com.acme.commerce.Order might be Order.
101
102Used in: entity
103**/
104abstract_schema_name(myCurrentNode : node)	::=
105		'<' IDENTIFIER:"abstract-schema-name"
106		#continue
107		[
108				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
109		]?
110		'>'
111		PCDATA_LITERAL:myCurrentNode
112		"</abstract-schema-name>"
113		;
114
115/**
116
117The acknowledge-mode element specifies whether JMS AUTO_ACKNOWLEDGE or
118DUPS_OK_ACKNOWLEDGE message acknowledgment semantics should be used
119for the onMessage message of a message-driven bean that uses bean
120managed transaction demarcation.
121
122The acknowledge-mode element must be one of the two following:
123
124	<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
125	<acknowledge-mode>Dups-ok-acknowledge</acknowledgemode>
126
127Used in: message-driven
128**/
129acknowledge_mode(myCurrentNode : node)	::=
130		'<' IDENTIFIER:"acknowledge-mode"
131		#continue
132		[
133				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
134		]?
135		'>'
136		PCDATA_LITERAL:myCurrentNode
137		"</acknowledge-mode>"
138		;
139
140/**
141The assembly-descriptor element contains application-assembly information.
142
143The application-assembly information consists of the following parts:
144the definition of security roles, the definition of method
145permissions, the definition of transaction attributes for
146enterprise beans with container-managed transaction demarcation and
147a list of methods to be excluded from being invoked.
148
149All the parts are optional in the sense that they are omitted if the
150lists represented by them are empty.
151
152Providing an assembly-descriptor in the deployment descriptor is
153optional for the ejb-jar file producer.
154
155Used in: ejb-jar
156**/
157assembly_descriptor(myCurrentNode : node)	::=
158		'<' IDENTIFIER:"assembly-descriptor"
159		#continue
160		[
161				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
162		]?
163		'>'
164		[#pushItem(myCurrentNode.security_role) security_role(myCurrentNode.security_role#back)]*
165		[#pushItem(myCurrentNode.method_permission) method_permission(myCurrentNode.method_permission#back)]*
166		[#pushItem(myCurrentNode.container_transaction) container_transaction(myCurrentNode.container_transaction#back)]*
167		[#pushItem(myCurrentNode.exclude_list) exclude_list(myCurrentNode.exclude_list#back)]?
168		"</assembly-descriptor>"
169		;
170
171/**
172The cascade-delete element specifies that, within a particular
173relationship, the lifetime of one or more entity beans is dependent
174upon the lifetime of another entity bean. The cascade-delete element
175can only be specified for an ejb-relationship-role element contained
176in an ejb-relation element in which the other ejb-relationship-role
177element specifies a multiplicity of One.
178
179Used in: ejb-relationship-role
180**/
181cascade_delete(myCurrentNode : node)	::=
182		'<' IDENTIFIER:"cascade-delete"
183		#continue
184		[
185				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
186		]?
187		"/>"
188		;
189
190/**
191The cmp-field element describes a container-managed field. The
192field element includes an optional description of the field, and the
193name of the field.
194
195Used in: entity
196**/
197cmp_field(myCurrentNode : node)	::=
198		'<' IDENTIFIER:"cmp-field"
199		#continue
200		[
201				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
202		]?
203		'>'
204		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
205		field_name(myCurrentNode.field_name)
206		"</cmp-field>"
207		;
208
209/**
210The cmp-version element specifies the version of an entity bean
211with container-managed persistence.
212
213The cmp-version element must be one of the two following:
214
215	<cmp-version>1.x</cmp-version>
216	<cmp-version>2.x</cmp-version>
217
218The default value of the cmp-version element is 2.x.
219
220Used in: entity
221**/
222cmp_version(myCurrentNode : node)	::=
223		'<' IDENTIFIER:"cmp-version"
224		#continue
225		[
226				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
227		]?
228		'>'
229		PCDATA_LITERAL:myCurrentNode
230		"</cmp-version>"
231		;
232
233/**
234
235The cmr-field element describes the bean provider's view of a
236relationship. It consists of an optional description, and the name and
237the class type of a field in the source of a role of a
238relationship. The cmr-field-name element corresponds to the name used
239for the get and set accessor methods for the relationship. The
240cmr-field-type element is used only for collection-valued
241cmr-fields. It specifies the type of the collection that is used.
242
243Used in: ejb-relationship-role
244**/
245cmr_field(myCurrentNode : node)	::=
246		'<' IDENTIFIER:"cmr-field"
247		#continue
248		[
249				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
250		]?
251		'>'
252		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
253		cmr_field_name(myCurrentNode.cmr_field_name)
254		[#pushItem(myCurrentNode.cmr_field_type) cmr_field_type(myCurrentNode.cmr_field_type#back)]?
255		"</cmr-field>"
256		;
257
258/**
259The cmr-field-name element specifies the name of a logical
260relationship field in the entity bean class. The name of the cmr-field
261must begin with a lowercase letter. This field is accessed by methods
262whose names consist of the name of the field specified by
263cmr-field-name in which the first letter is uppercased, prefixed by
264"get" or "set".
265
266Used in: cmr-field
267**/
268cmr_field_name(myCurrentNode : node)	::=
269		'<' IDENTIFIER:"cmr-field-name"
270		#continue
271		[
272				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
273		]?
274		'>'
275		PCDATA_LITERAL:myCurrentNode
276		"</cmr-field-name>"
277		;
278
279/**
280The cmr-field-type element specifies the class of a
281collection-valued logical relationship field in the entity bean
282class. The value of the cmr-field-type element must be either:
283java.util.Collection or java.util.Set.
284
285Used in: cmr-field
286**/
287cmr_field_type(myCurrentNode : node)	::=
288		'<' IDENTIFIER:"cmr-field-type"
289		#continue
290		[
291				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
292		]?
293		'>'
294		PCDATA_LITERAL:myCurrentNode
295		"</cmr-field-type>"
296		;
297
298/**
299The container-transaction element specifies how the container
300must manage transaction scopes for the enterprise bean's method
301invocations. The element consists of an optional description, a list
302of method elements, and a transaction attribute. The transaction
303attribute is to be applied to all the specified methods.
304
305Used in: assembly-descriptor
306**/
307container_transaction(myCurrentNode : node)	::=
308		'<' IDENTIFIER:"container-transaction"
309		#continue
310		[
311				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
312		]?
313		'>'
314		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
315		[#pushItem(myCurrentNode.method) method(myCurrentNode.method#back)]+
316		trans_attribute(myCurrentNode.trans_attribute)
317		"</container-transaction>"
318		;
319
320/**
321The description element is used to provide text describing the parent
322element.  The description element should include any information that
323the enterprise bean ejb-jar file producer wants to provide to the consumer of
324the enterprise bean ejb-jar file (i.e., to the Deployer). Typically, the tools
325used by the enterprise bean ejb-jar file consumer will display the description
326when processing the parent element that contains the description.
327
328Used in: cmp-field, cmr-field, container-transaction, ejb-jar,
329ejb-local-ref, ejb-ref, ejb-relation, ejb-relationship-role, entity,
330env-entry, exclude-list, message-driven, method, method-permission,
331query, relationship-role-source, relationships, resource-env-ref,
332resource-ref, run-as, security-identity, security-role,
333security-role-ref, session
334**/
335description(myCurrentNode : node)	::=
336		'<' IDENTIFIER:"description"
337		#continue
338		[
339				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
340		]?
341		'>'
342		PCDATA_LITERAL:myCurrentNode
343		"</description>"
344		;
345
346/**
347The destination-type element specifies the type of the JMS
348destination. The type is specified by the Java interface expected to
349be implemented by the destination.
350
351The destination-type element must be one of the two following:
352
353<destination-type>javax.jms.Queue</destination-type>
354<destination-type>javax.jms.Topic</destination-type>
355
356Used in: message-driven-destination
357**/
358destination_type(myCurrentNode : node)	::=
359		'<' IDENTIFIER:"destination-type"
360		#continue
361		[
362				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
363		]?
364		'>'
365		PCDATA_LITERAL:myCurrentNode
366		"</destination-type>"
367		;
368
369/**
370The display-name element contains a short name that is intended to be
371displayed by tools.  The display name need not be unique.
372
373Used in: ejb-jar, entity, message-driven, session
374
375Example:
376
377<display-name>Employee Self Service</display-name>
378**/
379display_name(myCurrentNode : node)	::=
380		'<' IDENTIFIER:"display-name"
381		#continue
382		[
383				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
384		]?
385		'>'
386		PCDATA_LITERAL:myCurrentNode
387		"</display-name>"
388		;
389
390/**
391The ejb-class element contains the fully-qualified name of the
392enterprise bean's class.
393
394Used in: entity, message-driven, session
395
396Example:
397
398<ejb-class>com.wombat.empl.EmployeeServiceBean</ejb-class>
399**/
400ejb_class(myCurrentNode : node)	::=
401		'<' IDENTIFIER:"ejb-class"
402		#continue
403		[
404				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
405		]?
406		'>'
407		PCDATA_LITERAL:myCurrentNode
408		"</ejb-class>"
409		;
410
411/**
412The optional ejb-client-jar element specifies a JAR file that contains
413the class files necessary for a client program to access the
414enterprise beans in the ejb-jar file.
415
416Used in: ejb-jar
417
418Example:
419
420<ejb-client-jar>employee_service_client.jar</ejb-client-jar>
421**/
422ejb_client_jar(myCurrentNode : node)	::=
423		'<' IDENTIFIER:"ejb-client-jar"
424		#continue
425		[
426				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
427		]?
428		'>'
429		PCDATA_LITERAL:myCurrentNode
430		"</ejb-client-jar>"
431		;
432
433/**
434The ejb-link element is used in the ejb-ref or ejb-local-ref
435elements to specify that an EJB reference is linked to an
436enterprise bean.
437
438The value of the ejb-link element must be the ejb-name of an
439enterprise bean in the same ejb-jar file or in another ejb-jar
440file in the same J2EE application unit.
441
442Alternatively, the name in the ejb-link element may be composed of a
443path name specifying the ejb-jar containing the referenced enterprise
444bean with the ejb-name of the target bean appended and separated from
445the path name by "#".  The path name is relative to the ejb-jar file
446containing the enterprise bean that is referencing the enterprise bean.
447This allows multiple enterprise beans with the same ejb-name to be
448uniquely identified.
449
450Used in: ejb-local-ref, ejb-ref
451
452Examples:
453
454	<ejb-link>EmployeeRecord</ejb-link>
455
456	<ejb-link>../products/product.jar#ProductEJB</ejb-link>
457
458**/
459ejb_link(myCurrentNode : node)	::=
460		'<' IDENTIFIER:"ejb-link"
461		#continue
462		[
463				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
464		]?
465		'>'
466		PCDATA_LITERAL:myCurrentNode
467		"</ejb-link>"
468		;
469
470/**
471The ejb-local-ref element is used for the declaration of a reference to
472an enterprise bean's local home. The declaration consists of:
473
474	- an optional description
475	- the EJB reference name used in the code of the enterprise bean
476	  that's referencing the enterprise bean
477	- the expected type of the referenced enterprise bean
478	- the expected local home and local interfaces of the referenced
479	  enterprise bean
480	- optional ejb-link information, used to specify the referenced
481	  enterprise bean
482
483Used in: entity, message-driven, session
484**/
485ejb_local_ref(myCurrentNode : node)	::=
486		'<' IDENTIFIER:"ejb-local-ref"
487		#continue
488		[
489				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
490		]?
491		'>'
492		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
493		ejb_ref_name(myCurrentNode.ejb_ref_name)
494		ejb_ref_type(myCurrentNode.ejb_ref_type)
495		local_home(myCurrentNode.local_home)
496		local(myCurrentNode.local)
497		[#pushItem(myCurrentNode.ejb_link) ejb_link(myCurrentNode.ejb_link#back)]?
498		"</ejb-local-ref>"
499		;
500
501/**
502The ejb-name element specifies an enterprise bean's name. This name is
503assigned by the ejb-jar file producer to name the enterprise bean in
504the ejb-jar file's deployment descriptor. The name must be unique
505among the names of the enterprise beans in the same ejb-jar file.
506
507There is no architected relationship between the ejb-name in the
508deployment descriptor and the JNDI name that the Deployer will assign
509to the enterprise bean's home.
510
511The name for an entity bean with cmp-version 2.x must conform to the
512lexical rules for an NMTOKEN. The name for an entity bean with
513cmp-version 2.x must not be a reserved literal in EJB QL.
514
515Used in: entity, message-driven, method, relationship-role-source,
516session
517
518Example:
519
520<ejb-name>EmployeeService</ejb-name>
521**/
522ejb_name(myCurrentNode : node)	::=
523		'<' IDENTIFIER:"ejb-name"
524		#continue
525		[
526				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
527		]?
528		'>'
529		PCDATA_LITERAL:myCurrentNode
530		"</ejb-name>"
531		;
532
533/**
534The ejb-ql element contains the EJB QL query string that defines
535a finder or select query. This element is defined within the scope of
536a query element whose contents specify the finder or the select method
537that uses the query. The content must be a valid EJB QL query string
538for the entity bean for which the query is specified.
539
540The ejb-ql element must be specified for all queries that are
541expressible in EJB QL.
542
543Used in: query
544
545Example:
546<query>
547    <query-method>
548        <method-name>ejbSelectPendingLineitems</method-name>
549        <method-params/>
550    </query-method>
551    <ejb-ql>SELECT OBJECT(l) FROM LineItems l WHERE l.shipped <> TRUE
552    </ejb-ql>
553</query>
554
555**/
556ejb_ql(myCurrentNode : node)	::=
557		'<' IDENTIFIER:"ejb-ql"
558		#continue
559		[
560				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
561		]?
562		'>'
563		PCDATA_LITERAL:myCurrentNode
564		"</ejb-ql>"
565		;
566
567/**
568The ejb-ref element is used for the declaration of a reference to
569an enterprise bean's home. The declaration consists of:
570
571	- an optional description
572	- the EJB reference name used in the code of
573	  the enterprise bean that's referencing the enterprise bean
574	- the expected type of the referenced enterprise bean
575	- the expected home and remote interfaces of the referenced
576	  enterprise bean
577	- optional ejb-link information, used to specify the referenced
578	  enterprise bean
579
580Used in: entity, message-driven, session
581**/
582ejb_ref(myCurrentNode : node)	::=
583		'<' IDENTIFIER:"ejb-ref"
584		#continue
585		[
586				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
587		]?
588		'>'
589		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
590		ejb_ref_name(myCurrentNode.ejb_ref_name)
591		ejb_ref_type(myCurrentNode.ejb_ref_type)
592		home(myCurrentNode.home)
593		remote(myCurrentNode.remote)
594		[#pushItem(myCurrentNode.ejb_link) ejb_link(myCurrentNode.ejb_link#back)]?
595		"</ejb-ref>"
596		;
597
598/**
599The ejb-ref-name element contains the name of an EJB reference. The
600EJB reference is an entry in the enterprise bean's environment and is
601relative to the java:comp/env context.  The name must be unique
602within the enterprise bean.
603
604It is recommended that name is prefixed with "ejb/".
605
606Used in: ejb-local-ref, ejb-ref
607
608Example:
609
610<ejb-ref-name>ejb/Payroll</ejb-ref-name>
611**/
612ejb_ref_name(myCurrentNode : node)	::=
613		'<' IDENTIFIER:"ejb-ref-name"
614		#continue
615		[
616				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
617		]?
618		'>'
619		PCDATA_LITERAL:myCurrentNode
620		"</ejb-ref-name>"
621		;
622
623/**
624The ejb-ref-type element contains the expected type of the
625referenced enterprise bean.
626
627The ejb-ref-type element must be one of the following:
628
629	<ejb-ref-type>Entity</ejb-ref-type>
630	<ejb-ref-type>Session</ejb-ref-type>
631
632Used in: ejb-local-ref, ejb-ref
633**/
634ejb_ref_type(myCurrentNode : node)	::=
635		'<' IDENTIFIER:"ejb-ref-type"
636		#continue
637		[
638				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
639		]?
640		'>'
641		PCDATA_LITERAL:myCurrentNode
642		"</ejb-ref-type>"
643		;
644
645/**
646
647The ejb-relation element describes a relationship between two
648entity beans with container-managed persistence.  An ejb-relation
649element contains a description; an optional ejb-relation-name element;
650and exactly two relationship role declarations, defined by the
651ejb-relationship-role elements. The name of the relationship, if
652specified, is unique within the ejb-jar file.
653
654Used in: relationships
655**/
656ejb_relation(myCurrentNode : node)	::=
657		'<' IDENTIFIER:"ejb-relation"
658		#continue
659		[
660				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
661		]?
662		'>'
663		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
664		[#pushItem(myCurrentNode.ejb_relation_name) ejb_relation_name(myCurrentNode.ejb_relation_name#back)]?
665		ejb_relationship_role(myCurrentNode.ejb_relationship_role)
666		ejb_relationship_role(myCurrentNode.ejb_relationship_role)
667		"</ejb-relation>"
668		;
669
670/**
671The ejb-relation-name element provides a unique name for a relationship.
672
673Used in: ejb-relation
674**/
675ejb_relation_name(myCurrentNode : node)	::=
676		'<' IDENTIFIER:"ejb-relation-name"
677		#continue
678		[
679				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
680		]?
681		'>'
682		PCDATA_LITERAL:myCurrentNode
683		"</ejb-relation-name>"
684		;
685
686/**
687The ejb-relationship-role element describes a role within a
688relationship. There are two roles in each relationship.
689
690The ejb-relationship-role element contains an optional description; an
691optional name for the relationship role; a specification of the
692multiplicity of the role; an optional specification of cascade-delete
693functionality for the role; the role source; and a declaration of the
694cmr-field, if any, by means of which the other side of the
695relationship is accessed from the perspective of the role source.
696
697The multiplicity and role-source element are mandatory.
698
699The relationship-role-source element designates an entity bean by
700means of an ejb-name element. For bidirectional relationships, both
701roles of a relationship must declare a relationship-role-source
702element that specifies a cmr-field in terms of which the relationship
703is accessed. The lack of a cmr-field element in an
704ejb-relationship-role specifies that the relationship is
705unidirectional in navigability and the entity bean that participates
706in the relationship is "not aware" of the relationship.
707
708Used in: ejb-relation
709
710Example:
711
712<ejb-relation>
713    <ejb-relation-name>Product-LineItem</ejb-relation-name>
714    <ejb-relationship-role>
715        <ejb-relationship-role-name>product-has-lineitems
716        </ejb-relationship-role-name>
717        <multiplicity>One</multiplicity>
718        <relationship-role-source>
719        <ejb-name>ProductEJB</ejb-name>
720        </relationship-role-source>
721     </ejb-relationship-role>
722
723**/
724ejb_relationship_role(myCurrentNode : node)	::=
725		'<' IDENTIFIER:"ejb-relationship-role"
726		#continue
727		[
728				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
729		]?
730		'>'
731		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
732		[#pushItem(myCurrentNode.ejb_relationship_role_name) ejb_relationship_role_name(myCurrentNode.ejb_relationship_role_name#back)]?
733		multiplicity(myCurrentNode.multiplicity)
734		[#pushItem(myCurrentNode.cascade_delete) cascade_delete(myCurrentNode.cascade_delete#back)]?
735		relationship_role_source(myCurrentNode.relationship_role_source)
736		[#pushItem(myCurrentNode.cmr_field) cmr_field(myCurrentNode.cmr_field#back)]?
737		"</ejb-relationship-role>"
738		;
739
740/**
741The ejb-relationship-role-name element defines a name for a role that
742is unique within an ejb-relation. Different relationships can use the
743same name for a role.
744
745Used in: ejb-relationship-role
746**/
747ejb_relationship_role_name(myCurrentNode : node)	::=
748		'<' IDENTIFIER:"ejb-relationship-role-name"
749		#continue
750		[
751				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
752		]?
753		'>'
754		PCDATA_LITERAL:myCurrentNode
755		"</ejb-relationship-role-name>"
756		;
757
758/**
759The enterprise-beans element contains the declarations of one or more
760enterprise beans.
761**/
762enterprise_beans(myCurrentNode : node)	::=
763		'<' IDENTIFIER:"enterprise-beans"
764		#continue
765		[
766				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
767		]?
768		'>'
769[
770		session(myCurrentNode.session)
771	|
772		entity(myCurrentNode.entity)
773	|
774		message_driven(myCurrentNode.message_driven)
775]+
776		"</enterprise-beans>"
777		;
778
779/**
780The entity element declares an entity bean. The declaration
781consists of:
782
783	- an optional description
784	- an optional display name
785	- an optional small icon file name
786	- an optional large icon file name
787	- a unique name assigned to the enterprise bean
788	  in the deployment descriptor
789	- the names of the entity bean's remote home and remote
790          interfaces, if any
791	- the names of the entity bean's local home and local
792	  interfaces, if any
793	- the entity bean's implementation class
794	- the entity bean's persistence management type
795	- the entity bean's primary key class name
796	- an indication of the entity bean's reentrancy
797	- an optional specification of the entity bean's cmp-version
798	- an optional specification of the entity bean's abstract
799	  schema name
800	- an optional list of container-managed fields
801	- an optional specification of the primary key field
802	- an optional declaration of the bean's environment entries
803	- an optional declaration of the bean's EJB references
804	- an optional declaration of the bean's local EJB references
805	- an optional declaration of the security role references
806	- an optional declaration of the security identity
807	  to be used for the execution of the bean's methods
808	- an optional declaration of the bean's resource manager
809          connection factory references
810	- an optional declaration of the bean's
811	  resource environment references
812	- an optional set of query declarations
813	  for finder and select methods for an entity
814	  bean with cmp-version 2.x.
815
816The optional abstract-schema-name element must be specified for an
817entity bean with container-managed persistence and cmp-version 2.x.
818
819The optional primkey-field may be present in the descriptor if the
820entity's persistence-type is Container.
821
822The optional cmp-version element may be present in the descriptor if
823the entity's persistence-type is Container. If the persistence-type is
824Container and the cmp-version element is not specified, its value
825defaults to 2.x.
826
827The optional home and remote elements must be specified if the entity
828bean cmp-version is 1.x.
829
830The optional home and remote elements must be specified if the entity
831bean has a remote home and remote interface.
832
833The optional local-home and local elements must be specified if the
834entity bean has a local home and local interface.
835
836Either both the local-home and the local elements or both the
837home and the remote elements must be specified.
838
839The optional query elements must be present if the persistence-type is
840Container and the cmp-version is 2.x and query methods other than
841findByPrimaryKey have been defined for the entity bean.
842
843The other elements that are optional are "optional" in the sense that
844they are omitted if the lists represented by them are empty.
845
846At least one cmp-field element must be present in the descriptor if
847the entity's persistence-type is Container and the cmp-version is 1.x,
848and none must not be present if the entity's persistence-type is Bean.
849
850Used in: enterprise-beans
851
852**/
853entity(myCurrentNode : node)	::=
854		'<' IDENTIFIER:"entity"
855		#continue
856		[
857				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
858		]?
859		'>'
860		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
861		[#pushItem(myCurrentNode.display_name) display_name(myCurrentNode.display_name#back)]?
862		[#pushItem(myCurrentNode.small_icon) small_icon(myCurrentNode.small_icon#back)]?
863		[#pushItem(myCurrentNode.large_icon) large_icon(myCurrentNode.large_icon#back)]?
864		ejb_name(myCurrentNode.ejb_name)
865		[#pushItem(myCurrentNode.home) home(myCurrentNode.home#back)]?
866		[#pushItem(myCurrentNode.remote) remote(myCurrentNode.remote#back)]?
867		[#pushItem(myCurrentNode.local_home) local_home(myCurrentNode.local_home#back)]?
868		[#pushItem(myCurrentNode.local) local(myCurrentNode.local#back)]?
869		ejb_class(myCurrentNode.ejb_class)
870		persistence_type(myCurrentNode.persistence_type)
871		prim_key_class(myCurrentNode.prim_key_class)
872		reentrant(myCurrentNode.reentrant)
873		[#pushItem(myCurrentNode.cmp_version) cmp_version(myCurrentNode.cmp_version#back)]?
874		[#pushItem(myCurrentNode.abstract_schema_name) abstract_schema_name(myCurrentNode.abstract_schema_name#back)]?
875		[#pushItem(myCurrentNode.cmp_field) cmp_field(myCurrentNode.cmp_field#back)]*
876		[#pushItem(myCurrentNode.primkey_field) primkey_field(myCurrentNode.primkey_field#back)]?
877		[#pushItem(myCurrentNode.env_entry) env_entry(myCurrentNode.env_entry#back)]*
878		[#pushItem(myCurrentNode.ejb_ref) ejb_ref(myCurrentNode.ejb_ref#back)]*
879		[#pushItem(myCurrentNode.ejb_local_ref) ejb_local_ref(myCurrentNode.ejb_local_ref#back)]*
880		[#pushItem(myCurrentNode.security_role_ref) security_role_ref(myCurrentNode.security_role_ref#back)]*
881		[#pushItem(myCurrentNode.security_identity) security_identity(myCurrentNode.security_identity#back)]?
882		[#pushItem(myCurrentNode.resource_ref) resource_ref(myCurrentNode.resource_ref#back)]*
883		[#pushItem(myCurrentNode.resource_env_ref) resource_env_ref(myCurrentNode.resource_env_ref#back)]*
884		[#pushItem(myCurrentNode.query) query(myCurrentNode.query#back)]*
885		"</entity>"
886		;
887
888/**
889The env-entry element contains the declaration of an enterprise bean's
890environment entry. The declaration consists of an optional
891description, the name of the environment entry, and an optional
892value.  If a value is not specified, one must be supplied
893during deployment.
894
895Used in: entity, message-driven, session
896**/
897env_entry(myCurrentNode : node)	::=
898		'<' IDENTIFIER:"env-entry"
899		#continue
900		[
901				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
902		]?
903		'>'
904		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
905		env_entry_name(myCurrentNode.env_entry_name)
906		env_entry_type(myCurrentNode.env_entry_type)
907		[#pushItem(myCurrentNode.env_entry_value) env_entry_value(myCurrentNode.env_entry_value#back)]?
908		"</env-entry>"
909		;
910
911/**
912The env-entry-name element contains the name of an enterprise bean's
913environment entry.  The name is a JNDI name relative to the
914java:comp/env context.  The name must be unique within an enterprise bean.
915
916Used in: env-entry
917
918Example:
919
920<env-entry-name>minAmount</env-entry-name>
921**/
922env_entry_name(myCurrentNode : node)	::=
923		'<' IDENTIFIER:"env-entry-name"
924		#continue
925		[
926				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
927		]?
928		'>'
929		PCDATA_LITERAL:myCurrentNode
930		"</env-entry-name>"
931		;
932
933/**
934The env-entry-type element contains the fully-qualified Java type of
935the environment entry value that is expected by the enterprise bean's
936code.
937
938The following are the legal values of env-entry-type:
939
940	java.lang.Boolean
941	java.lang.Byte
942	java.lang.Character
943	java.lang.String
944	java.lang.Short
945	java.lang.Integer
946	java.lang.Long
947	java.lang.Float
948	java.lang.Double
949
950
951Used in: env-entry
952
953Example:
954
955<env-entry-type>java.lang.Boolean</env-entry-type>
956**/
957env_entry_type(myCurrentNode : node)	::=
958		'<' IDENTIFIER:"env-entry-type"
959		#continue
960		[
961				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
962		]?
963		'>'
964		PCDATA_LITERAL:myCurrentNode
965		"</env-entry-type>"
966		;
967
968/**
969The env-entry-value element contains the value of an enterprise bean's
970environment entry. The value must be a String that is valid for the
971constructor of the specified type that takes a single String
972parameter, or for java.lang.Character, a single character.
973
974Used in: env-entry
975
976Example:
977
978<env-entry-value>100.00</env-entry-value>
979**/
980env_entry_value(myCurrentNode : node)	::=
981		'<' IDENTIFIER:"env-entry-value"
982		#continue
983		[
984				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
985		]?
986		'>'
987		PCDATA_LITERAL:myCurrentNode
988		"</env-entry-value>"
989		;
990
991/**
992The exclude list element specifies one or more methods which the
993Assembler marks to be uncallable.
994
995If the method permission relation contains methods that are in the
996exclude list, the Deployer should consider those methods to be
997uncallable.
998
999Used in: assembly-descriptor
1000**/
1001exclude_list(myCurrentNode : node)	::=
1002		'<' IDENTIFIER:"exclude-list"
1003		#continue
1004		[
1005				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1006		]?
1007		'>'
1008		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
1009		[#pushItem(myCurrentNode.method) method(myCurrentNode.method#back)]+
1010		"</exclude-list>"
1011		;
1012
1013/**
1014The field-name element specifies the name of a container managed
1015field.
1016
1017The name of the cmp-field of an entity bean with cmp-version 2.x must
1018begin with a lowercase letter. This field is accessed by methods whose
1019names consists of the name of the field specified by field-name in
1020which the first letter is uppercased, prefixed by "get" or "set".
1021
1022The name of the cmp-field of an entity bean with cmp-version 1.x must
1023denote a public field of the enterprise bean class or one of its
1024superclasses.
1025
1026Used in: cmp-field
1027
1028Example:
1029
1030
1031	<field-name>firstName</field-Name>
1032
1033**/
1034field_name(myCurrentNode : node)	::=
1035		'<' IDENTIFIER:"field-name"
1036		#continue
1037		[
1038				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1039		]?
1040		'>'
1041		PCDATA_LITERAL:myCurrentNode
1042		"</field-name>"
1043		;
1044
1045/**
1046The home element contains the fully-qualified name of the enterprise
1047bean's home interface.
1048
1049Used in: ejb-ref, entity, session
1050
1051Example:
1052
1053<home>com.aardvark.payroll.PayrollHome</home>
1054**/
1055home(myCurrentNode : node)	::=
1056		'<' IDENTIFIER:"home"
1057		#continue
1058		[
1059				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1060		]?
1061		'>'
1062		PCDATA_LITERAL:myCurrentNode
1063		"</home>"
1064		;
1065
1066/**
1067The large-icon element contains the name of a file
1068containing a large (32 x 32) icon image. The file
1069name is a relative path within the enterprise bean's
1070ejb-jar file.
1071
1072The image may be either in the JPEG or GIF format.
1073The icon can be used by tools.
1074
1075Used in: ejb-jar, entity, message-driven, session
1076
1077Example:
1078
1079<large-icon>employee-service-icon32x32.jpg</large-icon>
1080**/
1081large_icon(myCurrentNode : node)	::=
1082		'<' IDENTIFIER:"large-icon"
1083		#continue
1084		[
1085				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1086		]?
1087		'>'
1088		PCDATA_LITERAL:myCurrentNode
1089		"</large-icon>"
1090		;
1091
1092/**
1093
1094The local element contains the fully-qualified name of the
1095enterprise bean's local interface.
1096
1097Used in: ejb-local-ref, entity, session
1098
1099**/
1100local(myCurrentNode : node)	::=
1101		'<' IDENTIFIER:"local"
1102		#continue
1103		[
1104				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1105		]?
1106		'>'
1107		PCDATA_LITERAL:myCurrentNode
1108		"</local>"
1109		;
1110
1111/**
1112
1113The local-home element contains the fully-qualified name of the
1114enterprise bean's local home interface.
1115
1116Used in: ejb-local-ref, entity, session
1117**/
1118local_home(myCurrentNode : node)	::=
1119		'<' IDENTIFIER:"local-home"
1120		#continue
1121		[
1122				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1123		]?
1124		'>'
1125		PCDATA_LITERAL:myCurrentNode
1126		"</local-home>"
1127		;
1128
1129/**
1130
1131The message-driven element declares a message-driven bean. The
1132declaration consists of:
1133
1134	- an optional description
1135	- an optional display name
1136	- an optional small icon file name
1137	- an optional large icon file name
1138	- a name assigned to the enterprise bean in
1139	  the deployment descriptor
1140	- the message-driven bean's implementation class
1141	- the message-driven bean's transaction management type
1142	- an optional declaration of the message-driven bean's
1143	  message selector
1144	- an optional declaration of the
1145	  acknowledgment mode for the message-driven bean
1146	  if bean-managed transaction demarcation is used
1147	- an optional declaration of the
1148	  intended destination type of the message-driven bean
1149	- an optional declaration of the bean's environment entries
1150	- an optional declaration of the bean's EJB references
1151	- an optional declaration of the bean's local EJB references
1152	- an optional declaration of the security
1153	  identity to be used for the execution of the bean's methods
1154	- an optional declaration of the bean's resource manager
1155	  connection factory references
1156	- an optional declaration of the bean's resource
1157          environment references.
1158
1159Used in: enterprise-beans
1160**/
1161message_driven(myCurrentNode : node)	::=
1162		'<' IDENTIFIER:"message-driven"
1163		#continue
1164		[
1165				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1166		]?
1167		'>'
1168		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
1169		[#pushItem(myCurrentNode.display_name) display_name(myCurrentNode.display_name#back)]?
1170		[#pushItem(myCurrentNode.small_icon) small_icon(myCurrentNode.small_icon#back)]?
1171		[#pushItem(myCurrentNode.large_icon) large_icon(myCurrentNode.large_icon#back)]?
1172		ejb_name(myCurrentNode.ejb_name)
1173		ejb_class(myCurrentNode.ejb_class)
1174		transaction_type(myCurrentNode.transaction_type)
1175		[#pushItem(myCurrentNode.message_selector) message_selector(myCurrentNode.message_selector#back)]?
1176		[#pushItem(myCurrentNode.acknowledge_mode) acknowledge_mode(myCurrentNode.acknowledge_mode#back)]?
1177		[#pushItem(myCurrentNode.message_driven_destination) message_driven_destination(myCurrentNode.message_driven_destination#back)]?
1178		[#pushItem(myCurrentNode.env_entry) env_entry(myCurrentNode.env_entry#back)]*
1179		[#pushItem(myCurrentNode.ejb_ref) ejb_ref(myCurrentNode.ejb_ref#back)]*
1180		[#pushItem(myCurrentNode.ejb_local_ref) ejb_local_ref(myCurrentNode.ejb_local_ref#back)]*
1181		[#pushItem(myCurrentNode.security_identity) security_identity(myCurrentNode.security_identity#back)]?
1182		[#pushItem(myCurrentNode.resource_ref) resource_ref(myCurrentNode.resource_ref#back)]*
1183		[#pushItem(myCurrentNode.resource_env_ref) resource_env_ref(myCurrentNode.resource_env_ref#back)]*
1184		"</message-driven>"
1185		;
1186
1187/**
1188The message-driven-destination element provides advice to the Deployer
1189as to whether a message-driven bean is intended for a Queue or a
1190Topic. The declaration consists of: the type of the message-driven
1191bean's intended destination and an optional declaration of whether a
1192durable or non-durable subscription should be used if the
1193destination-type is javax.jms.Topic.
1194
1195Used in: message-driven
1196**/
1197message_driven_destination(myCurrentNode : node)	::=
1198		'<' IDENTIFIER:"message-driven-destination"
1199		#continue
1200		[
1201				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1202		]?
1203		'>'
1204		destination_type(myCurrentNode.destination_type)
1205		[#pushItem(myCurrentNode.subscription_durability) subscription_durability(myCurrentNode.subscription_durability#back)]?
1206		"</message-driven-destination>"
1207		;
1208
1209/**
1210The message-selector element is used to specify the JMS message
1211selector to be used in determining which messages a message-driven
1212bean is to receive.
1213
1214Example:
1215<message-selector>JMSType = `car' AND color = `blue' AND weight &gt; 2500
1216</message-selector>
1217
1218Used in: message-driven
1219**/
1220message_selector(myCurrentNode : node)	::=
1221		'<' IDENTIFIER:"message-selector"
1222		#continue
1223		[
1224				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1225		]?
1226		'>'
1227		PCDATA_LITERAL:myCurrentNode
1228		"</message-selector>"
1229		;
1230
1231/**
1232
1233The method element is used to denote a method of an enterprise
1234bean's home or component interface, or, in the case of a message-driven
1235bean, the bean's onMessage method, or a set of methods. The ejb-name
1236element must be the name of one of the enterprise beans declared in
1237the deployment descriptor; the optional method-intf element allows to
1238distinguish between a method with the same signature that is multiply
1239defined across in both the home and component interfaces; the
1240method-name element specifies the method name; and the optional
1241method-params elements identify a single method among multiple methods
1242with an overloaded method name.
1243
1244There are three possible styles of the method element syntax:
1245
12461.
1247<method>
1248    <ejb-name>EJBNAME</ejb-name>
1249    <method-name>*</method-name>
1250</method>
1251
1252   This style is used to refer to all the methods of the specified
1253   enterprise bean's home and component interfaces.
1254
12552.
1256<method>
1257    <ejb-name>EJBNAME</ejb-name>
1258    <method-name>METHOD</method-name>
1259</method>>
1260
1261   This style is used to refer to the specified method of the
1262   specified enterprise bean. If there are multiple methods with
1263   the same overloaded name, the element of this style refers to
1264   all the methods with the overloaded name.
1265
1266
12673.
1268<method>
1269    <ejb-name>EJBNAME</ejb-name>
1270    <method-name>METHOD</method-name>
1271    <method-params>
1272        <method-param>PARAM-1</method-param>
1273        <method-param>PARAM-2</method-param>
1274        ...
1275        <method-param>PARAM-n</method-param>
1276    </method-params>
1277<method>
1278
1279
1280   This style is used to refer to a single method within a set of
1281   methods with an overloaded name. PARAM-1 through PARAM-n are the
1282   fully-qualified Java types of the method's input parameters (if
1283   the method has no input arguments, the method-params element
1284   contains no method-param elements). Arrays are specified by the
1285   array element's type, followed by one or more pair of square
1286   brackets (e.g. int[][]). If there are multiple methods with the
1287   same overloaded name, this style refers to all of the overloaded
1288   methods.
1289
1290
1291Used in: container-transaction, exclude-list, method-permission
1292
1293Examples:
1294
1295Style 1: The following method element refers to all the methods of
1296the EmployeeService bean's home and component interfaces:
1297
1298<method>
1299    <ejb-name>EmployeeService</ejb-name>
1300    <method-name>*</method-name>
1301</method>
1302
1303Style 2: The following method element refers to all the create
1304methods of the EmployeeService bean's home interface(s).
1305
1306<method>
1307    <ejb-name>EmployeeService</ejb-name>
1308    <method-name>create</method-name>
1309</method>
1310
1311
1312Style 3: The following method element refers to the
1313create(String firstName, String LastName) method of the
1314EmployeeService bean's home interface(s).
1315
1316<method>
1317    <ejb-name>EmployeeService</ejb-name>
1318    <method-name>create</method-name>
1319    <method-params>
1320        <method-param>java.lang.String</method-param>
1321        <method-param>java.lang.String</method-param>
1322    </method-params>
1323</method>
1324
1325
1326The following example illustrates a Style 3 element with
1327more complex parameter types. The method
1328foobar(char s, int i, int[] iar, mypackage.MyClass mycl,
1329mypackage.MyClass[][] myclaar) would be specified as:
1330
1331<method>
1332    <ejb-name>EmployeeService</ejb-name>
1333    <method-name>foobar</method-name>
1334    <method-params>
1335        <method-param>char</method-param>
1336        <method-param>int</method-param>
1337        <method-param>int[]</method-param>
1338        <method-param>mypackage.MyClass</method-param>
1339        <method-param>mypackage.MyClass[][]</method-param>
1340    </method-params>
1341</method>
1342
1343
1344The optional method-intf element can be used when it becomes necessary
1345to differentiate between a method that is multiply defined across the
1346enterprise bean's home and component interfaces with the same name and
1347signature.
1348
1349
1350For example, the method element
1351
1352<method>
1353    <ejb-name>EmployeeService</ejb-name>
1354    <method-intf>Remote</method-intf>
1355    <method-name>create</method-name>
1356    <method-params>
1357        <method-param>java.lang.String</method-param>
1358        <method-param>java.lang.String</method-param>
1359    </method-params>
1360</method>
1361
1362
1363can be used to differentiate the create(String, String) method defined
1364in the remote interface from the create(String, String) method defined
1365in the remote home interface, which would be defined as
1366
1367
1368<method>
1369    <ejb-name>EmployeeService</ejb-name>
1370    <method-intf>Home</method-intf>
1371    <method-name>create</method-name>
1372    <method-params>
1373        <method-param>java.lang.String</method-param>
1374        <method-param>java.lang.String</method-param>
1375    </method-params>
1376</method>
1377
1378and the create method that is defined in the local home interface
1379which would be defined as
1380
1381<method>
1382    <ejb-name>EmployeeService</ejb-name>
1383    <method-intf>LocalHome</method-intf>
1384    <method-name>create</method-name>
1385    <method-params>
1386        <method-param>java.lang.String</method-param>
1387        <method-param>java.lang.String</method-param>
1388    </method-params>
1389</method>
1390
1391
1392The method-intf element can be used with all three Styles of the
1393method element usage. For example, the following method element
1394example could be used to refer to all the methods of the
1395EmployeeService bean's remote home interface.
1396
1397
1398<method>
1399    <ejb-name>EmployeeService</ejb-name>
1400    <method-intf>Home</method-intf>
1401    <method-name>*</method-name>
1402</method>
1403
1404**/
1405method(myCurrentNode : node)	::=
1406		'<' IDENTIFIER:"method"
1407		#continue
1408		[
1409				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1410		]?
1411		'>'
1412		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
1413		ejb_name(myCurrentNode.ejb_name)
1414		[#pushItem(myCurrentNode.method_intf) method_intf(myCurrentNode.method_intf#back)]?
1415		method_name(myCurrentNode.method_name)
1416		[#pushItem(myCurrentNode.method_params) method_params(myCurrentNode.method_params#back)]?
1417		"</method>"
1418		;
1419
1420/**
1421
1422The method-intf element allows a method element to differentiate
1423between the methods with the same name and signature that are multiply
1424defined across the component and home interfaces (e.g, in both an
1425enterprise bean's remote and local interfaces; in both an enterprise bean's
1426home and remote interfaces, etc.)
1427
1428The method-intf element must be one of the following:
1429
1430	<method-intf>Home</method-intf>
1431	<method-intf>Remote</method-intf>
1432	<method-intf>LocalHome</method-intf>
1433	<method-intf>Local</method-intf>
1434
1435Used in: method
1436**/
1437method_intf(myCurrentNode : node)	::=
1438		'<' IDENTIFIER:"method-intf"
1439		#continue
1440		[
1441				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1442		]?
1443		'>'
1444		PCDATA_LITERAL:myCurrentNode
1445		"</method-intf>"
1446		;
1447
1448/**
1449The method-name element contains a name of an enterprise bean method
1450or the asterisk (*) character. The asterisk is used when the element
1451denotes all the methods of an enterprise bean's component and home
1452interfaces.
1453
1454Used in: method, query-method
1455**/
1456method_name(myCurrentNode : node)	::=
1457		'<' IDENTIFIER:"method-name"
1458		#continue
1459		[
1460				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1461		]?
1462		'>'
1463		PCDATA_LITERAL:myCurrentNode
1464		"</method-name>"
1465		;
1466
1467/**
1468The method-param element contains the fully-qualified Java type name
1469of a method parameter.
1470
1471Used in: method-params
1472**/
1473method_param(myCurrentNode : node)	::=
1474		'<' IDENTIFIER:"method-param"
1475		#continue
1476		[
1477				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1478		]?
1479		'>'
1480		PCDATA_LITERAL:myCurrentNode
1481		"</method-param>"
1482		;
1483
1484/**
1485The method-params element contains a list of the fully-qualified Java
1486type names of the method parameters.
1487
1488Used in: method, query-method
1489**/
1490method_params(myCurrentNode : node)	::=
1491		'<' IDENTIFIER:"method-params"
1492		#continue
1493		[
1494				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1495		]?
1496		'>'
1497		[#pushItem(myCurrentNode.method_param) method_param(myCurrentNode.method_param#back)]*
1498		"</method-params>"
1499		;
1500
1501/**
1502
1503The method-permission element specifies that one or more security
1504roles are allowed to invoke one or more enterprise bean methods. The
1505method-permission element consists of an optional description, a list
1506of security role names or an indicator to state that the method is
1507unchecked for authorization, and a list of method elements.
1508
1509The security roles used in the method-permission element must be
1510defined in the security-role elements of the deployment descriptor,
1511and the methods must be methods defined in the enterprise bean's
1512component and/or home interfaces.
1513
1514
1515Used in: assembly-descriptor
1516**/
1517method_permission(myCurrentNode : node)	::=
1518		'<' IDENTIFIER:"method-permission"
1519		#continue
1520		[
1521				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1522		]?
1523		'>'
1524		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
1525		[
1526				[#pushItem(myCurrentNode.role_name) role_name(myCurrentNode.role_name#back)]+
1527			|
1528				unchecked(myCurrentNode.unchecked)
1529		]
1530		[#pushItem(myCurrentNode.method) method(myCurrentNode.method#back)]+
1531		"</method-permission>"
1532		;
1533
1534/**
1535The multiplicity element describes the multiplicity of the role that
1536participates in a relation.
1537
1538The multiplicity element must be one of the two following:
1539
1540	<multiplicity>One</multiplicity>
1541	<multiplicity>Many</multiplicity>
1542
1543Used in: ejb-relationship-role
1544**/
1545multiplicity(myCurrentNode : node)	::=
1546		'<' IDENTIFIER:"multiplicity"
1547		#continue
1548		[
1549				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1550		]?
1551		'>'
1552		PCDATA_LITERAL:myCurrentNode
1553		"</multiplicity>"
1554		;
1555
1556/**
1557The persistence-type element specifies an entity bean's persistence
1558management type.
1559
1560The persistence-type element must be one of the two following:
1561
1562	<persistence-type>Bean</persistence-type>
1563	<persistence-type>Container</persistence-type>
1564
1565Used in: entity
1566**/
1567persistence_type(myCurrentNode : node)	::=
1568		'<' IDENTIFIER:"persistence-type"
1569		#continue
1570		[
1571				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1572		]?
1573		'>'
1574		PCDATA_LITERAL:myCurrentNode
1575		"</persistence-type>"
1576		;
1577
1578/**
1579The prim-key-class element contains the fully-qualified name of an
1580entity bean's primary key class.
1581
1582If the definition of the primary key class is deferred to deployment
1583time, the prim-key-class element should specify java.lang.Object.
1584
1585Used in: entity
1586
1587Examples:
1588
1589	<prim-key-class>java.lang.String</prim-key-class>
1590
1591	<prim-key-class>com.wombat.empl.EmployeeID</prim-key-class>
1592
1593	<prim-key-class>java.lang.Object</prim-key-class>
1594
1595**/
1596prim_key_class(myCurrentNode : node)	::=
1597		'<' IDENTIFIER:"prim-key-class"
1598		#continue
1599		[
1600				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1601		]?
1602		'>'
1603		PCDATA_LITERAL:myCurrentNode
1604		"</prim-key-class>"
1605		;
1606
1607/**
1608The primkey-field element is used to specify the name of the primary
1609key field for an entity with container-managed persistence.
1610
1611The primkey-field must be one of the fields declared in the cmp-field
1612element, and the type of the field must be the same as the primary key
1613type.
1614
1615The primkey-field element is not used if the primary key maps to
1616multiple container-managed fields (i.e. the key is a compound key). In
1617this case, the fields of the primary key class must be public, and
1618their names must correspond to the field names of the entity bean
1619class that comprise the key.
1620
1621Used in: entity
1622
1623Example:
1624
1625	<primkey-field>EmployeeId</primkey-field>
1626
1627**/
1628primkey_field(myCurrentNode : node)	::=
1629		'<' IDENTIFIER:"primkey-field"
1630		#continue
1631		[
1632				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1633		]?
1634		'>'
1635		PCDATA_LITERAL:myCurrentNode
1636		"</primkey-field>"
1637		;
1638
1639/**
1640The query element is used to specify a finder or select query. It
1641contains
1642	- an optional description of the query
1643	- the specification of the finder or select
1644	  method it is used by
1645        - an optional specification of the result type mapping, if
1646          the query is for a select method and entity objects are
1647          returned.
1648    	- the EJB QL query string that defines the query.
1649
1650Queries that are expressible in EJB QL must use the ejb-ql element to
1651specify the query. If a query is not expressible in EJB QL, the
1652description element should be used to describe the semantics of the
1653query and the ejb-ql element should be empty.
1654
1655The result-type-mapping is an optional element. It can only be present
1656if the query-method specifies a select method that returns entity
1657objects.  The default value for the result-type-mapping element is
1658"Local".
1659
1660
1661Used in: entity
1662**/
1663query(myCurrentNode : node)	::=
1664		'<' IDENTIFIER:"query"
1665		#continue
1666		[
1667				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1668		]?
1669		'>'
1670		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
1671		query_method(myCurrentNode.query_method)
1672		[#pushItem(myCurrentNode.result_type_mapping) result_type_mapping(myCurrentNode.result_type_mapping#back)]?
1673		ejb_ql(myCurrentNode.ejb_ql)
1674		"</query>"
1675		;
1676
1677/**
1678The query-method element is used to specify the method for a finder or
1679select query.
1680
1681The method-name element specifies the name of a finder or select
1682method in the entity bean's implementation class.
1683
1684Each method-param must be defined for a query-method using the
1685method-params element.
1686
1687Used in: query
1688
1689Example:
1690
1691<query>
1692    <description>Method finds large orders</description>
1693    <query-method>
1694        <method-name>findLargeOrders</method-name>
1695        <method-params></method-params>
1696    </query-method>
1697    <ejb-ql>SELECT OBJECT(o) FROM Order o WHERE o.amount &gt; 1000</ejb-ql>
1698</query>
1699
1700**/
1701query_method(myCurrentNode : node)	::=
1702		'<' IDENTIFIER:"query-method"
1703		#continue
1704		[
1705				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1706		]?
1707		'>'
1708		method_name(myCurrentNode.method_name)
1709		method_params(myCurrentNode.method_params)
1710		"</query-method>"
1711		;
1712
1713/**
1714The reentrant element specifies whether an entity bean is reentrant or
1715not.
1716
1717The reentrant element must be one of the two following:
1718
1719	<reentrant>True</reentrant>
1720	<reentrant>False</reentrant>
1721
1722Used in: entity
1723**/
1724reentrant(myCurrentNode : node)	::=
1725		'<' IDENTIFIER:"reentrant"
1726		#continue
1727		[
1728				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1729		]?
1730		'>'
1731		PCDATA_LITERAL:myCurrentNode
1732		"</reentrant>"
1733		;
1734
1735/**
1736
1737The relationship-role-source element designates the source of a role
1738that participates in a relationship. A relationship-role-source
1739element uniquely identifies an entity bean.
1740
1741Used in: ejb-relationship-role
1742**/
1743relationship_role_source(myCurrentNode : node)	::=
1744		'<' IDENTIFIER:"relationship-role-source"
1745		#continue
1746		[
1747				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1748		]?
1749		'>'
1750		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
1751		ejb_name(myCurrentNode.ejb_name)
1752		"</relationship-role-source>"
1753		;
1754
1755/**
1756The relationships element describes the relationships in which
1757entity beans with container-managed persistence participate. The
1758relationships element contains an optional description; and a list of
1759ejb-relation elements, which specify the container managed
1760relationships.
1761
1762
1763Used in: ejb-jar
1764**/
1765relationships(myCurrentNode : node)	::=
1766		'<' IDENTIFIER:"relationships"
1767		#continue
1768		[
1769				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1770		]?
1771		'>'
1772		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
1773		[#pushItem(myCurrentNode.ejb_relation) ejb_relation(myCurrentNode.ejb_relation#back)]+
1774		"</relationships>"
1775		;
1776
1777/**
1778The remote element contains the fully-qualified name of the enterprise
1779bean's remote interface.
1780
1781Used in: ejb-ref, entity, session
1782
1783Example:
1784
1785<remote>com.wombat.empl.EmployeeService</remote>
1786**/
1787remote(myCurrentNode : node)	::=
1788		'<' IDENTIFIER:"remote"
1789		#continue
1790		[
1791				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1792		]?
1793		'>'
1794		PCDATA_LITERAL:myCurrentNode
1795		"</remote>"
1796		;
1797
1798/**
1799The res-auth element specifies whether the enterprise bean code signs
1800on programmatically to the resource manager, or whether the Container
1801will sign on to the resource manager on behalf of the enterprise bean. In the
1802latter case, the Container uses information that is supplied by the
1803Deployer.
1804
1805The value of this element must be one of the two following:
1806
1807	<res-auth>Application</res-auth>
1808	<res-auth>Container</res-auth>
1809
1810Used in: resource-ref
1811**/
1812res_auth(myCurrentNode : node)	::=
1813		'<' IDENTIFIER:"res-auth"
1814		#continue
1815		[
1816				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1817		]?
1818		'>'
1819		PCDATA_LITERAL:myCurrentNode
1820		"</res-auth>"
1821		;
1822
1823/**
1824The res-ref-name element specifies the name of a resource manager
1825connection factory reference.  The name is a JNDI name relative to the
1826java:comp/env context.  The name must be unique within an enterprise bean.
1827
1828Used in: resource-ref
1829**/
1830res_ref_name(myCurrentNode : node)	::=
1831		'<' IDENTIFIER:"res-ref-name"
1832		#continue
1833		[
1834				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1835		]?
1836		'>'
1837		PCDATA_LITERAL:myCurrentNode
1838		"</res-ref-name>"
1839		;
1840
1841/**
1842The res-sharing-scope element specifies whether connections obtained
1843through the given resource manager connection factory reference can be
1844shared. The value of this element, if specified, must be one of the
1845two following:
1846
1847	<res-sharing-scope>Shareable</res-sharing-scope>
1848	<res-sharing-scope>Unshareable</res-sharing-scope>
1849
1850The default value is Shareable.
1851
1852Used in: resource-ref
1853**/
1854res_sharing_scope(myCurrentNode : node)	::=
1855		'<' IDENTIFIER:"res-sharing-scope"
1856		#continue
1857		[
1858				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1859		]?
1860		'>'
1861		PCDATA_LITERAL:myCurrentNode
1862		"</res-sharing-scope>"
1863		;
1864
1865/**
1866The res-type element specifies the type of the data source. The type
1867is specified by the fully qualified Java language class or interface
1868expected to be implemented by the data source.
1869
1870Used in: resource-ref
1871**/
1872res_type(myCurrentNode : node)	::=
1873		'<' IDENTIFIER:"res-type"
1874		#continue
1875		[
1876				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1877		]?
1878		'>'
1879		PCDATA_LITERAL:myCurrentNode
1880		"</res-type>"
1881		;
1882
1883/**
1884The resource-env-ref element contains a declaration of an enterprise bean's
1885reference to an administered object associated with a resource
1886in the enterprise bean's environment.  It consists of an optional
1887description, the resource environment reference name, and an
1888indication of the resource environment reference type expected by
1889the enterprise bean code.
1890
1891Used in: entity, message-driven, session
1892
1893Example:
1894
1895<resource-env-ref>
1896    <resource-env-ref-name>jms/StockQueue</resource-env-ref-name>
1897    <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
1898</resource-env-ref>
1899**/
1900resource_env_ref(myCurrentNode : node)	::=
1901		'<' IDENTIFIER:"resource-env-ref"
1902		#continue
1903		[
1904				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1905		]?
1906		'>'
1907		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
1908		resource_env_ref_name(myCurrentNode.resource_env_ref_name)
1909		resource_env_ref_type(myCurrentNode.resource_env_ref_type)
1910		"</resource-env-ref>"
1911		;
1912
1913/**
1914The resource-env-ref-name element specifies the name of a resource
1915environment reference; its value is the environment entry name used in
1916the enterprise bean code.  The name is a JNDI name relative to the
1917java:comp/env context and must be unique within an enterprise bean.
1918
1919Used in: resource-env-ref
1920**/
1921resource_env_ref_name(myCurrentNode : node)	::=
1922		'<' IDENTIFIER:"resource-env-ref-name"
1923		#continue
1924		[
1925				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1926		]?
1927		'>'
1928		PCDATA_LITERAL:myCurrentNode
1929		"</resource-env-ref-name>"
1930		;
1931
1932/**
1933The resource-env-ref-type element specifies the type of a resource
1934environment reference.  It is the fully qualified name of a Java
1935language class or interface.
1936
1937Used in: resource-env-ref
1938**/
1939resource_env_ref_type(myCurrentNode : node)	::=
1940		'<' IDENTIFIER:"resource-env-ref-type"
1941		#continue
1942		[
1943				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1944		]?
1945		'>'
1946		PCDATA_LITERAL:myCurrentNode
1947		"</resource-env-ref-type>"
1948		;
1949
1950/**
1951The resource-ref element contains a declaration of an enterprise bean's
1952reference to an external resource. It consists of an optional
1953description, the resource manager connection factory reference name,
1954the indication of the resource manager connection factory type
1955expected by the enterprise bean code, the type of authentication
1956(Application or Container), and an optional specification of the
1957shareability of connections obtained from the resource (Shareable or
1958Unshareable).
1959
1960Used in: entity, message-driven, session
1961
1962Example:
1963
1964    <resource-ref>
1965	<res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
1966	<res-type>javax.sql.DataSource</res-type>
1967	<res-auth>Container</res-auth>
1968	<res-sharing-scope>Shareable</res-sharing-scope>
1969    </resource-ref>
1970**/
1971resource_ref(myCurrentNode : node)	::=
1972		'<' IDENTIFIER:"resource-ref"
1973		#continue
1974		[
1975				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
1976		]?
1977		'>'
1978		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
1979		res_ref_name(myCurrentNode.res_ref_name)
1980		res_type(myCurrentNode.res_type)
1981		res_auth(myCurrentNode.res_auth)
1982		[#pushItem(myCurrentNode.res_sharing_scope) res_sharing_scope(myCurrentNode.res_sharing_scope#back)]?
1983		"</resource-ref>"
1984		;
1985
1986/**
1987
1988The result-type-mapping element is used in the query element to specify
1989whether an abstract schema type returned by a query for a select method
1990is to be mapped to an EJBLocalObject or EJBObject type.
1991
1992The result-type-mapping element must be one of the following:
1993
1994        <result-type-mapping>Local</result-type-mapping>
1995        <result-type-mapping>Remote</result-type-mapping>
1996
1997Used in: query
1998**/
1999result_type_mapping(myCurrentNode : node)	::=
2000		'<' IDENTIFIER:"result-type-mapping"
2001		#continue
2002		[
2003				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2004		]?
2005		'>'
2006		PCDATA_LITERAL:myCurrentNode
2007		"</result-type-mapping>"
2008		;
2009
2010/**
2011The role-link element is a reference to a defined security role. The
2012role-link element must contain the name of one of the security roles
2013defined in the security-role elements.
2014
2015Used in: security-role-ref
2016**/
2017role_link(myCurrentNode : node)	::=
2018		'<' IDENTIFIER:"role-link"
2019		#continue
2020		[
2021				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2022		]?
2023		'>'
2024		PCDATA_LITERAL:myCurrentNode
2025		"</role-link>"
2026		;
2027
2028/**
2029The role-name element contains the name of a security role.
2030
2031The name must conform to the lexical rules for an NMTOKEN.
2032
2033Used in: method-permission, run-as, security-role, security-role-ref
2034**/
2035role_name(myCurrentNode : node)	::=
2036		'<' IDENTIFIER:"role-name"
2037		#continue
2038		[
2039				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2040		]?
2041		'>'
2042		PCDATA_LITERAL:myCurrentNode
2043		"</role-name>"
2044		;
2045
2046/**
2047The run-as element specifies the run-as identity to be used for the
2048execution of the enterprise bean. It contains an optional description, and
2049the name of a security role.
2050
2051Used in: security-identity
2052**/
2053run_as(myCurrentNode : node)	::=
2054		'<' IDENTIFIER:"run-as"
2055		#continue
2056		[
2057				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2058		]?
2059		'>'
2060		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
2061		role_name(myCurrentNode.role_name)
2062		"</run-as>"
2063		;
2064
2065/**
2066
2067The security-identity element specifies whether the caller's
2068security identity is to be used for the execution of the methods of
2069the enterprise bean or whether a specific run-as identity is to be
2070used. It contains an optional description and a specification of the
2071security identity to be used.
2072
2073Used in: entity, message-driven, session
2074**/
2075security_identity(myCurrentNode : node)	::=
2076		'<' IDENTIFIER:"security-identity"
2077		#continue
2078		[
2079				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2080		]?
2081		'>'
2082		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
2083		[
2084				use_caller_identity(myCurrentNode.use_caller_identity)
2085			|
2086				run_as(myCurrentNode.run_as)
2087		]
2088		"</security-identity>"
2089		;
2090
2091/**
2092The security-role element contains the definition of a security
2093role. The definition consists of an optional description of the
2094security role, and the security role name.
2095
2096Used in: assembly-descriptor
2097
2098Example:
2099
2100    <security-role>
2101	<description>
2102	    This role includes all employees who are authorized
2103	    to access the employee service application.
2104	</description>
2105	<role-name>employee</role-name>
2106    </security-role>
2107**/
2108security_role(myCurrentNode : node)	::=
2109		'<' IDENTIFIER:"security-role"
2110		#continue
2111		[
2112				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2113		]?
2114		'>'
2115		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
2116		role_name(myCurrentNode.role_name)
2117		"</security-role>"
2118		;
2119
2120/**
2121The security-role-ref element contains the declaration of a security
2122role reference in the enterprise bean's code. The declaration consists
2123of an optional description, the security role name used in the code,
2124and an optional link to a security role. If the security role is not
2125specified, the Deployer must choose an appropriate security role.
2126
2127The value of the role-name element must be the String used as the
2128parameter to the EJBContext.isCallerInRole(String roleName) method
2129or the HttpServletRequest.isUserInRole(String role) method.
2130
2131Used in: entity, session
2132
2133**/
2134security_role_ref(myCurrentNode : node)	::=
2135		'<' IDENTIFIER:"security-role-ref"
2136		#continue
2137		[
2138				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2139		]?
2140		'>'
2141		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
2142		role_name(myCurrentNode.role_name)
2143		[#pushItem(myCurrentNode.role_link) role_link(myCurrentNode.role_link#back)]?
2144		"</security-role-ref>"
2145		;
2146
2147/**
2148The session element declares an session bean. The declaration consists
2149of:
2150	- an optional description
2151	- an optional display name
2152	- an optional small icon file name
2153	- an optional large icon file name
2154	- a name assigned to the enterprise bean
2155	  in the deployment description
2156	- the names of the session bean's remote home and
2157	  remote interfaces, if any
2158	- the names of the session bean's local home and
2159	  local interfaces, if any
2160	- the session bean's implementation class
2161	- the session bean's state management type
2162	- the session bean's transaction management type
2163	- an optional declaration of the bean's environment entries
2164	- an optional declaration of the bean's EJB references
2165	- an optional declaration of the bean's local EJB references
2166	- an optional declaration of the security role references
2167	- an optional declaration of the security identity to be
2168          used for the execution of the bean's methods
2169	- an optional declaration of the bean's resource manager
2170	  connection factory references
2171	- an optional declaration of the bean's resource environment
2172	  references.
2173
2174The elements that are optional are "optional" in the sense that they
2175are omitted when if lists represented by them are empty.
2176
2177Either both the local-home and the local elements or both the
2178home and the remote elements must be specified for the session bean.
2179
2180Used in: enterprise-beans
2181**/
2182session(myCurrentNode : node)	::=
2183		'<' IDENTIFIER:"session"
2184		#continue
2185		[
2186				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2187		]?
2188		'>'
2189		[#pushItem(myCurrentNode.description) description(myCurrentNode.description#back)]?
2190		[#pushItem(myCurrentNode.display_name) display_name(myCurrentNode.display_name#back)]?
2191		[#pushItem(myCurrentNode.small_icon) small_icon(myCurrentNode.small_icon#back)]?
2192		[#pushItem(myCurrentNode.large_icon) large_icon(myCurrentNode.large_icon#back)]?
2193		ejb_name(myCurrentNode.ejb_name)
2194		[#pushItem(myCurrentNode.home) home(myCurrentNode.home#back)]?
2195		[#pushItem(myCurrentNode.remote) remote(myCurrentNode.remote#back)]?
2196		[#pushItem(myCurrentNode.local_home) local_home(myCurrentNode.local_home#back)]?
2197		[#pushItem(myCurrentNode.local) local(myCurrentNode.local#back)]?
2198		ejb_class(myCurrentNode.ejb_class)
2199		session_type(myCurrentNode.session_type)
2200		transaction_type(myCurrentNode.transaction_type)
2201		[#pushItem(myCurrentNode.env_entry) env_entry(myCurrentNode.env_entry#back)]*
2202		[#pushItem(myCurrentNode.ejb_ref) ejb_ref(myCurrentNode.ejb_ref#back)]*
2203		[#pushItem(myCurrentNode.ejb_local_ref) ejb_local_ref(myCurrentNode.ejb_local_ref#back)]*
2204		[#pushItem(myCurrentNode.security_role_ref) security_role_ref(myCurrentNode.security_role_ref#back)]*
2205		[#pushItem(myCurrentNode.security_identity) security_identity(myCurrentNode.security_identity#back)]?
2206		[#pushItem(myCurrentNode.resource_ref) resource_ref(myCurrentNode.resource_ref#back)]*
2207		[#pushItem(myCurrentNode.resource_env_ref) resource_env_ref(myCurrentNode.resource_env_ref#back)]*
2208		"</session>"
2209		;
2210
2211/**
2212The session-type element describes whether the session bean is a
2213stateful session or stateless session.
2214
2215The session-type element must be one of the two following:
2216
2217	<session-type>Stateful</session-type>
2218	<session-type>Stateless</session-type>
2219**/
2220session_type(myCurrentNode : node)	::=
2221		'<' IDENTIFIER:"session-type"
2222		#continue
2223		[
2224				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2225		]?
2226		'>'
2227		PCDATA_LITERAL:myCurrentNode
2228		"</session-type>"
2229		;
2230
2231/**
2232The small-icon element contains the name of a file
2233containing a small (16 x 16) icon image. The file
2234name is a relative path within the enterprise bean's
2235ejb-jar file.
2236
2237The image may be either in the JPEG or GIF format.
2238The icon can be used by tools.
2239
2240Used in: ejb-jar, entity, message-driven, session
2241
2242Example:
2243
2244<small-icon>employee-service-icon16x16.jpg</small-icon>
2245**/
2246small_icon(myCurrentNode : node)	::=
2247		'<' IDENTIFIER:"small-icon"
2248		#continue
2249		[
2250				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2251		]?
2252		'>'
2253		PCDATA_LITERAL:myCurrentNode
2254		"</small-icon>"
2255		;
2256
2257/**
2258The subscription-durability element specifies whether a JMS topic
2259subscription is intended to be durable or nondurable.
2260
2261The subscription-durability element must be one of the two following:
2262
2263	<subscription-durability>Durable</subscription-durability>
2264	<subscription-durability>NonDurable</subscription-durability>
2265
2266Used in: message-driven-destination
2267**/
2268subscription_durability(myCurrentNode : node)	::=
2269		'<' IDENTIFIER:"subscription-durability"
2270		#continue
2271		[
2272				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2273		]?
2274		'>'
2275		PCDATA_LITERAL:myCurrentNode
2276		"</subscription-durability>"
2277		;
2278
2279/**
2280The trans-attribute element specifies how the container must manage
2281the transaction boundaries when delegating a method invocation to an
2282enterprise bean's business method.
2283
2284The value of trans-attribute must be one of the following:
2285
2286
2287	<trans-attribute>NotSupported</trans-attribute>
2288	<trans-attribute>Supports</trans-attribute>
2289	<trans-attribute>Required</trans-attribute>
2290	<trans-attribute>RequiresNew</trans-attribute>
2291	<trans-attribute>Mandatory</trans-attribute>
2292	<trans-attribute>Never</trans-attribute>
2293
2294Used in: container-transaction
2295**/
2296trans_attribute(myCurrentNode : node)	::=
2297		'<' IDENTIFIER:"trans-attribute"
2298		#continue
2299		[
2300				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2301		]?
2302		'>'
2303		PCDATA_LITERAL:myCurrentNode
2304		"</trans-attribute>"
2305		;
2306
2307/**
2308The transaction-type element specifies an enterprise bean's
2309transaction management type.
2310
2311The transaction-type element must be one of the two following:
2312
2313	<transaction-type>Bean</transaction-type>
2314	<transaction-type>Container</transaction-type>
2315
2316Used in: message-driven, session
2317**/
2318transaction_type(myCurrentNode : node)	::=
2319		'<' IDENTIFIER:"transaction-type"
2320		#continue
2321		[
2322				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2323		]?
2324		'>'
2325		PCDATA_LITERAL:myCurrentNode
2326		"</transaction-type>"
2327		;
2328
2329/**
2330The unchecked element specifies that a method is not checked for authorization
2331by the container prior to invocation of the method.
2332
2333Used in: method-permission
2334**/
2335unchecked(myCurrentNode : node)	::=
2336		'<' IDENTIFIER:"unchecked"
2337		#continue
2338		[
2339				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2340		]?
2341		"/>"
2342		;
2343
2344/**
2345
2346The use-caller-identity element specifies that the caller's security
2347identity be used as the security identity for the execution of the
2348enterprise bean's methods.
2349
2350Used in: security-identity
2351**/
2352use_caller_identity(myCurrentNode : node)	::=
2353		'<' IDENTIFIER:"use-caller-identity"
2354		#continue
2355		[
2356				IDENTIFIER:"id" #continue '=' STRING_LITERAL:myCurrentNode.id
2357		]?
2358		"/>"
2359		;
2360
2361
2362
2363ANY_ATTRIBUTES(myCurrentNode : node)	::=
2364		[
2365			IDENTIFIER:sAttribute
2366			#continue '='
2367			STRING_LITERAL:sValue
2368			=> insert #evaluateVariable("myCurrentNode." + normalizeClauseName(sAttribute)) = sValue;
2369		]*;
2370ANY_ELEMENTS(myCurrentNode : node)	::=
2371		[
2372			'<'
2373			IDENTIFIER:sOpenElement
2374			#continue
2375			=> local sVariable = "myCurrentNode." + normalizeClauseName(sOpenElement);
2376			=> pushItem #evaluateVariable(sVariable);
2377			=> localref myElement = #evaluateVariable(sVariable + "#back");
2378			ANY_ATTRIBUTES(myElement)
2379			[
2380					"/>"
2381				|
2382					'>' ANY_ELEMENTS(myElement) "</" IDENTIFIER:sCloseElement
2383					=> if sOpenElement != sCloseElement error("'</" + sCloseElement + ">' found to close '<" + sOpenElement + ">'");
2384					'>'
2385			]
2386		]*;
2387
2388PCDATA_LITERAL	::=	#!ignore #continue [~'<']*:PCDATA_LITERAL;
2389EXTERNAL_DOCTYPE	::= "PUBLIC" #continue STRING_LITERAL STRING_LITERAL | "SYSTEM" #continue STRING_LITERAL;
2390IDENTIFIER : value	::=
2391		#!ignore #readIdentifier:IDENTIFIER
2392		['-' #readIdentifier]*:sIdentifier
2393		=> set IDENTIFIER += sIdentifier;
2394		;
2395STRING_LITERAL:value ::= '"' #!ignore #continue ->(:STRING_LITERAL)'"' | "'" #!ignore #continue ->(:STRING_LITERAL)"'";
2396ELEMENT_VALUE:value ::= ->(:ELEMENT_VALUE)"<";
2397