Skip to content

Instantly share code, notes, and snippets.

@tomsontom

tomsontom/demo.xsd

Last active Jul 7, 2020
Embed
What would you like to do?
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/demo" xmlns:tns="http://www.example.org/demo" elementFormDefault="qualified">
<complexType name="abstract-element" abstract="true">
<attribute name="attribute" type="string" />
</complexType>
<complexType name="other-element">
<attribute name="attribute" type="string" />
</complexType>
<complexType name="derived-element">
<complexContent>
<extension base="tns:abstract-element">
<attribute name="sub2-attribute" type="string"/>
</extension>
</complexContent>
</complexType>
<element name="test">
<complexType>
<sequence>
<element name="direct" type="tns:abstract-element" />
<element name="other" type="tns:other-element" />
<element name="derive">
<complexType>
<complexContent>
<extension base="tns:abstract-element">
<attribute name="sub-attribute" type="string"/>
</extension>
</complexContent>
</complexType>
</element>
<element name="derive-2" type="tns:derived-element" />
</sequence>
</complexType>
</element>
</schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment