0
|
1 |
"{ Package: 'stx:goodies/xmlsuite/relaxng' }"
|
|
2 |
|
|
3 |
"{ NameSpace: RNG }"
|
|
4 |
|
|
5 |
Object subclass:#Pattern
|
|
6 |
instanceVariableNames:'node bindingInfo'
|
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'Relax NG-Patterns'
|
|
10 |
!
|
|
11 |
|
|
12 |
|
|
13 |
!Pattern class methodsFor:'instance creation'!
|
|
14 |
|
|
15 |
new
|
|
16 |
^ self basicNew initialize.
|
|
17 |
|
|
18 |
"Created: / 14-05-2005 / 22:41:43 / janfrog"
|
|
19 |
! !
|
|
20 |
|
|
21 |
!Pattern methodsFor:'accessing'!
|
|
22 |
|
|
23 |
bindingInfo
|
|
24 |
|
|
25 |
^(node inDefine and:[node parent notNil])
|
|
26 |
ifTrue:[bindingInfo mergeWith:node parent bindingInfo]
|
|
27 |
ifFalse:[bindingInfo]
|
|
28 |
|
|
29 |
"Modified: / 13-05-2005 / 15:32:24 / masca"
|
|
30 |
"Created: / 14-05-2005 / 22:30:15 / janfrog"
|
|
31 |
!
|
|
32 |
|
|
33 |
name
|
|
34 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
35 |
|
|
36 |
^ self subclassResponsibility
|
|
37 |
|
|
38 |
"Created: / 14-05-2005 / 18:22:18 / janfrog"
|
|
39 |
!
|
|
40 |
|
|
41 |
node
|
|
42 |
^ node
|
|
43 |
|
|
44 |
"Created: / 14-05-2005 / 18:20:29 / janfrog"
|
|
45 |
!
|
|
46 |
|
|
47 |
node:aPatternNode
|
|
48 |
node := aPatternNode.
|
|
49 |
|
|
50 |
"Created: / 14-05-2005 / 18:20:29 / janfrog"
|
|
51 |
! !
|
|
52 |
|
|
53 |
!Pattern methodsFor:'initialization'!
|
|
54 |
|
|
55 |
initialize
|
|
56 |
|
|
57 |
bindingInfo := BindingInfo new
|
|
58 |
|
|
59 |
"Created: / 14-05-2005 / 22:42:09 / janfrog"
|
|
60 |
!
|
|
61 |
|
|
62 |
initializeBindingInfoFromAttributes:anAttributes
|
|
63 |
|
|
64 |
bindingInfo initializeFromAttributes:anAttributes
|
|
65 |
|
|
66 |
"Created: / 14-05-2005 / 22:39:03 / janfrog"
|
|
67 |
"Modified: / 16-05-2005 / 15:08:00 / masca"
|
|
68 |
!
|
|
69 |
|
|
70 |
postParseFor:aSchema
|
|
71 |
|
|
72 |
"Created: / 14-05-2005 / 21:21:00 / janfrog"
|
|
73 |
! !
|
|
74 |
|
|
75 |
!Pattern methodsFor:'printing'!
|
|
76 |
|
|
77 |
nameForPrint
|
|
78 |
"raise an error: must be redefined in concrete subclass(es)"
|
|
79 |
|
|
80 |
^ self subclassResponsibility
|
|
81 |
|
|
82 |
"Created: / 19-05-2005 / 09:54:54 / masca"
|
|
83 |
! !
|
|
84 |
|
|
85 |
!Pattern methodsFor:'queries'!
|
|
86 |
|
|
87 |
acceptsEmptyStringAsContent
|
|
88 |
|
|
89 |
^false
|
|
90 |
|
|
91 |
"Created: / 14-06-2005 / 12:15:20 / masca"
|
|
92 |
!
|
|
93 |
|
|
94 |
hasComplexContentModel
|
|
95 |
|
|
96 |
^false
|
|
97 |
|
|
98 |
"Created: / 16-05-2005 / 16:31:35 / masca"
|
|
99 |
!
|
|
100 |
|
|
101 |
isValidObject: anObject
|
|
102 |
|
|
103 |
^self bindingInfo isValidObject: anObject
|
|
104 |
|
|
105 |
"Created: / 25-08-2005 / 12:45:49 / masca"
|
|
106 |
! !
|
|
107 |
|
|
108 |
!Pattern methodsFor:'testing'!
|
|
109 |
|
|
110 |
isComplexTypePattern
|
|
111 |
^ false
|
|
112 |
|
|
113 |
"Created: / 14-05-2005 / 20:34:31 / janfrog"
|
|
114 |
!
|
|
115 |
|
|
116 |
isForAttribute
|
|
117 |
^false
|
|
118 |
|
|
119 |
"Created: / 14-05-2005 / 20:32:25 / janfrog"
|
|
120 |
!
|
|
121 |
|
|
122 |
isForElement
|
|
123 |
^ self isForAttribute not
|
|
124 |
|
|
125 |
"Created: / 14-05-2005 / 20:32:06 / janfrog"
|
|
126 |
!
|
|
127 |
|
|
128 |
isListPattern
|
|
129 |
^ false
|
|
130 |
|
|
131 |
"Created: / 14-05-2005 / 20:34:31 / janfrog"
|
|
132 |
!
|
|
133 |
|
|
134 |
isPCDataPattern
|
|
135 |
^ false
|
|
136 |
|
|
137 |
"Created: / 14-05-2005 / 20:34:31 / janfrog"
|
|
138 |
! !
|
|
139 |
|
|
140 |
!Pattern class methodsFor:'documentation'!
|
|
141 |
|
|
142 |
version
|
|
143 |
^ '$Header: /opt/data/cvs/stx/goodies/xmlsuite/relaxng/RNG__Pattern.st,v 1.1.1.1 2005-11-01 22:07:14 vranyj1 Exp $'
|
|
144 |
! !
|