The VA Smalltalk User’s Guide has a page named “XML Mapping Components” which gives more information on how the XML components are mapped to Smalltalk classes.The data model for this example consists of a person with two addresses: home and work. The person is similar to the JrcCustomer part found in VA: XML Examples, but because it has two addresses the map and schema files differ structurally from the case where components of complex data type have unique data types.Note: There must be a namespace attribute in the XML instance data. This namespace must exactly match the namespaceURI in the mapping specification and the targetNamespace of the schema.The XML tags must reflect the hierarchical nature of the data. That is, the address is contained within the person. The tags must also follow the exact order they appear in the schema definitions.<HomeAddress>The VA Smalltalk User’s Guide states that: “The XML name and the Smalltalk name are assumed to be the same if no mapping is specified.”The VA Smalltalk User’s Guide states: “The rules of the mapping specification will be applied to determine the correct Smalltalk name for an element within the XML document.” The XML name and the Smalltalk name are assumed to be the same if no mapping is specified. The XML must be well-formed but does not need to conform to any specific shape. All data is stored as strings.”NameSpaceURI="xeExample"><xsd:schema targetNamespace="xeExample"<xsd:element name="workAddress" type="xes:Address"/><xsd:element name="homeAddress" type="xes:Address" />As is stated in the VA Smalltalk User’s Guide, “the rules of the mapping specification will be applied to determine the correct Smalltalk name for an element within the XML document.” The XML name and the Smalltalk name are assumed to be the same if no mapping is specified. The XML must be well-formed but does not need to conform to any specific shape. All data is stored as strings.<xsd:schema targetNamespace="xeExample"<xsd:element name="workAddress" type="xes:Address"/>
![]() |