XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Erik BeijerSubject: Need a mapping from an XML file to a database
Author: Erik Beijer
Date: 31 Jan 2005 11:45 AM
Originally Posted: 31 Jan 2005 11:34 AM
Hi all, I'm new to this forum, and frankly new to Stylus Studio as well. We purchased a license because we needed to convert XML files into other XML file formats for a customer of us. Now I'm investigating another task which might be possible with Stylus. Here's the idea: We implemented an EDI system using XML ordermessages. We built a program which parses these messages and puts the data into a so called message-database. So far so good, but now we want to adapt another XML standard. Because it's too much work to code a mapping between an XML file and a DB over and over again, we are looking for a more durable solution. So, we figured this would be possible with Stylus. In Stylus it's possible to make an XSLT Mapping with one XML document as a source and a SQL Server database as destination. Now I'm looking for ways to accomplish this, because I don't get it to work :( (maybe it isn't possible at all?) So here are my questions: 1) Is it possible to make a sophisticated mapping FROM xml TO SQL Server? (we have multiple tables e.g. Orders and Orderlines) 2) If this is possible, are there any examples of it? Any documentation about this subject? I would be very happy if someone could answer these. Greetings and thanks in advance, Erik Beijer p.s. once one edits a message some <BR> tags come in. Once you delete those, the linebreaks are gone.

Postnext
Erik BeijerSubject: Need a mapping from an XML file to a database
Author: Erik Beijer
Date: 07 Feb 2005 04:04 AM
Is there absolutely nobody who knows if this is possible or not?

My guess would be it isn't possible. Perhaps anyone who can help me on this subject?

Thanks,
Erik

Postnext
Ivan PedruzziSubject: Need a mapping from an XML file to a database
Author: Ivan Pedruzzi
Date: 07 Feb 2005 11:14 AM
Erik

Sorry for the late reply.

DB to XML data source allow to define a bi-directional connection to a database.
Using SQL/XML statements you can define select and update behaviors.

You can use a db URL into mapper as target schema to build your transformation.

When a db URL is used as transformation output URL, every time the transformation complete,
the SQL/XML update statement is executed and the database is updated.

If you need to update multimple tables you will need multiple .rdbxml connections.

For more details read "Working with Relational Data as XML" in the online help
We are working to publish a tutorial to better explain the entire process.

Hope this helps
Ivan




Posttop
Erik BeijerSubject: Need a mapping from an XML file to a database
Author: Erik Beijer
Date: 08 Feb 2005 10:43 AM
Well if the word "updating" is used correctly, it's not what I need. I need to be able to post the data from my XML message to the database, not update it.

The XML structure I'm talking about is like over 4 levels deep. E.g. Orders have Orderlines which have Processings which have Dimensions, etc. According to these entities in the XML structure we've defined database tables (Orders, Orderlines, Processings, Dimensions). Now I need a mapping from 1 XML file, containing those multiple Orders, Orderlines, etc, to a relational database.

Important to note is that the Orderline records are related to the Order record inserted before (so I need the unique assigned ID from the Order record, to be able to link the Orderlines to that Order). Problem with using multiple xmldb connections is that those numbers and ID's don't correspond.

With this extra info, are you able to tell me if Stylus Studio is able ot doing all this?

Thanks a lot for your support,
Erik Beijer

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.