Skip to content

Instantly share code, notes, and snippets.

@tomsontom
Last active July 7, 2020 19:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomsontom/25ee9031e8812b087e2886266a26fae7 to your computer and use it in GitHub Desktop.
Save tomsontom/25ee9031e8812b087e2886266a26fae7 to your computer and use it in GitHub Desktop.
<?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