Imported from previous forum
In order to get to know the FIX XML examples better, I downloaded XML SPY, tried to validate the examples and get errors like - "Unable to locate a reference to a supported schema kind(DTD, DCD, W3C schema, XML - Data,BizTalk)within this schema instance.".
Did anybody have similar problem while using the examples?
[ original email was from Jim Northey - jnorthey@lasalletech.com ]
We put the examples up without the reference to the schema. You need to include the schema reference to the location of the schema on your PC - for instance:
<FIXML xmlns="http://www.fixprotocol.org/FIXML-4-4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.fixprotocol.org/FIXML-4-4
D:\home\jim\FIX\FIX44\fixml-main-4-4.xsd">
The first attribute indicates the default name space for this instance. The second refers to Schema Instance - to get at special schema instance types, such as xsi:type, xsi:schemaLocation (these are XML Schema elements and attributes that are used within instance documents instead of the schema documents). The third attribute xsi:schemaLocation. It is a pair of names within quotes. "schemafilename location".
In the above case - I am telling the XML parser that the http://www.fixprotocol.org/FIXML-4-4 schema is located in the D:\home\jim\FIX\FIX44\fixml-main-4-4.xsd file.
Going further with when to reference the schema from an instance document and when not to. The FIXML Schema Working Group recommends that you validate with the schema during development and testing. It is not recommended that you reference the schema within FIXML messages within applications due to the performance overhead associated with validation. The schema is useful for describing and validating messages during development and certification - not during production operation. The Schema also provides metadata that can be used for other applications.
Hope this helps - if it creates more questions then it answers - please reply.
> In order to get to know the FIX XML examples better, I downloaded XML SPY, tried to validate the examples and get errors like - "Unable to locate a reference to a supported schema kind(DTD, DCD, W3C schema, XML - Data,BizTalk)within this schema instance.".
>
> Did anybody have similar problem while using the examples?
>
>
>
Hi,
We have similar problem
> We put the examples up without the reference to the schema.
That is OK - I assign XML examples with schema files but I still get validation error from XMLSpy. Now I get error “Unexpected child element ‘Pty’” on file AllocationInstruction.xml. Also I get error about element ‘TrdDt’ - It is defined in xsd as ‘date’ but in XML it is string.
TIA,
Miroslav Penchev,
BSC Group.
> Hi,
>
> We have similar problem
>
> > We put the examples up without the reference to the schema.
>
> That is OK - I assign XML examples with schema files but I still get validation error from XMLSpy. Now I get error “Unexpected child element ‘Pty’” on file AllocationInstruction.xml. Also I get error about element ‘TrdDt’ - It is defined in xsd as ‘date’ but in XML it is string.
>
> TIA,
> Miroslav Penchev,
> BSC Group.
>
The AllocationInstruction.xml has the incorrect sequence of elements according to the fixml-allocation-base-4-4.xsd. The <Pty> elements should precede the <Alloc> elements which is the opposite of the sample xml. Once the order is fixed and the date datatypes are changed to YYCC-MM-DD format the xml validates.
Hi,
I use Oxygen which (so long as you specify the schema) had no problems.
Regards, Azam.
> In order to get to know the FIX XML examples better, I downloaded XML SPY, tried to validate the examples and get errors like - "Unable to locate a reference to a supported schema kind(DTD, DCD, W3C schema, XML - Data,BizTalk)within this schema instance.".
>
> Did anybody have similar problem while using the examples?
>
>
>