d | r | m | property | type | ref | source
example | | |
| resource1 | xml | |
| | Country | | id | /STREETS/STREET/CITY/COUNTRY
| | | id | integer | | @id
| | | name@lt | string | | @name
| | | | | |
| | City | | id | /STREETS/STREET/CITY
| | | id | integer | | @id
| | | name@lt | string | | @name
| | | country | ref | Country | COUNTRY/@id
| | | | | |
| | Building | | id | /STREETS/STREET/BUILDINGS/BUILDING
| | | id | integer | | @id
| | | number | string | | @number
| | | street | ref | | ../../@id
| | | | | |
| | Street | | id | /STREETS/STREET
| | | id | integer | | @id
| | | name@lt | string | | @name
| | | city | ref | City | CITY/@id
| | | city.id | integer | | CITY/@id
| | | city.name@lt | string | | CITY/@name
| | | city.country | ref | Country | CITY/COUNTRY/@id
| | | city.country.id | integer | | CITY/COUNTRY/@id
| | | city.country.name@lt | string | | CITY/COUNTRY/@name
| | | buildings[] | backref | Building |
| | | buildings[].id | integer | | BUILDINGS/BUILDING/@id
| | | buildings[].name@lt | string | | BUILDINGS/BUILDING/@name
| | | buildings[].street | ref | Street | @id
STREET is the first element in tree, so it has all the nested elements, like
buildings[].name@lt. Other elements in the XML tree have separate models in
DSA, just to be able to reference them from the main Street model.
When generating DSA from XSD, generate nested structure for the first element in XML tree.
For example, if we have following XML file:
Then generated DSA should look like this:
STREET
is the first element in tree, so it has all the nested elements, likebuildings[].name@lt
. Other elements in the XML tree have separate models in DSA, just to be able to reference them from the mainStreet
model.