- Creați o schemă XML pentru a descrie un muzeu (utilizați elemente ale entității muzeului definite în ultimul capitol și adăugați un element de țară). Specificați un set de valori acceptabile ca țară și calendarul acesteia cu data, ora de deschidere și ora de închidere.
- Folosind schema, creați un document XML și completați-l cu date pentru două muzee cu cel puțin 5 date diferite în calendar pentru un muzeu și 7 date diferite pentru celălalt muzeu.
Include texte traduse și adaptate din Wikibooks de Nicolae Sfetcu
Schema XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
<?xml version=”1.0″ encoding=”UTF-8″?> <xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema”> <xsd:element name=”museum_info”> <xsd:complexType> <xsd:sequence> <xsd:element name="museum" type="museum_details" minOccurs="1" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:complexType name=”museum_details”> <xsd:sequence> <xsd:element name="museumName" type="xsd:string"/> <xsd:element name="dateEstablished" type="xsd:int"/> <xsd:element name="address" type="xsd:string"/> <xsd:element name="link" type="xsd:string"/> <xsd:element name="mPicture"/> <xsd:element name="country"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="Germany"/> <xsd:enumeration value="Turkey"/> <xsd:enumeration value="USA"/> <xsd:enumeration value="Canada"/> <xsd:enumeration value="Mexico"/> <xsd:enumeration value="France"/> <xsd:enumeration value="Holland"/> <xsd:enumeration value="Spain"/> <xsd:enumeration value="China"/> <xsd:enumeration value="Japan"/> <xsd:enumeration value="India"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="museumHours" type="hours" minOccurs="1" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> <xsd:complexType name=”hours”> <xsd:sequence> <xsd:element name="date" type="xsd:string"/> <xsd:element name="openingTime" type="xsd:string"/> <xsd:element name="location" type="xsd:string"/> <xsd:element name="eventType" type="xsd:string"/> <xsd:element name="eventDescription" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:schema> |
Document XML
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
<museum_info xsi:noNamespaceSchemaLocation=”museum.xsd”> <museum> <museumName>Metropolitan Museum of Art</museumName> <dateEstablished>1870</dateEstablished> <address>1000 Fifth Avenue, New York, NY 10028</address> <link>http://metmuseum.org</link> <mPicture filename="themet.jpg"/> <country>USA</country> <museumHours> <date>02-17-2004</date> <openingTime>11:00 a.m.</openingTime> <location>Great Hall</location> <eventType>Gallery Talk</eventType> <eventDescription> Poets, Lovers, and Heroes in Italian Mythological Prints </eventDescription> </museumHours> <museumHours> <date>02-17-2004</date> <openingTime>11:00 a.m.</openingTime> <location>Uris Center for Education</location> <eventType>Family Program</eventType> <eventDescription> A gallery program for visitors ages five through twelve and accompanying adults to welcome them to the Museum's collection through discussions and sketching </eventDescription> </museumHours> <museumHours> <date>02-18-2004</date> <openingTime>6:00 p.m.</openingTime> <location>Grace Rainey Rogers Auditorium</location> <eventType>Lecture</eventType> <eventDescription> Curious Combinations in Siracusa and Palermo; a Baroque Stucco Oratory; and Churches in Modica and Ragusa Ibla </eventDescription> </museumHours> <museumHours> <date>02-19-2004</date> <openingTime>11:00 a.m.</openingTime> <location>Great Hall</location> <eventType>Gallery Talk</eventType> <eventDescription> Images of George Washington </eventDescription> </museumHours> <museumHours> <date>02-20-2004</date> <openingTime>2:00 p.m.</openingTime> <location>Vanderlyn's Panorama</location> <eventType>Lecture</eventType> <eventDescription> A Lacquer Penbox by Manohar: An Example of Late Safavid Style Painting in India </eventDescription> </museumHours> <museumHours> <date>02-20-2004</date> <openingTime>3:00 p.m.</openingTime> <location>Great Hall</location> <eventType>Gallery Talk</eventType> <eventDescription> Trade and Exchange in the Ancient Near East </eventDescription> </museumHours> <museumHours> <date>02-21-2004</date> <openingTime>11:00 a.m.</openingTime> <location> Grace Rainey Rogers Auditorium</location> <eventType>Film</eventType> <eventDescription> Like Water for Chocolate - this feature film weaves a romantic fable in which chocolate plays a pivotal role in the cuisine of a passionate young cook. </eventDescription> </museumHours> </museum> </museum_info> |
Introducere în Business Intelligence
O resursă esențială pentru toți cei interesați de analiza datelor și de optimizarea proceselor de afaceri.
Căutarea, extragerea, organizarea și evaluarea informațiilor
Transformă informația în putere cu ajutorul acestei cărți indispensabile!
Adobe Photoshop pentru începători
Descoperă-ți potențialul creativ și învață să creezi imagini care vor captiva.
Partajează asta:
- Dă clic pentru a partaja pe Facebook(Se deschide într-o fereastră nouă)
- Dă clic pentru a partaja pe Twitter(Se deschide într-o fereastră nouă)
- Dă clic pentru a partaja pe LinkedIn(Se deschide într-o fereastră nouă)
- Dă clic pentru a partaja pe Pinterest(Se deschide într-o fereastră nouă)
- Dă clic pentru partajare pe WhatsApp(Se deschide într-o fereastră nouă)
Lasă un răspuns