Originally posted by Greg Eriksen
A co-worker had been doing some file-compare testing for our migration from 5.4 to 5.7 rev2. When she tested an HL7-to_xml interface, there was a discrepancy in the output.
5.4:
<?xml version="1.0" encoding="utf-8" ?>
<Root xmlns:xs="
http://www.w3.org/2001/XMLSchema">
...
5.7:
<?xml version="1.0" encoding="utf-8" ?>
<Root>
...
This is the schema file (cir_labs.xsd):
<?xml version="1.0"?>
<xs:schema id="Root" xmlns:xs="
http://www.w3.org/2001/XMLSchema">
<xs:element name="Root">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Practice">
<xs:complexType>
<xs:sequence>
<xs:element name="Provider" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Patient" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="LabTest" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="LabTypeID" ENGINE="xs:string"/>
<xs:attribute name="LabValue" ENGINE="xs:string"/>
<xs:attribute name="OrderNumber" ENGINE="xs:string"/>
<xs:attribute name="Comments" ENGINE="xs:string"/>
<xs:attribute name="LabDate" ENGINE="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ExternalPatientID" ENGINE="xs:string"/>
<xs:attribute name="FirstName" ENGINE="xs:string"/>
<xs:attribute name="MiddleName" ENGINE="xs:string"/>
<xs:attribute name="LastName" ENGINE="xs:string"/>
<xs:attribute name="Gender" ENGINE="xs:string"/>
<xs:attribute name="DateOfBirth" ENGINE="xs:string"/>
<xs:attribute name="StatusID" ENGINE="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ExternalProviderID" ENGINE="xs:string"/>
<xs:attribute name="FirstName" ENGINE="xs:string"/>
<xs:attribute name="LastName" ENGINE="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="SourceID" ENGINE="xs:string"/>
<xs:attribute name="ExternalPracticeID" ENGINE="xs:string"/>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
When I try to compile (not recompile) the .xsd file in 5.7, and change the Compile Options / Default Namespace setting from "None" to "Use Namespace" and specify "
http://www.w3.org/2001/XMLSchema" (in quotes), it returns a compile error that says:
"Compile command failed with status 1:
Default Namespace could not be set because no target namespace was defined in schema cir_labs.xsd"
So, we've got a schema that compiled fine with defaults under 5.4, that now doesn't produce the same output under 5.7. And when I try to explicitly define the default namespace, it complains that there is no target namespace.
This is the only xml interface I had ever developed on cloverleaf, and I didn't learn that much about xml while doing it, and have forgotten most of that. Does anyone on the forum have an example of what sort of "target namespace" setting 5.7 seems to require in the schema file?