|
1 "{ Package: 'stx:goodies/xmlsuite/relaxng' }" |
|
2 |
|
3 "{ NameSpace: RNG }" |
|
4 |
|
5 ContentModelNode subclass:#OptionalNode |
|
6 instanceVariableNames:'' |
|
7 classVariableNames:'' |
|
8 poolDictionaries:'' |
|
9 category:'Relax NG-Content model' |
|
10 ! |
|
11 |
|
12 |
|
13 !OptionalNode methodsFor:'automaton support'! |
|
14 |
|
15 generateTransitionsIn:aContentModelAutomaton |
|
16 |
|
17 |
|
18 |
|
19 super generateTransitionsIn:aContentModelAutomaton. |
|
20 |
|
21 "/self children size > 1 ifTrue:[self halt]. |
|
22 |
|
23 self children do:[:child| |
|
24 aContentModelAutomaton |
|
25 makeTransitionsFrom:child patternsThatCanBeLast |
|
26 to:child patternsThatCanBeNext |
|
27 ] |
|
28 |
|
29 "Created: / 23-06-2005 / 10:57:47 / masca" |
|
30 ! |
|
31 |
|
32 patternsThatCanBeFirst |
|
33 "Superclass says that I am responsible to implement this method" |
|
34 |
|
35 ^self firstChild patternsThatCanBeFirst |
|
36 addAll:(self next patternsThatCanBeFirst); |
|
37 yourself |
|
38 |
|
39 "Created: / 30-04-2005 / 21:04:04 / janfrog" |
|
40 ! |
|
41 |
|
42 patternsThatCanBeLast |
|
43 "Superclass says that I am responsible to implement this method" |
|
44 |
|
45 ^self lastChild patternsThatCanBeLast |
|
46 addAll:(self prev patternsThatCanBeLast); |
|
47 yourself |
|
48 |
|
49 "Created: / 30-04-2005 / 21:04:04 / janfrog" |
|
50 ! ! |
|
51 |
|
52 !OptionalNode methodsFor:'printing'! |
|
53 |
|
54 groupModifierCharacter |
|
55 "Superclass says that I am responsible to implement this method" |
|
56 |
|
57 ^$? |
|
58 |
|
59 "Created: / 30-04-2005 / 18:58:40 / janfrog" |
|
60 ! ! |
|
61 |
|
62 !OptionalNode methodsFor:'testing'! |
|
63 |
|
64 canBeEmpty |
|
65 ^true |
|
66 |
|
67 "Created: / 02-05-2005 / 12:03:40 / janfrog" |
|
68 ! |
|
69 |
|
70 isOptionalNode |
|
71 ^ true |
|
72 |
|
73 "Created: / 14-05-2005 / 20:47:45 / janfrog" |
|
74 ! ! |
|
75 |
|
76 !OptionalNode methodsFor:'visiting'! |
|
77 |
|
78 acceptVisitor:aVisitor |
|
79 "Double dispatch back to the visitor, passing my type encoded in |
|
80 the selector (visitor pattern)" |
|
81 |
|
82 "stub code automatically generated - please change if required" |
|
83 |
|
84 ^ aVisitor visitOptionalNode:self |
|
85 |
|
86 "Created: / 02-05-2005 / 16:38:45 / janfrog" |
|
87 ! ! |
|
88 |
|
89 !OptionalNode class methodsFor:'documentation'! |
|
90 |
|
91 version |
|
92 ^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/relaxng/RNG__OptionalNode.st,v 1.1.1.1 2005-11-01 22:07:13 vranyj1 Exp $' |
|
93 ! ! |