Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML and XSD matching

Status
Not open for further replies.

shank2

Programmer
Nov 17, 2005
2
US
I know what an XML file is when compared to HTML. But this is the first time I've ever had to work with them. I have data in Access. I need to export that data using a 3rd party's XSD schema file into a data feed. I have the trial version of XMLSpy and basically lost.

I exported XML out of Access and sent to the company for validation. It didn't match their XSD.

How do I put all this together?

The export from Access includes <dataroot ...>, which the company says does not belong.

The table name exported as the element container for each record. The company requires <prodcont> as the element. Do I need to change table names, search and replace or change something else?

Do I export from Access, then manually change elements? In my mind their should be some way to map the data to the correct elements.

thanks!
 
When you export the data from Access, you probably also exported the schema (.xsd) file, as well as the .xml file, correct?

You need to create an XSLT file to specify the conversion between the output of Access (described in the XSD created by Access) and the format required by the data feed (described in the 3rd party's XSD). The Altova tool for doing this is Stylevision. There is also another product, named Stylus Studio, that has this capability as well.

The function of XSLT is to do the mapping that your intuition tells you must exist, transforming an XML input document into different XML, HTML, or text. Follow Stylevision's (or Stylus Studio's) instructions for creating an XSLT which maps XML to XML. You should be able to test your XSLT using the .xml document exported by Access using XML Spy (or Stylus Studio).

Once you have the XSLT working, you need to specify it on the Access XML Export so that it will be applied. The steps to do this are:[ul]
[li]File/Export.../(select XML Save As Type)[/li]
[li]on the 'Export XML' dialog, click 'More Options...'[/li]
[li]Click 'Transforms'[/li]
[li]Click 'Add' and add the .xsl file you created.[/li][/ul]

That should get you started.

A tutorial about XSLT may be found at


Tom Morrison
 
I just had a look at Altova's web site (again) and it would seem that Mapforce is the correct tool for generating an XML-XML XSLT.

Sorry, but I find Altova's product set a bit confusing.

Tom Morrison
 
Your tips were outstanding and all the pieces are fitting together. I'm now mapping using Altova trial version. My trial for Stylus expired before I had a chance to use it with the knowledge I have now.

I got to ask though, with these software packages so expensive, aren't there cheaper solutions out there? The Stylis Enterprise is $600. Ouch! Altova is even more because I'd have to buy 2 programs.

Basically, what I need is a program to do the mapping and another to validate. Your help is appreciated in showing me the light earlier!

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top