120 likes | 197 Views
XML: Managing Data Exchange One-to-One Relationship Presented By: Dustin K. Pitts dkp@uga.edu. 01/30/2006. Objectives XML Overview One-to-One XML Schema. Restrictions in XML Schema XML Document XML Style Sheet. XML Overview XML Schema
E N D
XML: Managing Data Exchange One-to-One Relationship Presented By: Dustin K. Pitts dkp@uga.edu 01/30/2006
Objectives • XML Overview • One-to-One • XML Schema • Restrictions in XML Schema • XML Document • XML Style Sheet
XML Overview XML Schema XML Style Sheet XML Document
One-to-One • Definition • Data Model • Example in Code
Where is Relationship? • Complex Type “countryDetails” • <xsd:element name="topDestination" type="destinationDetails" minOccurs="0" maxOccurs="1"/>
Restrictions in XML Schema Replace Collapse Length, maxLength, minLength Order Indicators <all> <choice> <sequence>
XML Document What does it do? See example code. Notice: <topDestination> has <all>
XML Style Sheet What does this do? See example code. If Statement Greater than, Less than, various operators
Summary • XML Schema • Restrictions on XML Schema • XML Document • XML Style Sheet • If Statement
Exercises • Create and XML schema to represent the most popular professors at a university. Use the replace function to replace all white space characters with spaces and set the maxLength to 15. Include first name, last name, department, and years teaching. • Using the XML schema, create and XML document and populate it with data about a university and its most popular professor. Use at least three universities and two professors at each university. • Write and XML style sheet to display the most popular professors at each school sorted by the professor names. Only list if the professor has over 3 years experience. You must use an if statement function.