Dean Des Rosiers
2003-02-05 15:21:02 UTC
I created a fairly simple plugin for Middlegen that creates XML Schemas for
me. It is very specific to my project, though. My SQL to XSL type mappings
are hard-coded, and in some cases are mapped to my own xs type definitions
(GUIDs, y/n, etc.).
I have two different schema types. One defines the table as a data type,
not an element. Each tables column names and column data types are
described, as is the tables PK (with an xs:key element). I do not outline
the foreign keys here. I use the other schema type for that.
The dataset schema type defines relationships among elements whose data
types are defined in the table schemas. It is Russian doll style, and
the relationships are mapped here. Foreign keys are described using key
refs. I use a dataset as a working set of data, kind of like a value object
tree, if I understand the latter correctly.
It was tricky to make it happen in Middlegen. Ill converse with Hal (or
anybody) who wishes to attempt genericization of my code.
Dean Des Rosiers
me. It is very specific to my project, though. My SQL to XSL type mappings
are hard-coded, and in some cases are mapped to my own xs type definitions
(GUIDs, y/n, etc.).
I have two different schema types. One defines the table as a data type,
not an element. Each tables column names and column data types are
described, as is the tables PK (with an xs:key element). I do not outline
the foreign keys here. I use the other schema type for that.
The dataset schema type defines relationships among elements whose data
types are defined in the table schemas. It is Russian doll style, and
the relationships are mapped here. Foreign keys are described using key
refs. I use a dataset as a working set of data, kind of like a value object
tree, if I understand the latter correctly.
It was tricky to make it happen in Middlegen. Ill converse with Hal (or
anybody) who wishes to attempt genericization of my code.
Dean Des Rosiers