XML Şeması Öğeyi içerir
❮ Eksiksiz XML Şeması Referansı
Tanım ve Kullanım
Dahil etme öğesi, bir belgeye aynı hedef ad alanına sahip birden çok şema eklemek için kullanılır.
Eleman Bilgileri
- Ana öğeler: şema
Sözdizimi
<include
id=ID
schemaLocation=anyURI
any attributes
>
(annotation?)
</include>
(? işareti, öğenin içerme öğesi içinde sıfır veya bir kez oluşabileceğini bildirir)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
schemaLocation | Required. Specifies the URI to the schema to include in the target namespace of the containing schema |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
örnek 1
Dahil edilen şemalarda, dahil edilen dosyaların tümü aynı hedef ad alanına başvurmalıdır. Şema hedef ad alanı eşleşmezse, dahil etme çalışmaz:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="https://www.w3schools.com/schema">
<xs:include schemaLocation="https://www.w3schools.com/xml/customer.xsd"/>
<xs:include schemaLocation="https://www.w3schools.com/xml/company.xsd"/>
..
..
..
</xs:schema>
❮ Eksiksiz XML Şeması Referansı