Focal Point
Data Migrator - XML Schema

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/5697078216

November 14, 2011, 08:39 PM
InformSRB
Data Migrator - XML Schema
To begin with - I am a complete newbie with the Migrator tool - please bear with me.

From what I have read - if you have an xml schema (.xsd) - it can be used to create the corresponding xml file.

The first step was to try to create the system. Upon doing so I get the following error - (FOC42233) UNEXPECTED TOKEN: 'version'.

A Google search - on the above - doesn't produce many hits.

I was wondering if anyone has ran into the above issue or can point me to some documentation.

Thanks.


WebFocus 7.6.10
November 15, 2011, 10:32 AM
Clif
Indeed you can create a synonym from an xsd (or with the xml itself, albeit with less information).

The first line of an xsd should look something like this:

<?xml version="1.0" encoding="utf-8"?>

The xsd must be valid; you may want to validate it in a tool like xmlspy if you have one, or download a free tool like xmlpad.

There is an example of creating a synonym in the DataMigrator User's Guide for 7.6.

The procedure has changed somewhat for 7.7. Configure an adapter for XML, then select Create Synonym. For Base Location enter the location of the xml document. Then click Next. Then for Base Location enter the location of the xsd. Then click Create Synonym.

This message has been edited. Last edited by: Clif,


N/A
November 15, 2011, 11:25 AM
InformSRB
Clif;

I appreicate the response.

I went ahead and validated the schema with XMLPAD. I've retreieved the documentation you mention and for the most part - it appears to be what I am doing.

I believe you were commenting on what the first line of the xsd should look like - but it seems it got cut off.

I am not sure if would make a different - but I can upload the schema if needed.

Thanks.


WebFocus 7.6.10
November 16, 2011, 10:16 AM
Clif
It looks like eve treated the xml snippet as xml. I edited the post to put code markers around it. However since you've validated the xsd it should be good to go.

Please upload the schema and I will try to create the synonym myself.


N/A
November 16, 2011, 10:38 AM
InformSRB
Here is the schema - I am trying to create the synonym for - ClaimIntakeEDI.xsd

This message has been edited. Last edited by: InformSRB,


WebFocus 7.6.10
November 17, 2011, 10:40 AM
Clif
The problem is the line
  <version>1.8.0</version>  

I removed it and (using 7.7.03M) was able to create the synonym, which takes a while because it's humongous.

Which unfortunately means it's too large to use as is. What do you want to do with it?

This message has been edited. Last edited by: Clif,


N/A
November 17, 2011, 02:22 PM
InformSRB
Thanks Clif - that did the trick. I'll reach out if I have any further questions.


WebFocus 7.6.10
January 18, 2012, 08:38 PM
InformSRB
quote:
Originally posted by Clif:
The problem is the line
  <version>1.8.0</version>  

I removed it and (using 7.7.03M) was able to create the synonym, which takes a while because it's humongous.

Which unfortunately means it's too large to use as is. What do you want to do with it?


Sorry - I got pulled away to another project. As you said, the schema is huge. I have a list of the elements I have to map - my plan at the moment is to create to a Focus database will all the data field values - use that as the source and map each data field to the element in the XML synonym - is that a viable option - I've looked at the IWAY documentation - not much there on a process like this.

Any alternatives? Open to suggestions.

Update - I tried creaing a flow - by mapping a few of the field - as you mention the synonym is too large to use as is -

(FOC336) THE SUM OF ALL FIELD LENGTHS EXCEEDS MAXIMUM.

Is there an alternative way to reduce it?

This message has been edited. Last edited by: InformSRB,


WebFocus 7.6.10
January 19, 2012, 02:32 PM
Clif
The error is because the master parser runs out of memory.

What you need to do is create a synonym for the subset of the schema that has the data you want.

On the "Create Synonym for XML Step 3 of 3" panel for the option "Position" enter the XPATH to the element subtree you want to use.


N/A
January 19, 2012, 04:47 PM
InformSRB
Is there an option to enable the position variable?

During the synonym creation, I only have 2 steps.

Step 1 - asks for the location of the synonym
Step 2 - select the xsd,

Validate,
Make Unique,
Select application,
Prefix,
Suffix

Overwrite existing synonyms

Create synonym

Position option is not there.


WebFocus 7.6.10
January 20, 2012, 09:58 AM
Clif
Looks like you are using an older release. Please use the current production Release 7.7.03M. Thank you.


N/A