1 / 10

Source Data: John Doe

Health Care Analyst A. 0. Source Data: John Doe. Analyze, XMLize. 1. Context: Hospital Patient Record. Proposed Tag: <Patient>. <?xml version=“1.0” ?> <Patient>John Doe</Patient>. 2. Well-formed XML document. Health Care Analyst B. 0. Source Data: John Doe. Analyze, XMLize. 1.

Download Presentation

Source Data: John Doe

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Health Care Analyst A 0 Source Data:John Doe Analyze, XMLize 1 Context:Hospital Patient Record Proposed Tag: <Patient> <?xml version=“1.0” ?> <Patient>John Doe</Patient> 2 Well-formed XML document

  2. Health Care Analyst B 0 Source Data:John Doe Analyze, XMLize 1 Context:Hospital Patient Record Proposed Tag: <InPatient> <?xml version=“1.0” ?> <InPatient>John Doe</InPatient> 2 Well-formed XML document Problem: Same data, same context, different XMLization

  3. VALIDATION – Exercising Control over your Data Schemas provide a means for specifying your entire XML ‘vocabulary’. Because they are written in XML they can be processed just like any other XML document. <?xml version="1.0"?> <Patient>John Doe</Patient> <?xml version="1.0"?> <xs:schema xmlns:xsd=http://www.w3.org/2001/XMLSCHEMA> <xs:element name="Patient" type="xs:string"/> </xs:schema>

  4. <?xml version="1.0"?> <HospitalizationRecord> <Client>John Doe</Client> <Date>18-FEB-04</Date> <Comment>Patient showed severe malnutrition</Comment> </HospitalizationRecord> <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="HospitalizationRecord"> <xs:complexType> <xs:sequence> <xs:element name="Client" type="xs:string"/> <xs:element name="Comment" type="xs:string"/> <xs:element name="Date" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>

  5. <?xml version="1.0"?> <HospitalizationRecord> <Client>John Doe</Client> <Date>18-FEB-04</Date> <Comment>Patient showed severe malnutrition</Comment> </HospitalizationRecord> <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="Client" type="xs:string"/> <xs:element name="Comment" type="xs:string"/> <xs:element name="Date" type="xs:string"/> <xs:element name="HospitalizationRecord"> <xs:complexType> <xs:sequence> <xs:element ref="Client"/> <xs:element ref="Date"/> <xs:element ref="Comment"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>

  6. In-Class Exercise Write the XSD for the following XML document: <?xml version="1.0"?> <Case> <Physician>Dr. Alberts</Physician> <Date>18-FEB-04</Date> <Patient>John Doe</Patient> <Diagnosis>Diabetes</Diagnosis> <Insurance>Kaiser Permanente</Insurance> </Case>

More Related