Login  Register

Re: XSD schema conversion anyone?

Posted by BJ Freeman on Aug 08, 2006; 3:11am
URL: http://ofbiz.116.s1.nabble.com/XSD-schema-conversion-anyone-tp170452p170469.html

what chris said is correct.
The onix DTD or XSD describes how the actual data is formated in the
XML. it is not the data.
there is no way to automatically translate the onix DTD to ofbiz
entities. this has to be done by hand.
One way, if this is going to be a daily import, is to write a import
routine.  One routine reads the onix data using the onix DTD and puts in
a map that is then used to put the map data into ofbiz.
Another way is to read the XML using Dom then write out xml format for
ofbiz entities and use the webtools services to import into ofbiz.




Iain Fogg sent the following on 8/7/2006 5:51 PM:

> 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
>>>
>>>
>>>  
>>
>>
>>
>>  
>>
>
>
>