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
data/test/ex101.exp
ADDED
data/test/ex101.in
ADDED
data/test/ex102.exp
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<beans>
|
3
|
+
<bean id="myDataSource" class="or.apache.commons.dhcp.BasicDataScope" destroy-method="close">
|
4
|
+
<property name="driverClassName">
|
5
|
+
<value>com.mysql.jdbc.Driver</value>
|
6
|
+
</property>
|
7
|
+
<property name="url">
|
8
|
+
<value>jdbc:mysql://localhost:3306/mydb</value>
|
9
|
+
</property>
|
10
|
+
<property name="username">
|
11
|
+
<value>root</value>
|
12
|
+
</property>
|
13
|
+
</bean>
|
14
|
+
</beans>
|
data/test/ex102.in
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
// @desc: elements and attributes
|
2
|
+
* beans
|
3
|
+
* bean
|
4
|
+
- id = myDataSource
|
5
|
+
- class = or.apache.commons.dhcp.BasicDataScope
|
6
|
+
- destroy-method = close
|
7
|
+
* property
|
8
|
+
- name=driverClassName
|
9
|
+
* value=com.mysql.jdbc.Driver
|
10
|
+
* property
|
11
|
+
- name =url
|
12
|
+
* value =jdbc:mysql://localhost:3306/mydb
|
13
|
+
* property
|
14
|
+
- name=username
|
15
|
+
* value=root
|
16
|
+
|
data/test/ex103.exp
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
<?xml version="1.1" encoding="EUC-JP"?>
|
2
|
+
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
3
|
+
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
4
|
+
<web-app>
|
5
|
+
<servlet>
|
6
|
+
<servlet-name>Hello</servlet-name>
|
7
|
+
<servlet-class>HelloServlet</servlet-class>
|
8
|
+
</servlet>
|
9
|
+
<servlet-mapping>
|
10
|
+
<servlet-name>Hello</servlet-name>
|
11
|
+
<url-pattern>/hello</url-pattern>
|
12
|
+
</servlet-mapping>
|
13
|
+
</web-app>
|
data/test/ex103.in
ADDED
data/test/ex104.exp
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<html>
|
3
|
+
<!-- HEAD COMMENT -->
|
4
|
+
<head>
|
5
|
+
<title>Kwaff Example</title>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
|
7
|
+
</head>
|
8
|
+
<!-- BODY COMMENT -->
|
9
|
+
<body class="main-body">
|
10
|
+
<div>
|
11
|
+
<span>
|
12
|
+
|
13
|
+
<!-- COMMENT -->
|
14
|
+
|
15
|
+
<!-- & ENPTY LINE -->
|
16
|
+
|
17
|
+
|
18
|
+
<font color="red">foobar</font>
|
19
|
+
|
20
|
+
</span>
|
21
|
+
</div>
|
22
|
+
<br/>
|
23
|
+
</body>
|
24
|
+
</html>
|
data/test/ex104.in
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
// @desc: xml comment
|
2
|
+
* html
|
3
|
+
# HEAD COMMENT
|
4
|
+
* head
|
5
|
+
* title = Kwaff Example
|
6
|
+
* meta
|
7
|
+
- http-equiv = Content-Type
|
8
|
+
- content = text/html; charset=ISO-8859-1
|
9
|
+
# BODY COMMENT
|
10
|
+
* body
|
11
|
+
- class = main-body
|
12
|
+
* div
|
13
|
+
* span
|
14
|
+
|
15
|
+
# COMMENT
|
16
|
+
|
17
|
+
# & ENPTY LINE
|
18
|
+
|
19
|
+
|
20
|
+
* font = foobar
|
21
|
+
- color = red
|
22
|
+
* br
|
23
|
+
|
24
|
+
|
data/test/ex105.exp
ADDED
data/test/ex105.in
ADDED
data/test/ex106.exp
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
|
5
|
+
<head>
|
6
|
+
<title>Kwaff Example</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
|
8
|
+
</head>
|
9
|
+
|
10
|
+
<body class="main-body">
|
11
|
+
<div>
|
12
|
+
<span>
|
13
|
+
|
14
|
+
<font color="red">foobar</font>
|
15
|
+
|
16
|
+
</span>
|
17
|
+
</div>
|
18
|
+
<br/>
|
19
|
+
</body>
|
20
|
+
|
21
|
+
|
22
|
+
</html>
|
data/test/ex106.in
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
// @desc: empty lines
|
2
|
+
|
3
|
+
* html
|
4
|
+
|
5
|
+
|
6
|
+
* head
|
7
|
+
* title = Kwaff Example
|
8
|
+
* meta
|
9
|
+
- http-equiv = Content-Type
|
10
|
+
- content = text/html; charset=ISO-8859-1
|
11
|
+
|
12
|
+
* body
|
13
|
+
- class = main-body
|
14
|
+
* div
|
15
|
+
* span
|
16
|
+
|
17
|
+
* font = foobar
|
18
|
+
- color = red
|
19
|
+
* br
|
20
|
+
|
21
|
+
|
data/test/ex107.exp
ADDED
data/test/ex107.in
ADDED
data/test/ex111.exp
ADDED
data/test/ex111.in
ADDED
data/test/ex112.exp
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Kwaff Example</title>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
|
6
|
+
</head>
|
7
|
+
<body class="main-body">
|
8
|
+
<div>
|
9
|
+
<span>
|
10
|
+
<font color="red">foobar</font>
|
11
|
+
</span>
|
12
|
+
</div>
|
13
|
+
<br/>
|
14
|
+
</body>
|
15
|
+
</html>
|
data/test/ex112.in
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
// @desc: nested element
|
2
|
+
* html
|
3
|
+
* head
|
4
|
+
* title = Kwaff Example
|
5
|
+
* meta
|
6
|
+
- http-equiv = Content-Type
|
7
|
+
- content = text/html; charset=ISO-8859-1
|
8
|
+
* body
|
9
|
+
- class = main-body
|
10
|
+
* div
|
11
|
+
* span
|
12
|
+
* font = foobar
|
13
|
+
- color = red
|
14
|
+
* br
|
15
|
+
|
16
|
+
|
data/test/ex113.exp
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<html>
|
3
|
+
|
4
|
+
|
5
|
+
<head>
|
6
|
+
<title>Kwaff Example</title>
|
7
|
+
<meta/>
|
8
|
+
- http-equiv = Content-Type - content = text/html; charset=ISO-8859-1</head>
|
9
|
+
|
10
|
+
|
11
|
+
<body class="main-body">
|
12
|
+
<div>
|
13
|
+
<span>
|
14
|
+
|
15
|
+
<font color="red">foobar</font>
|
16
|
+
|
17
|
+
</span>
|
18
|
+
</div>
|
19
|
+
<br/>
|
20
|
+
</body>
|
21
|
+
|
22
|
+
|
23
|
+
</html>
|
data/test/ex113.in
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
// @desc: empty lines
|
2
|
+
|
3
|
+
* html
|
4
|
+
|
5
|
+
|
6
|
+
* head
|
7
|
+
* title = Kwaff Example
|
8
|
+
* meta
|
9
|
+
|
10
|
+
- http-equiv = Content-Type
|
11
|
+
- content = text/html; charset=ISO-8859-1
|
12
|
+
|
13
|
+
* body
|
14
|
+
- class = main-body
|
15
|
+
* div
|
16
|
+
* span
|
17
|
+
|
18
|
+
* font = foobar
|
19
|
+
- color = red
|
20
|
+
* br
|
21
|
+
|
22
|
+
|
data/test/ex114.exp
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<html>
|
3
|
+
<body style="< > & " '">
|
4
|
+
<h1>< > & " '</h1>
|
5
|
+
<p>< > & " '
|
6
|
+
< > & " '</p>
|
7
|
+
<div>< > & " '
|
8
|
+
< > & " '</div>
|
9
|
+
<div>< > & " '
|
10
|
+
< > & " '</div>
|
11
|
+
</body>
|
12
|
+
</html>
|
data/test/ex114.in
ADDED
data/test/ex115.exp
ADDED
data/test/ex115.in
ADDED
data/test/ex121.exp
ADDED
data/test/ex121.in
ADDED
data/test/ex122.exp
ADDED