150 likes | 355 Views
Bölüm 6 – Kompleks Tip Şema Tanımları. İçindekiler 6 .1 Kompleks Tip Şema Nedir? 6 .2 Element Tanımlarını Referans Göstermek 6 .3 İsimli Tip Tanımları 6 .4 Elementlerin Sıralanış Seçeneklerini Belirlemek 6.5 Nitelikleri Tanımlamak. Kompleks Tip Şema Nedir?.
E N D
Bölüm6 –Kompleks Tip Şema Tanımları İçindekiler6.1 Kompleks Tip Şema Nedir?6.2 Element Tanımlarını Referans Göstermek6.3 İsimli Tip Tanımları6.4 Elementlerin Sıralanış Seçeneklerini Belirlemek 6.5 Nitelikleri Tanımlamak
Kompleks Tip Şema Nedir? • Basit tip: sadece bir elementten oluşur • Kompleks tip: • Element içinde • Başka elementler • Nitelikler • Karakter bilgisi kısımlarından en az biri tarafından oluşuyorsa
Basittipli_sema.xsd <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:element name=“tur”/> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> <xs:element name=“baslangiç-tarihi” type=“xs:string” /> <xs:element name=“bitis-tarihi” type=“xs:string”/> <xs:element name=“ulasım” type=“xs:string”/> <xs:element name=“konaklama” type=“xs:string”/> </xs:schema> Hangi element hangi elementin içinde belli değil
Komplekstip_sema1.xsd <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element name=“tur”/> <xs:complexType> <xs:sequence> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> <xs:element name=“baslangiç-tarihi” type=“xs:string” /> <xs:element name=“bitis-tarihi” type=“xs:string”/> <xs:element name=“ulasım” type=“xs:string”/> <xs:element name=“konaklama” type=“xs:string”/> </xs:sequence> </xs:complexType> </xs.element> </xs:sequence> </xs:complexType> </xs.element> </xs:schema>
komplekRef_sema2.xsd <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element ref=“tur”/> </xs:sequence> </xs:complexType> </xs.element> <xs:element name=“tur”/> <xs:complexType> <xs:sequence> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> <xs:element name=“baslangiç-tarihi” type=“xs:string” /> <xs:element name=“bitis-tarihi” type=“xs:string”/> <xs:element name=“ulasım” type=“xs:string”/> <xs:element name=“konaklama” type=“xs:string”/> </xs:sequence> </xs:complexType> </xs.element> </xs:schema>
IsimliTip_sema3.xsd <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element name=“tur” type=“tur_bilgileri”/> <xs:element name=“program type=“tur_bilgileri”> </xs:sequence> </xs:complexType> </xs.element> <xs:complexType name=“tur_bilgileri”> <xs:sequence> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> <xs:element name=“baslangiç-tarihi” type=“xs:string” /> <xs:element name=“bitis-tarihi” type=“xs:string”/> <xs:element name=“ulasım” type=“xs:string”/> <xs:element name=“konaklama” type=“xs:string”/> </xs:sequence> </xs:complexType> </xs:schema>
Siralama_sema4.xsd (<xs:sequence>) <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element ref=“tur”/> </xs:sequence> </xs:complexType> </xs.element> <xs:element name=“tur”/> <xs:complexType> <xs:sequence> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> <xs:element name=“baslangiç-tarihi” type=“xs:string” /> <xs:element name=“bitis-tarihi” type=“xs:string”/> <xs:element name=“ulasım” type=“xs:string”/> <xs:element name=“konaklama” type=“xs:string”/> </xs:sequence> </xs:complexType> </xs.element> </xs:schema>
Secenek_sema5.xsd (<xs:choice>) <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element ref=“tur”/> </xs:sequence> </xs:complexType> </xs.element> <xs:element name=“tur”/> <xs:complexType> <xs:choice> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> <xs:element name=“baslangiç-tarihi” type=“xs:string” /> <xs:element name=“bitis-tarihi” type=“xs:string”/> <xs:element name=“ulasım” type=“xs:string”/> <xs:element name=“konaklama” type=“xs:string”/> </xs:choice> </xs:complexType> </xs.element> </xs:schema>
SecenekSiralama_sema6.xsd (<xs:choice>) (<xs:sequence>) <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element ref=“tur”/> </xs:sequence> </xs:complexType> </xs.element> <xs:element name=“tur”/> <xs:complexType> <xs:choice> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> <xs:sequence> <xs:element name=“baslangiç-tarihi” type=“xs:string” /> <xs:element name=“bitis-tarihi” type=“xs:string”/> <xs:element name=“ulasım” type=“xs:string”/> <xs:element name=“konaklama” type=“xs:string”/> </xs:sequence> </xs:choice> </xs:complexType> </xs.element> </xs:schema>
sirasiz_sema7.xsd (<xs:all>) <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element ref=“tur”/> </xs:sequence> </xs:complexType> </xs.element> <xs:element name=“tur”/> <xs:complexType> <xs:all> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> <xs:element name=“baslangiç-tarihi” type=“xs:string” /> <xs:element name=“bitis-tarihi” type=“xs:string”/> <xs:element name=“ulasım” type=“xs:string”/> <xs:element name=“konaklama” type=“xs:string”/> </xs:all> </xs:complexType> </xs.element> </xs:schema>
Element_sayisi_sema8.xsd (minOccurs, maxOccurs) <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element ref=“tur”/> </xs:sequence> </xs:complexType> </xs.element> <xs:element name=“tur”/> <xs:complexType> <xs:sequence> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> <xs:element name=“baslangiç-tarihi” type=“xs:string” /> <xs:element name=“bitis-tarihi” type=“xs:string”/> <xs:element name=“ulasım” type=“xs:string” maxOccurs=“2”/> <xs:element name=“konaklama” type=“xs:string” minOccurs=“0”/> </xs:sequence> </xs:complexType> </xs.element> </xs:schema>
Nitelik_tanımlama_sema9.xsd (<xs:attribute name=“” type=“”/>) <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element ref=“tur”/> </xs:sequence> </xs:complexType> </xs.element> <xs:element name=“tur”/> <xs:complexType> <xs:attribute name=“no” type=“xs:integer”/> <xs:attribute name=“bölge” type=“xs:string” use=“required”/> <xs:sequence> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> <xs:element name=“baslangiç-tarihi” type=“xs:string” /> <xs:element name=“bitis-tarihi” type=“xs:string”/> <xs:element name=“ulasım” type=“xs:string” maxOccurs=“2”/> <xs:element name=“konaklama” type=“xs:string” minOccurs=“0”/> </xs:sequence> </xs:complexType> </xs.element> </xs:schema>
Nitelik_ve_Text_tanımlama_sema10.xsd (<xs:attribute name=“” type=“”/>) (mixed=“true”) <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element ref=“tur”/> </xs:sequence> </xs:complexType> </xs.element> <xs:element name=“tur”/> <xs:complexType mixed=“true”> <xs:attribute name=“no” type=“xs:integer”/> <xs:attribute name=“bölge” type=“xs:string” use=“required”/> </xs:complexType> </xs.element> </xs:schema>
Nitelik_zorunlu_sema11.xsd (use=“required” ) <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element ref=“tur”/> </xs:sequence> </xs:complexType> </xs.element> <xs:element name=“tur”/> <xs:complexType mixed=“true”> <xs:sequence> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> </xs:sequence> <xs:attribute name=“no” type=“xs:integer” /> <xs:attribute name=“bölge” type=“xs:string” use=“required”/> </xs:complexType> </xs.element> </xs:schema>
Nitelik_icerigi_sema12.xsd (fixed=“....” veya default=“....” ) <?xml version="1.0" encoding="ISO-8859-9" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=“turlar-rehberi”/> <xs:complexType> <xs:sequence> <xs:element ref=“tur”/> </xs:sequence> </xs:complexType> </xs.element> <xs:element name=“tur”/> <xs:complexType mixed=“true”> <xs:sequence> <xs:element name=“tur-adi” type=“xs:string”/> <xs:element name=“guzergah” type=“xs:string”/> </xs:sequence> <xs:attribute name=“no” type=“xs:integer” fixed=“1” /> <xs:attribute name=“bölge” type=“xs:string” default=“güney”/> </xs:complexType> </xs.element> </xs:schema>