एक्सएमएल स्कीमा में तत्व शामिल हैं
❮ पूर्ण XML स्कीमा संदर्भ
परिभाषा और उपयोग
एक दस्तावेज़ में समान लक्ष्य नाम स्थान के साथ कई स्कीमा जोड़ने के लिए शामिल तत्व का उपयोग किया जाता है।
तत्व जानकारी
- मूल तत्व: स्कीमा
वाक्य - विन्यास
<include
id=ID
schemaLocation=anyURI
any attributes
>
(annotation?)
</include>
(? चिन्ह यह घोषित करता है कि तत्व शामिल तत्व के अंदर शून्य या एक बार हो सकता है)
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 |
उदाहरण 1
शामिल स्कीमा के साथ, शामिल फ़ाइलों को सभी समान लक्ष्य नामस्थान का संदर्भ देना चाहिए। यदि स्कीमा लक्ष्य नाम स्थान मेल नहीं खाता है, तो शामिल काम नहीं करेगा:
<?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>
❮ पूर्ण XML स्कीमा संदर्भ