xsdvi 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +364 -6
- data/lib/xsdvi/cli.rb +162 -10
- data/lib/xsdvi/comparison/dual_generator.rb +190 -0
- data/lib/xsdvi/comparison/html_generator.rb +181 -0
- data/lib/xsdvi/comparison/java_manager.rb +124 -0
- data/lib/xsdvi/comparison/metadata_extractor.rb +75 -0
- data/lib/xsdvi/svg/generator.rb +1 -0
- data/lib/xsdvi/svg/symbol.rb +39 -30
- data/lib/xsdvi/svg/symbols/attribute.rb +1 -1
- data/lib/xsdvi/svg/symbols/element.rb +1 -1
- data/lib/xsdvi/version.rb +1 -1
- data/lib/xsdvi/xsd_handler.rb +459 -24
- data/lib/xsdvi.rb +6 -0
- data/resources/comparison/template.html +234 -0
- data/resources/svg/defined_symbols.svg +9 -9
- data/resources/svg/menu_buttons.svg +6 -6
- data/resources/svg/script.js +264 -264
- data/resources/svg/style.css +28 -28
- data/resources/svg/style.html +2 -2
- metadata +7 -2
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>XsdVi Comparison: {{SCHEMA_NAME}}</title>
|
|
7
|
+
<style>
|
|
8
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
9
|
+
body {
|
|
10
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
11
|
+
background: #f5f5f5;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
header {
|
|
15
|
+
background: #2c3e50;
|
|
16
|
+
color: white;
|
|
17
|
+
padding: 20px;
|
|
18
|
+
text-align: center;
|
|
19
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
header h1 {
|
|
23
|
+
margin-bottom: 5px;
|
|
24
|
+
font-size: 24px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
header p {
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
opacity: 0.9;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.container {
|
|
33
|
+
max-width: 1400px;
|
|
34
|
+
margin: 0 auto;
|
|
35
|
+
padding: 20px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.stats-table {
|
|
39
|
+
background: white;
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
margin-bottom: 20px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
table {
|
|
47
|
+
width: 100%;
|
|
48
|
+
border-collapse: collapse;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
th, td {
|
|
52
|
+
padding: 12px 16px;
|
|
53
|
+
text-align: left;
|
|
54
|
+
border-bottom: 1px solid #e0e0e0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
th {
|
|
58
|
+
background: #34495e;
|
|
59
|
+
color: white;
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
td {
|
|
65
|
+
font-size: 13px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
tr:last-child td {
|
|
69
|
+
border-bottom: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
tr:hover {
|
|
73
|
+
background: #f9f9f9;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.match {
|
|
77
|
+
color: #27ae60;
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.mismatch {
|
|
82
|
+
color: #e74c3c;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.warning {
|
|
87
|
+
color: #f39c12;
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.element-selector {
|
|
92
|
+
text-align: center;
|
|
93
|
+
padding: 15px;
|
|
94
|
+
background: white;
|
|
95
|
+
border-radius: 8px;
|
|
96
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
97
|
+
margin-bottom: 20px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.element-selector label {
|
|
101
|
+
margin-right: 10px;
|
|
102
|
+
font-weight: 600;
|
|
103
|
+
font-size: 14px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
select {
|
|
107
|
+
padding: 8px 16px;
|
|
108
|
+
font-size: 14px;
|
|
109
|
+
border-radius: 4px;
|
|
110
|
+
border: 1px solid #bdc3c7;
|
|
111
|
+
background: white;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
select:hover {
|
|
116
|
+
border-color: #3498db;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.comparison-container {
|
|
120
|
+
background: white;
|
|
121
|
+
border-radius: 8px;
|
|
122
|
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.comparison-view {
|
|
127
|
+
display: flex;
|
|
128
|
+
height: calc(100vh - 460px);
|
|
129
|
+
min-height: 500px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.java-side, .ruby-side {
|
|
133
|
+
flex: 1;
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.java-side {
|
|
139
|
+
border-right: 2px solid #34495e;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.side-header {
|
|
143
|
+
background: #ecf0f1;
|
|
144
|
+
padding: 12px;
|
|
145
|
+
text-align: center;
|
|
146
|
+
border-bottom: 1px solid #bdc3c7;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.side-header h2 {
|
|
150
|
+
font-size: 16px;
|
|
151
|
+
color: #2c3e50;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
iframe {
|
|
155
|
+
flex: 1;
|
|
156
|
+
border: none;
|
|
157
|
+
background: white;
|
|
158
|
+
width: 100%;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.footer {
|
|
162
|
+
text-align: center;
|
|
163
|
+
padding: 20px;
|
|
164
|
+
color: #7f8c8d;
|
|
165
|
+
font-size: 12px;
|
|
166
|
+
}
|
|
167
|
+
</style>
|
|
168
|
+
</head>
|
|
169
|
+
<body>
|
|
170
|
+
<header>
|
|
171
|
+
<h1>XsdVi Comparison: {{SCHEMA_NAME}}</h1>
|
|
172
|
+
<p>Java XsdVi v1.3 vs Ruby XsdVi</p>
|
|
173
|
+
</header>
|
|
174
|
+
|
|
175
|
+
<div class="container">
|
|
176
|
+
<div class="stats-table">
|
|
177
|
+
{{STATS_TABLE}}
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
{{ELEMENT_SELECTOR}}
|
|
181
|
+
|
|
182
|
+
<div class="comparison-container">
|
|
183
|
+
<div class="comparison-view">
|
|
184
|
+
<div class="java-side">
|
|
185
|
+
<div class="side-header">
|
|
186
|
+
<h2>Java XsdVi v1.3</h2>
|
|
187
|
+
</div>
|
|
188
|
+
<iframe id="java-frame" src=""></iframe>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<div class="ruby-side">
|
|
192
|
+
<div class="side-header">
|
|
193
|
+
<h2>Ruby XsdVi</h2>
|
|
194
|
+
</div>
|
|
195
|
+
<iframe id="ruby-frame" src=""></iframe>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
|
|
200
|
+
<div class="footer">
|
|
201
|
+
Generated by XsdVi Comparison Tool
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
|
|
205
|
+
<script>
|
|
206
|
+
const javaMetadata = {{JAVA_METADATA}};
|
|
207
|
+
const rubyMetadata = {{RUBY_METADATA}};
|
|
208
|
+
const isMultiFile = {{IS_MULTI_FILE}};
|
|
209
|
+
|
|
210
|
+
function loadFile(index) {
|
|
211
|
+
if (!javaMetadata.files || !rubyMetadata.files) {
|
|
212
|
+
console.error('No metadata files available');
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
if (index < 0 || index >= javaMetadata.files.length) {
|
|
217
|
+
console.error('Invalid file index:', index);
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
const javaFile = javaMetadata.files[index];
|
|
222
|
+
const rubyFile = rubyMetadata.files[index];
|
|
223
|
+
|
|
224
|
+
document.getElementById('java-frame').src = `java/${javaFile.name}`;
|
|
225
|
+
document.getElementById('ruby-frame').src = `ruby/${rubyFile.name}`;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Load first file by default
|
|
229
|
+
if (javaMetadata.files && javaMetadata.files.length > 0) {
|
|
230
|
+
loadFile(0);
|
|
231
|
+
}
|
|
232
|
+
</script>
|
|
233
|
+
</body>
|
|
234
|
+
</html>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
<symbol class='button' id='plus'>
|
|
2
|
-
<rect x='1' y='1' width='10' height='10'/>
|
|
3
|
-
<line x1='3' y1='6' x2='9' y2='6'/>
|
|
4
|
-
<line x1='6' y1='3' x2='6' y2='9'/>
|
|
5
|
-
</symbol>
|
|
6
|
-
<symbol class='button' id='minus'>
|
|
7
|
-
<rect x='1' y='1' width='10' height='10'/>
|
|
8
|
-
<line x1='3' y1='6' x2='9' y2='6'/>
|
|
9
|
-
</symbol>
|
|
1
|
+
<symbol class='button' id='plus'>
|
|
2
|
+
<rect x='1' y='1' width='10' height='10'/>
|
|
3
|
+
<line x1='3' y1='6' x2='9' y2='6'/>
|
|
4
|
+
<line x1='6' y1='3' x2='6' y2='9'/>
|
|
5
|
+
</symbol>
|
|
6
|
+
<symbol class='button' id='minus'>
|
|
7
|
+
<rect x='1' y='1' width='10' height='10'/>
|
|
8
|
+
<line x1='3' y1='6' x2='9' y2='6'/>
|
|
9
|
+
</symbol>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<rect class='button' x='300' y='10' width='20' height='20' onclick='collapseAll()'/>
|
|
2
|
-
<line x1='303' y1='20' x2='317' y2='20'/>
|
|
3
|
-
<text x='330' y='20'>collapse all</text>
|
|
4
|
-
<rect class='button' x='400' y='10' width='20' height='20' onclick='expandAll()'/>
|
|
5
|
-
<line x1='403' y1='20' x2='417' y2='20'/>
|
|
6
|
-
<line x1='410' y1='13' x2='410' y2='27'/>
|
|
1
|
+
<rect class='button' x='300' y='10' width='20' height='20' onclick='collapseAll()'/>
|
|
2
|
+
<line x1='303' y1='20' x2='317' y2='20'/>
|
|
3
|
+
<text x='330' y='20'>collapse all</text>
|
|
4
|
+
<rect class='button' x='400' y='10' width='20' height='20' onclick='expandAll()'/>
|
|
5
|
+
<line x1='403' y1='20' x2='417' y2='20'/>
|
|
6
|
+
<line x1='410' y1='13' x2='410' y2='27'/>
|
|
7
7
|
<text x='430' y='20'>expand all</text>
|