Login  Register

Re: XSD schema conversion anyone?

Posted by David E Jones-2 on Aug 08, 2006; 2:06am
URL: http://ofbiz.116.s1.nabble.com/XSD-schema-conversion-anyone-tp170452p170457.html


Is the intent to map it to the OFBiz data model or services? I'm  
guessing that's not the case if you're trying to create entities to  
represent it.

If you're trying to create a data model for an XML Schema and not  
mapping it to an existing data model, then you'll have to design a  
data model to match it. XML is an hierarchical data structure which  
is very different from a relational (table-based) one. Some design  
will have to be done to decide how to structure things because there  
are no natural equivalencies. There are, of course, some common  
patterns for dealing with hierarchical and other structures in SQL,  
but doing an effective mapping requires more of an understanding of  
the data model so that the same data can be captured in both places  
and this is very difficult to automate. You might find some  
commercial tools that give you a good first pass though... ie to go  
from XSD to SQL DDL.

-David


On Aug 7, 2006, at 6:51 PM, Iain Fogg wrote:

> Chris,
>
> Good question, and this probably exposes my ignorance of XST. Maybe  
> it's not the right technology. Maybe I need to find a tool that can  
> translate from XSD -> SQL. Then it would be straightforward to map  
> the relational table defs to the OFBiz entity def. My small brain  
> can't get round the mapping of the hierarchical XML Schema to a  
> relational one - at least not given it's size. Maybe when I was  
> younger :-)
>
> In case anyone is interested, the schema I want to map is the ONIX  
> schema (used in the book trade).
>
> Cheers, Iain
>
> Chris Howe wrote:
>
>> Correct me if I'm wrong, but wouldn't you need to know
>> what the source elements are in order to make an XST
>> to entity def?  Absent knowing the structure of your
>> source it wouldn't matter what someone else's XST
>> looks like, it wouldn't work with yours.
>>
>> --- Iain Fogg <[hidden email]> wrote:
>>
>>
>>> That's my question...has anyone already buit an XST
>>> to do the conversion to OFBiz Entity defs?
>>>
>>> BJ Freeman wrote:
>>>
>>>
>>>> the XSD defines the layout.
>>>> the XML is where the Entities definitions are.
>>>> you can try using an XST file to convert.
>>>>
>>>> Iain Fogg sent the following on 8/7/2006 7:53 AM:
>>>>
>>>>
>>>>> I have a slightly complicated XML Schema (.xsd)
>>>>>
>>> that I would like to
>>>>> import into OFBiz.
>>>>>
>>>>> Has anyone written a tool to convert XML schemas
>>>>>
>>> into OFBiz  entity
>>>>> definitions?
>>>>>
>>>>> Cheers, Iain
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>> --
>>> No virus found in this outgoing message.
>>> Checked by AVG Free Edition.
>>> Version: 7.1.405 / Virus Database: 268.10.7/411 -
>>> Release Date: 7/08/2006
>>>
>>>
>>>
>>
>>
>>
>>
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.405 / Virus Database: 268.10.7/411 - Release Date:  
> 7/08/2006
>