kwaff 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +340 -0
- data/ChangeLog.txt +118 -0
- data/README.txt +96 -0
- data/bin/kwaff +131 -0
- data/doc/docstyle.css +307 -0
- data/doc/examples.html +1283 -0
- data/doc/users-guide.html +395 -0
- data/examples/Makefile +17 -0
- data/examples/ant/Makefile +7 -0
- data/examples/ant/build.kwaff +57 -0
- data/examples/hibernate/AuctionItem.hbm.kwaff +45 -0
- data/examples/hibernate/Bid.hbm.kwaff +42 -0
- data/examples/hibernate/Makefile +9 -0
- data/examples/hibernate/User.hbm.kwaff +65 -0
- data/examples/hibernate/hibernate.cfg.kwaff +17 -0
- data/examples/seasar2/Makefile +9 -0
- data/examples/seasar2/seasar2.kwaff +62 -0
- data/examples/servlet/Makefile +9 -0
- data/examples/servlet/web.kwaff +37 -0
- data/examples/spring/Makefile +9 -0
- data/examples/spring/applicationContext.kwaff +147 -0
- data/examples/xhtml/Makefile +9 -0
- data/examples/xhtml/README.kwaff +84 -0
- data/examples/xi/Makefile +9 -0
- data/examples/xi/bbs.kwaff +58 -0
- data/lib/kwaff.rb +85 -0
- data/lib/kwaff/doctype.rb +124 -0
- data/lib/kwaff/doctypes.yaml +138 -0
- data/lib/kwaff/errors.rb +26 -0
- data/lib/kwaff/node.rb +101 -0
- data/lib/kwaff/optparse.rb +101 -0
- data/lib/kwaff/orderedhash.rb +56 -0
- data/lib/kwaff/parser.rb +342 -0
- data/lib/kwaff/rexml.rb +394 -0
- data/lib/kwaff/translator.rb +275 -0
- data/setup.rb +1331 -0
- data/test/ex101.exp +10 -0
- data/test/ex101.in +8 -0
- data/test/ex102.exp +14 -0
- data/test/ex102.in +16 -0
- data/test/ex103.exp +13 -0
- data/test/ex103.in +13 -0
- data/test/ex104.exp +24 -0
- data/test/ex104.in +24 -0
- data/test/ex105.exp +12 -0
- data/test/ex105.in +18 -0
- data/test/ex106.exp +22 -0
- data/test/ex106.in +21 -0
- data/test/ex107.exp +14 -0
- data/test/ex107.in +14 -0
- data/test/ex111.exp +7 -0
- data/test/ex111.in +13 -0
- data/test/ex112.exp +15 -0
- data/test/ex112.in +16 -0
- data/test/ex113.exp +23 -0
- data/test/ex113.in +22 -0
- data/test/ex114.exp +12 -0
- data/test/ex114.in +17 -0
- data/test/ex115.exp +9 -0
- data/test/ex115.in +12 -0
- data/test/ex121.exp +10 -0
- data/test/ex121.in +8 -0
- data/test/ex122.exp +10 -0
- data/test/ex122.in +8 -0
- data/test/ex301.exp +13 -0
- data/test/ex301.in +14 -0
- data/test/ex302.exp +15 -0
- data/test/ex302.in +18 -0
- data/test/ex303.exp +15 -0
- data/test/ex303.in +16 -0
- data/test/ex304.exp +17 -0
- data/test/ex304.in +15 -0
- data/test/ex311.exp +18 -0
- data/test/ex311.in +32 -0
- data/test/ex312.exp +21 -0
- data/test/ex312.in +18 -0
- data/test/ex313.exp +20 -0
- data/test/ex313.in +33 -0
- data/test/ex314.exp +34 -0
- data/test/ex314.in +24 -0
- data/test/ex801.exp +16 -0
- data/test/ex801.in +15 -0
- data/test/test.rb +273 -0
- data/todo.txt +1 -0
- metadata +132 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
//
|
2
|
+
// source: hibernate-3.0/eg/org/hibernate/auction/AuctionItem.hbm.xml
|
3
|
+
//
|
4
|
+
?doctype = @hibernate-mapping30
|
5
|
+
|
6
|
+
* hibernate-mapping
|
7
|
+
- package = org.hibernate.auction
|
8
|
+
|
9
|
+
* import
|
10
|
+
- class = AuctionInfo
|
11
|
+
|
12
|
+
* class
|
13
|
+
- name = AuctionItem
|
14
|
+
* comment = An item that is being auctioned.
|
15
|
+
|
16
|
+
* id
|
17
|
+
- name = id
|
18
|
+
* generator
|
19
|
+
- class = native
|
20
|
+
|
21
|
+
* natural-id
|
22
|
+
* many-to-one
|
23
|
+
- name = seller
|
24
|
+
* property
|
25
|
+
- name = description
|
26
|
+
- length = 200
|
27
|
+
|
28
|
+
* property
|
29
|
+
- name = ends
|
30
|
+
|
31
|
+
* property
|
32
|
+
- name = condition
|
33
|
+
|
34
|
+
* many-to-one
|
35
|
+
- name = successfulBid
|
36
|
+
- outer-join = false
|
37
|
+
|
38
|
+
* bag
|
39
|
+
- name = bids
|
40
|
+
- cascade = all
|
41
|
+
- inverse = true
|
42
|
+
* key
|
43
|
+
- column = item
|
44
|
+
* one-to-many
|
45
|
+
- class = Bid
|
@@ -0,0 +1,42 @@
|
|
1
|
+
//
|
2
|
+
// source: hibernate-3.0/eg/org/hibernate/auction/Bid.hbm.xml
|
3
|
+
//
|
4
|
+
?doctype = @hibernate-mapping30
|
5
|
+
|
6
|
+
* hibernate-mapping
|
7
|
+
- package = org.hibernate.auction
|
8
|
+
|
9
|
+
* class
|
10
|
+
- name = Bid
|
11
|
+
- discriminator-value = N
|
12
|
+
* comment = A bid or "buy now" for an item.
|
13
|
+
|
14
|
+
* id
|
15
|
+
- name = id
|
16
|
+
* generator
|
17
|
+
- class = native
|
18
|
+
|
19
|
+
* discriminator
|
20
|
+
- type = char
|
21
|
+
* column
|
22
|
+
- name = isBuyNow
|
23
|
+
* comment = Y if a "buy now", N if a regular bid.
|
24
|
+
|
25
|
+
* natural-id
|
26
|
+
* many-to-one
|
27
|
+
- name = item
|
28
|
+
* property
|
29
|
+
- name = amount
|
30
|
+
|
31
|
+
* property
|
32
|
+
- name = datetime
|
33
|
+
- not-null = true
|
34
|
+
- column = `datetime`
|
35
|
+
|
36
|
+
* many-to-one
|
37
|
+
- name = bidder
|
38
|
+
- not-null = true
|
39
|
+
|
40
|
+
* subclass
|
41
|
+
- name = BuyNow
|
42
|
+
- discriminator-value = Y
|
@@ -0,0 +1,65 @@
|
|
1
|
+
//
|
2
|
+
// source: hibernate-3.0/eg/org/hibernate/auction/User.hbm.xml
|
3
|
+
//
|
4
|
+
? doctype = @hibernate-mapping30
|
5
|
+
|
6
|
+
* hibernate-mapping
|
7
|
+
- package = org.hibernate.auction
|
8
|
+
|
9
|
+
* class
|
10
|
+
- name = User
|
11
|
+
- table = AuctionUser
|
12
|
+
- lazy = true
|
13
|
+
* comment = Users may bid for or sell auction items.
|
14
|
+
|
15
|
+
* id
|
16
|
+
- name = id
|
17
|
+
* generator
|
18
|
+
- class = native
|
19
|
+
|
20
|
+
* natural-id
|
21
|
+
- mutable = true
|
22
|
+
* property
|
23
|
+
- name = userName
|
24
|
+
- length = 10
|
25
|
+
|
26
|
+
* property
|
27
|
+
- name = password
|
28
|
+
- not-null = true
|
29
|
+
- length = 15
|
30
|
+
- column = `password`
|
31
|
+
|
32
|
+
* property
|
33
|
+
- name = email
|
34
|
+
|
35
|
+
* component
|
36
|
+
- name = name
|
37
|
+
* property
|
38
|
+
- name = firstName
|
39
|
+
- length = 50
|
40
|
+
- not-null = true
|
41
|
+
* property
|
42
|
+
- name = initial
|
43
|
+
- column = `initial`
|
44
|
+
* property
|
45
|
+
- name = lastName
|
46
|
+
- length = 50
|
47
|
+
- not-null = true
|
48
|
+
|
49
|
+
* bag
|
50
|
+
- name = bids
|
51
|
+
- inverse = true
|
52
|
+
- cascade = save-update,lock
|
53
|
+
* key
|
54
|
+
- column = bidder
|
55
|
+
* one-to-many
|
56
|
+
- class = Bid
|
57
|
+
|
58
|
+
* bag
|
59
|
+
- name = auctions
|
60
|
+
- inverse = true
|
61
|
+
- cascade = save-update,lock
|
62
|
+
* key
|
63
|
+
- column = seller
|
64
|
+
* one-to-many
|
65
|
+
- class = AuctionItem
|
@@ -0,0 +1,17 @@
|
|
1
|
+
//
|
2
|
+
// source: hibernate-3.0/etc/hibernate.cfg.xml
|
3
|
+
//
|
4
|
+
?doctype = @hibernate-configuration30
|
5
|
+
|
6
|
+
* hibernate-configuration
|
7
|
+
|
8
|
+
* session-factory
|
9
|
+
- name = foo
|
10
|
+
* property = true
|
11
|
+
- name = show_sql
|
12
|
+
* mapping
|
13
|
+
- resource = org/hibernate/test/Simple.hbm.xml
|
14
|
+
* class-cache
|
15
|
+
- usage = read-write
|
16
|
+
- class = org.hibernate.test.Simple
|
17
|
+
- region = Simple
|
@@ -0,0 +1,62 @@
|
|
1
|
+
//
|
2
|
+
// from http://www.seasar.org/DIContainer.html#Example
|
3
|
+
//
|
4
|
+
? encoding = Shift_JIS
|
5
|
+
? doctype = @seasar2
|
6
|
+
|
7
|
+
* components
|
8
|
+
|
9
|
+
# constructor injection
|
10
|
+
* component
|
11
|
+
- name = hello
|
12
|
+
- class = examples.dicon.HelloConstructorInjection
|
13
|
+
* arg = "Hello World!"
|
14
|
+
|
15
|
+
# setter injection
|
16
|
+
* component
|
17
|
+
- class = examples.dicon.HelloSetterInjection
|
18
|
+
* property = "Hello World!"
|
19
|
+
- name = message
|
20
|
+
|
21
|
+
# method injection
|
22
|
+
* component
|
23
|
+
- class = examples.dicon.HelloMethodInjection
|
24
|
+
* initMethod
|
25
|
+
- name = addMessage
|
26
|
+
* arg = "Hello "
|
27
|
+
* initMethod = #self.addMessage("World!")
|
28
|
+
|
29
|
+
# auto binding with constructor injection
|
30
|
+
* component
|
31
|
+
- class = java.util.HashMap
|
32
|
+
* initMethod
|
33
|
+
- name = put
|
34
|
+
* arg = "hello"
|
35
|
+
* arg = "Hello World!"
|
36
|
+
* component
|
37
|
+
- autoBinding = auto
|
38
|
+
- class = examples.dicon.autobinding.AutoHelloConstructorInjection
|
39
|
+
|
40
|
+
# auto binding with setter injection
|
41
|
+
* component
|
42
|
+
- class = java.util.HashMap
|
43
|
+
* initMethod
|
44
|
+
- name = put
|
45
|
+
* arg = "hello"
|
46
|
+
* arg = "Hello World!"
|
47
|
+
* component
|
48
|
+
- autoBinding = auto
|
49
|
+
- class = examples.dicon.autobinding.AutoHelloSetterInjection
|
50
|
+
|
51
|
+
# AOP
|
52
|
+
* component
|
53
|
+
- name = traceInterceptor
|
54
|
+
- class = org.seasar.framework.aop.interceptors.TraceInterceptor
|
55
|
+
* component
|
56
|
+
- class = java.util.ArrayList
|
57
|
+
* aspect = traceInterceptor
|
58
|
+
* component
|
59
|
+
- class = java.util.Date
|
60
|
+
* arg = 0
|
61
|
+
* aspect = traceInterceptor
|
62
|
+
- pointcut = getTime, hashCode
|
@@ -0,0 +1,37 @@
|
|
1
|
+
//
|
2
|
+
// example for web.xml of J2EE Application
|
3
|
+
//
|
4
|
+
? encoding = ISO-8859-1
|
5
|
+
? doctype = @web-app23
|
6
|
+
|
7
|
+
* web-app
|
8
|
+
|
9
|
+
# Servlet Definition
|
10
|
+
* servlet
|
11
|
+
* servlet-name = Hello
|
12
|
+
* servlet-class = my.HelloServlet
|
13
|
+
* init-param
|
14
|
+
* param-name = request.encoding
|
15
|
+
* param-value = Windows-31J
|
16
|
+
* description = encoding of http request
|
17
|
+
* servlet
|
18
|
+
* servlet-name = action
|
19
|
+
* servlet-class = org.apache.struts.action.ActionServlet
|
20
|
+
* load-on-startup = 2
|
21
|
+
|
22
|
+
# Servlet Mappings
|
23
|
+
* servlet-mapping
|
24
|
+
* servlet-name = Hello
|
25
|
+
* url-pattern = /hello
|
26
|
+
* servlet-maping
|
27
|
+
* servlet-name = action
|
28
|
+
* url-pattern = *.do
|
29
|
+
|
30
|
+
# Taglib
|
31
|
+
* taglib
|
32
|
+
* taglib-uri = /tags/struts-bean
|
33
|
+
* taglib-location = /WEB-INF/struts-bean.tld
|
34
|
+
* taglib
|
35
|
+
* taglib-uri = /tags/struts-tiles
|
36
|
+
* taglib-location = /WEB-INF/struts-tiles.tld
|
37
|
+
|
@@ -0,0 +1,147 @@
|
|
1
|
+
//
|
2
|
+
// from spring-framework-1.2.1/samples/jpetstore/war/WEB-INF/applicationContext.xml
|
3
|
+
//
|
4
|
+
? encoding = UTF-8
|
5
|
+
? doctype = @spring-beans
|
6
|
+
|
7
|
+
* beans
|
8
|
+
|
9
|
+
# Application context definition for JPetStore's business layer.
|
10
|
+
# Contains bean references to the transaction manager and to the DAOs in
|
11
|
+
# dataAccessContext-local/jta.xml (see web.xml's "contextConfigLocation").
|
12
|
+
|
13
|
+
|
14
|
+
# ========================= GENERAL DEFINITIONS =========================
|
15
|
+
|
16
|
+
# Configurer that replaces ${...} placeholders with values from properties files
|
17
|
+
# (in this case, mail and JDBC related properties)
|
18
|
+
* bean
|
19
|
+
- id = propertyConfigurer
|
20
|
+
- class = org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
|
21
|
+
* property
|
22
|
+
- name = locations
|
23
|
+
* list
|
24
|
+
* value = WEB-INF/mail.properties
|
25
|
+
* value = WEB-INF/jdbc.properties
|
26
|
+
|
27
|
+
# MailSender used by EmailAdvice
|
28
|
+
* bean
|
29
|
+
- id = mailSender
|
30
|
+
- class = org.springframework.mail.javamail.JavaMailSenderImpl
|
31
|
+
* property
|
32
|
+
- name = host
|
33
|
+
- value = ${mail.host}
|
34
|
+
|
35
|
+
|
36
|
+
# ========================= BUSINESS OBJECT DEFINITIONS ========================
|
37
|
+
|
38
|
+
# Generic validator for Account objects, to be used for example by the Spring web tier
|
39
|
+
* bean
|
40
|
+
- id = accountValidator
|
41
|
+
- class = org.springframework.samples.jpetstore.domain.logic.AccountValidator
|
42
|
+
|
43
|
+
# Generic validator for Order objects, to be used for example by the Spring web tier
|
44
|
+
* bean
|
45
|
+
- id = orderValidator
|
46
|
+
- class = org.springframework.samples.jpetstore.domain.logic.OrderValidator
|
47
|
+
|
48
|
+
# AOP advice used to send confirmation email after order has been submitted
|
49
|
+
* bean
|
50
|
+
- id = emailAdvice
|
51
|
+
- class = org.springframework.samples.jpetstore.domain.logic.SendOrderConfirmationEmailAdvice
|
52
|
+
* property
|
53
|
+
- name = mailSender
|
54
|
+
* ref
|
55
|
+
- local = mailSender
|
56
|
+
|
57
|
+
# Advisor encapsulating email advice
|
58
|
+
* bean
|
59
|
+
- id = emailAdvisor
|
60
|
+
- class = org.springframework.aop.support.RegexpMethodPointcutAdvisor
|
61
|
+
* constructor-arg
|
62
|
+
* ref
|
63
|
+
- local = emailAdvice
|
64
|
+
* property
|
65
|
+
- name = pattern
|
66
|
+
* value = .*insertOrder.*
|
67
|
+
|
68
|
+
# A parent bean definition which is a base definition for transaction proxies.
|
69
|
+
# It's marked as abstract, since it's not supposed to be instantiated itself.
|
70
|
+
# We set shared transaction attributes here, following our naming patterns.
|
71
|
+
# The attributes can still be overridden in child bean definitions.
|
72
|
+
* bean
|
73
|
+
- id = baseTransactionProxy
|
74
|
+
- class = org.springframework.transaction.interceptor.TransactionProxyFactoryBean
|
75
|
+
- abstract = true
|
76
|
+
* property
|
77
|
+
- name = transactionManager
|
78
|
+
* ref
|
79
|
+
- bean = transactionManager
|
80
|
+
* property
|
81
|
+
- name = transactionAttributes
|
82
|
+
* props
|
83
|
+
* prop = PROPAGATION_REQUIRED
|
84
|
+
- key = insert*
|
85
|
+
* prop = PROPAGATION_REQUIRED
|
86
|
+
- key = update*
|
87
|
+
* prop = PROPAGATION_REQUIRED,readOnly
|
88
|
+
- key = *
|
89
|
+
|
90
|
+
# JPetStore primary business object (default implementation), as an inner bean wrapped
|
91
|
+
# by an outer transactional proxy. The two bean definitions could have been separate,
|
92
|
+
# but this is cleaner as there is no need to ever access the unwrapped object.
|
93
|
+
* bean
|
94
|
+
- id = petStore
|
95
|
+
- parent = baseTransactionProxy
|
96
|
+
* property
|
97
|
+
- name = target
|
98
|
+
* bean
|
99
|
+
- class = org.springframework.samples.jpetstore.domain.logic.PetStoreImpl
|
100
|
+
* property
|
101
|
+
- name = accountDao
|
102
|
+
* ref
|
103
|
+
- bean = accountDao
|
104
|
+
* property
|
105
|
+
- name = categoryDao
|
106
|
+
* ref
|
107
|
+
- bean = categoryDao
|
108
|
+
* property
|
109
|
+
- name = productDao
|
110
|
+
* ref
|
111
|
+
- bean = productDao
|
112
|
+
* property
|
113
|
+
- name = itemDao
|
114
|
+
* ref
|
115
|
+
- bean = itemDao
|
116
|
+
* property
|
117
|
+
- name = orderDao
|
118
|
+
* ref
|
119
|
+
- bean = orderDao
|
120
|
+
# Uncomment the following in order to enable mail sending aspect
|
121
|
+
* property
|
122
|
+
- name = postInterceptors
|
123
|
+
* list
|
124
|
+
* ref
|
125
|
+
- local = emailAdvisor
|
126
|
+
|
127
|
+
|
128
|
+
# ========================= REMOTE EXPORTER DEFINITIONS ========================
|
129
|
+
|
130
|
+
# RMI exporter for the JPetStore OrderService
|
131
|
+
# Commented out by default to avoid conflicts with EJB containers
|
132
|
+
* bean
|
133
|
+
- id = order-rmi
|
134
|
+
- class = org.springframework.remoting.rmi.RmiServiceExporter
|
135
|
+
* property
|
136
|
+
- name = service
|
137
|
+
* ref
|
138
|
+
- local = petStore
|
139
|
+
* property
|
140
|
+
- name = serviceInterface
|
141
|
+
* value = org.springframework.samples.jpetstore.domain.logic.OrderService
|
142
|
+
* property
|
143
|
+
- name = serviceName
|
144
|
+
* value = order
|
145
|
+
* property
|
146
|
+
- name = registryPort
|
147
|
+
* value = 1099
|