Elemento di importazione dello schema XML
❮ Riferimento completo allo schema XML
Definizione e utilizzo
L'elemento import viene utilizzato per aggiungere più schemi con uno spazio dei nomi di destinazione diverso a un documento.
Informazioni sull'elemento
- Elementi principali: schema
Sintassi
<import
id=ID
namespace=anyURI
schemaLocation=anyURI
any attributes
>
(annotation?)
</import>
(Il segno ? dichiara che l'elemento può verificarsi zero o una volta all'interno dell'elemento di importazione)
Attribute | Description |
---|---|
id | Optional. Specifies a unique ID for the element |
namespace | Optional. Specifies the URI of the namespace to import |
schemaLocation | Optional. Specifies the URI to the schema for the imported namespace |
any attributes | Optional. Specifies any other attributes with non-schema namespace |
Esempio 1
L'esempio seguente mostra come importare uno spazio dei nomi:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="https://www.w3schools.com/schema"/>
..
..
..
</xs:schema>
❮ Riferimento completo allo schema XML