metacat/xmldbms/samples/sales.map @ 103
1 |
<?xml version="1.0" ?>
|
---|---|
2 |
<!DOCTYPE XMLToDBMS SYSTEM "../xmldbms.dtd">
|
3 |
<XMLToDBMS Version="1.0"> |
4 |
<Options>
|
5 |
<DateTimeFormats>
|
6 |
<Patterns Timestamp="MM.dd.yy"/> |
7 |
</DateTimeFormats>
|
8 |
</Options>
|
9 |
<Maps>
|
10 |
<IgnoreRoot>
|
11 |
<ElementType Name="Orders"/> |
12 |
<PseudoRoot>
|
13 |
<ElementType Name="SalesOrder"/> |
14 |
<CandidateKey Generate="No"> |
15 |
<Column Name="Number"/> |
16 |
</CandidateKey>
|
17 |
</PseudoRoot>
|
18 |
</IgnoreRoot>
|
19 |
<ClassMap>
|
20 |
<ElementType Name="Customer"/> |
21 |
<ToClassTable>
|
22 |
<Table Name="Customers"/> |
23 |
</ToClassTable>
|
24 |
<PropertyMap>
|
25 |
<Attribute Name="CustNumber"/> |
26 |
<ToColumn>
|
27 |
<Column Name="Number"/> |
28 |
</ToColumn>
|
29 |
</PropertyMap>
|
30 |
<PropertyMap>
|
31 |
<ElementType Name="CustName"/> |
32 |
<ToColumn>
|
33 |
<Column Name="Name"/> |
34 |
</ToColumn>
|
35 |
</PropertyMap>
|
36 |
<PropertyMap>
|
37 |
<ElementType Name="PostCode"/> |
38 |
<ToColumn>
|
39 |
<Column Name="PostalCode"/> |
40 |
</ToColumn>
|
41 |
</PropertyMap>
|
42 |
<PropertyMap>
|
43 |
<ElementType Name="Street"/> |
44 |
<ToColumn>
|
45 |
<Column Name="Street"/> |
46 |
</ToColumn>
|
47 |
</PropertyMap>
|
48 |
<PropertyMap>
|
49 |
<ElementType Name="City"/> |
50 |
<ToColumn>
|
51 |
<Column Name="City"/> |
52 |
</ToColumn>
|
53 |
</PropertyMap>
|
54 |
<PropertyMap>
|
55 |
<ElementType Name="State"/> |
56 |
<ToColumn>
|
57 |
<Column Name="State"/> |
58 |
</ToColumn>
|
59 |
</PropertyMap>
|
60 |
</ClassMap>
|
61 |
<ClassMap>
|
62 |
<ElementType Name="SalesOrder"/> |
63 |
<ToClassTable>
|
64 |
<Table Name="Sales"/> |
65 |
</ToClassTable>
|
66 |
<PropertyMap>
|
67 |
<Attribute Name="SONumber"/> |
68 |
<ToColumn>
|
69 |
<Column Name="Number"/> |
70 |
</ToColumn>
|
71 |
</PropertyMap>
|
72 |
<PropertyMap>
|
73 |
<ElementType Name="OrderDate"/> |
74 |
<ToColumn>
|
75 |
<Column Name="Date"/> |
76 |
</ToColumn>
|
77 |
</PropertyMap>
|
78 |
<RelatedClass KeyInParentTable="Candidate"> |
79 |
<ElementType Name="Line"/> |
80 |
<CandidateKey Generate="No"> |
81 |
<Column Name="Number"/> |
82 |
</CandidateKey>
|
83 |
<ForeignKey>
|
84 |
<Column Name="SONumber"/> |
85 |
</ForeignKey>
|
86 |
<OrderColumn Name="Number" Generate="No"/> |
87 |
</RelatedClass>
|
88 |
<RelatedClass KeyInParentTable="Foreign"> |
89 |
<ElementType Name="Customer"/> |
90 |
<CandidateKey Generate="No"> |
91 |
<Column Name="Number"/> |
92 |
</CandidateKey>
|
93 |
<ForeignKey>
|
94 |
<Column Name="CustNumber"/> |
95 |
</ForeignKey>
|
96 |
</RelatedClass>
|
97 |
</ClassMap>
|
98 |
<ClassMap>
|
99 |
<ElementType Name="Part"/> |
100 |
<ToClassTable>
|
101 |
<Table Name="Parts"/> |
102 |
</ToClassTable>
|
103 |
<PropertyMap>
|
104 |
<Attribute Name="PartNumber"/> |
105 |
<ToColumn>
|
106 |
<Column Name="Number"/> |
107 |
</ToColumn>
|
108 |
</PropertyMap>
|
109 |
<PropertyMap>
|
110 |
<ElementType Name="Description"/> |
111 |
<ToColumn>
|
112 |
<Column Name="Description"/> |
113 |
</ToColumn>
|
114 |
</PropertyMap>
|
115 |
<PropertyMap>
|
116 |
<ElementType Name="Price"/> |
117 |
<ToColumn>
|
118 |
<Column Name="Price"/> |
119 |
</ToColumn>
|
120 |
</PropertyMap>
|
121 |
</ClassMap>
|
122 |
<ClassMap>
|
123 |
<ElementType Name="Line"/> |
124 |
<ToClassTable>
|
125 |
<Table Name="Lines"/> |
126 |
</ToClassTable>
|
127 |
<PropertyMap>
|
128 |
<Attribute Name="LineNumber"/> |
129 |
<ToColumn>
|
130 |
<Column Name="Number"/> |
131 |
</ToColumn>
|
132 |
</PropertyMap>
|
133 |
<PropertyMap>
|
134 |
<ElementType Name="Quantity"/> |
135 |
<ToColumn>
|
136 |
<Column Name="Quantity"/> |
137 |
</ToColumn>
|
138 |
</PropertyMap>
|
139 |
<RelatedClass KeyInParentTable="Foreign"> |
140 |
<ElementType Name="Part"/> |
141 |
<CandidateKey Generate="No"> |
142 |
<Column Name="Number"/> |
143 |
</CandidateKey>
|
144 |
<ForeignKey>
|
145 |
<Column Name="Part"/> |
146 |
</ForeignKey>
|
147 |
</RelatedClass>
|
148 |
</ClassMap>
|
149 |
</Maps>
|
150 |
</XMLToDBMS>
|
151 |
|