Subject:Mapping - How Include the Schema info at top of file. Author:Hans Lutsch Date:13 Mar 2007 10:45 AM
Hi,
Total Newbie requires assitance :-)
I am using Mapper to transform a set of XML data to a specific published Schema for Reliability data. The end result is supposed to have a specific first few lines that indicate version, schema etc. I can get my whole map to work out but can't figure out how to get the first few lines to create without manualy pasting in the text after the XML file has been created. I would think that the Xquery could be made to do it for me but can't figure it out. My created file starts with " <ScheduledMaintenance><HDR_Segment> "
Apparently the top few lines of the created XML file should look like this:
The produced file should look like this: except I have not ALL of the elements in this sample included in my creation as many of them are not mandatory elements.
Subject:Mapping - How Include the Schema info at top of file. Author:(Deleted User) Date:15 Mar 2007 05:42 AM
Hi Hans,
you can add the three missing attributes by right clicking on the ScheduledMaintenance node in the target schema tree and selecting "Add Attribute"; then, you can assign a fixed value to it by right clicking on the attribute and selecting "Set Text Value"
Subject:Mapping - How Include the Schema info at top of file. Author:Hans Lutsch Date:15 Mar 2007 11:18 AM
What I am doing is this:
The Boeing Aircraft Company requires Airlines to submit all of the maintenance records of maintenance work carried out on Boeing aircraft on a monthly basis in a specific format ( Airline Transport Association ATA SPEC2000 Schemas ). The submitted XML file must have the first few lines like the sample I included. Their receiving server then does validation etc before the file is placed into their production database. This then enables Boeing to utilize the data to build a better airplane, help operators with reliability problems etc. In return for this effort the contributing airline then also gets access to this enormous database for research purposes and to utilize the Boeing Reporting Tools to create nifty Monthly reports etc. on how your fleet is doing and also compare to the world fleet of Boeing aircraft.
I am using the Xquery Mapper to create the file required to send to Boeing. Am I to understand that I may have to put the created XML file through another process to provide the Declaration line or can't the Xquery return the required line?
Subject:Mapping - How Include the Schema info at top of file. Author:(Deleted User) Date:15 Mar 2007 12:24 PM
Hi Hans,
the generation of the XML processing instruction should be controlled by a serialization option (omit-xml-declaration), so there is a way to generate it.
Unfortunately every XQuery implementation has taken a different path regarding serialization options, and Stylus doesn't provide an unified UI to control them.
So, you should do this:
- change the processor to be DataDirect XQuery
- add as a first line this instruction