Ticket #176 (closed enhancement: fixed)
XML based Data Context Strategy
| Reported by: | kasper | Owned by: | kasper |
|---|---|---|---|
| Priority: | high | Milestone: | MetaModel 1.1 |
| Component: | MetaModel | Keywords: | |
| Cc: | |||
| Influenced classes: | |||
Description
Based on this discussion, we should add support for normalizing XML nodes into tables with relations and thereby including XML support in MetaModel.
Change History
comment:2 Changed 2 years ago by kasper
Added rev [477] which includes the first working version of this. One thing remains to be solved if we want it to be exactly like the example above; Detecting that the <name> tag inside the <person> tag has no multiplicity. In the current version a seperate contributors_person_name table will be generated instead. The good thing about this is that it would be more likely to reuse the same schema for several XML files if some of them contain multiplicity and some of them don't.
comment:3 Changed 2 years ago by kasper
- Owner set to kasper
- Status changed from new to assigned
Note for improvement: Also include native types. These could be something like:
- XML attribute
- XML text content
- Auto-generated key
This could also be used to improve the getIdColumn() and getTextContentColumn() methods.

To clarify with an example, the following XML
<eobjects.dk website="http://www.eobjects.dk"> <contributors> <person> <name>kasper</name> <address>My address</address> <address>Another address</address> <address>A third address</address> </person> <person> <name>asbjorn</name> <address>Asbjorns address</address> </person> </contributors> <projects> <project name="datacleaner"> Here's a short description of DataCleaner, the the one for MetaModel is missing... </project> <project name="MetaModel" /> </projects> </eobjects.dk>should be normalized as the following tables:
eobjects.dk
contributors and projects should be omitted, since they have no attributes and no siblings.
contributors_person
contributors_person_address
projects_project