Originally posted by Antonio Chennawi
I need your help. Do you know why I am getting this Xlate error.
I am sending the error, the Xlate and the xsd for your pleasure.
thank you.
$ hcixlttest -L -n -d 1 -f len10 xml_MFN_M02.xlt /hci/data/antonio/mso1
MESSAGE 1
[0:TEST] Message encode warnings: Error generated during parsing. - Element 'FirstName' is not valid for content model: '(Physic
ianID,Active,FirstName,LastName,Address,PrimaryPhone,CellPhone,Fax,PrimaryEmail,SecondaryEmail,Specialty)' - Line 1, Col 301
Output validation warnings: Error generated during parsing. - Element 'FirstName' is not valid for content model: '(PhysicianID,
Active,FirstName,LastName,Address,PrimaryPhone,CellPhone,Fax,PrimaryEmail,SecondaryEmail,Specialty)' - Line 1, Col 301
[0:TEST] Error generated during parsing. - Element 'FirstName' is not valid for content model: '(PhysicianID,Active,FirstName,La
stName,Address,PrimaryPhone,CellPhone,Fax,PrimaryEmail,SecondaryEmail,Specialty)' - Line 1, Col 346
Checking for leaked handles...
<No active handles>
Xlate:
prologue
xlt_infile: hl7 2.3 MSO MFN
who: anchenna
date: August 26, 2005 2:22:41 PM CDT
xlt_outfile: xml v2.4-200401-xsd urn$hl7-org$v2xml$PhysicianRecordType.file
type: xlt
version: 5.0
end_prologue
{ { OP COPY }
{ ERR 0 }
{ IN {{1(0).STF.00673.[0]}} }
{ OUT hl7:PhysicianRecordType~file.FirstName.0.hl7:XPN~10.0.hl7:DR~1.0.hl7:TS~1.#text }
}
<?xml version="1.0" ?>
<xsd:schema
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns="urn:hl7-org:v2xml"
xmlns:hl7="urn:hl7-org:v2xml"
targetNamespace="urn:hl7-org:v2xml">
<xsd:include schemaLocation="datatypes.xsd"/>
<xsd:simpleType name="PhysicianIDType">
<xsd:restriction base="xsd:unsignedInt">
<xsd:totalDigits value="6" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="LastNameType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="50" />
</xsd:restriction>
</xsd:simpleType>
<xsd:attributeGroup name="STF.3.ATTRIBUTES">
<xsd:attribute name="Item" ENGINE="xsd:string" fixed="673"/>
<xsd:attribute name="Type" ENGINE="xsd:string" fixed="XPN"/>
<xsd:attribute name="LongName" ENGINE="xsd:string" fixed="Staff Name"/>
</xsd:attributeGroup>
<xsd:complexType name="FirstNameType">
<xsd:annotation>
<xsd:documentation xml:lang="en">Staff Name</xsd:documentation>
<xsd:appinfo>
<hl7:Item>673</hl7:Item>
<hl7:Type>XPN</hl7:Type>
<hl7:LongName>Staff Name</hl7:LongName>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexContent>
<xsd:extension base="XPN">
<xsd:attributeGroup ref="STF.3.ATTRIBUTES"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<!--
<xsd:simpleType name="FirstNameType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="50" />
</xsd:restriction>
</xsd:simpleType>
-->
<xsd:complexType name="AddressType">
<xsd:sequence>
<xsd:element name="Address1" ENGINE="AddressLineType" />
<xsd:element name="Address2" ENGINE="AddressLineType" minOccurs="0" />
<xsd:element name="City" ENGINE="CityType" />
<xsd:element name="State" ENGINE="StateType" />
<xsd:element name="Zip" ENGINE="ZipType" />
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="AddressLineType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="100" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="CityType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="50" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="StateType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="2" />
<xsd:minLength value="2" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="PhoneType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="(((d{3}) ?)|(d{3}-))?d{3}-d{4}" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ZipType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="10" />
<xsd:pattern value="d{5}(-d{4})?" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="EmailType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[w-]+
@([w-]+.)+[w-]+" />
<xsd:maxLength value="100" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="SpecialtyType">
<xsd:restriction base="xsd:string">
<xsd:maxLength value="75" />
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="PhysicianRecordType">
<xsd:sequence>
<xsd:element name="PhysicianID" ENGINE="PhysicianIDType" />
<xsd:element name="Active" ENGINE="xsd:boolean" />
<xsd:element name="FirstName" ENGINE="FirstNameType" />
<xsd:element name="LastName" ENGINE="LastNameType" />
<xsd:element name="Address" ENGINE="AddressType" />
<xsd:element name="PrimaryPhone" ENGINE="PhoneType" />
<xsd:element name="CellPhone" ENGINE="PhoneType" />
<xsd:element name="Fax" ENGINE="PhoneType" />
<xsd:element name="PrimaryEmail" ENGINE="EmailType" />
<xsd:element name="SecondaryEmail" ENGINE="EmailType" />
<xsd:element name="Specialty" ENGINE="SpecialtyType" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="PhysicianRecordType.file" ENGINE="PhysicianRecordType"/>
</xsd:schema>