Name
xsi:type
Mit dem xsi:type-Attribut können Sie den Typ eines Elements lokal (im Dokument) statt im Schema definieren. Wie XML Schema Part 1: Structures sagt, »An element information item in an instance may, however, explicitly assert its type using the attribute xsi:type.« (»Eine Element-Information in einer Instanz kann jedoch ihren Typ explizit sicherstellen, indem sie xsi:type verwendet«).
Der Wert von xsi:type muss ein QName sein, der den Typ des Elements indentifiziert. Der durch xsi:type spezifizierte Typ muss ein Subtyp des Typs sein, der für das Element ursprünglich deklariert wurde. Damit die xsi:type-Deklaration funktioniert, muss im Schema, das der Validator verwendet, ein passender Typ definiert sein. Typischerweise wird das Attribut ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access