Types Revisited
As with many object-oriented programming languages, it is possible to define a type as being abstract using XML Schemas. This is accomplished using the boolean abstract attribute on the type definition. Given the following schema
<schema xmlns='http://www.w3.org/1999/XMLSchema' targetNamespace='http://flowers.org' xmlns:tns='http://flowers.org' > <complexType name='flower' abstract='1' /> <element name='bouquet' type='tns:flower' /> </schema>
the bouquet element declaration refers to an abstract type. This means that one must provide a derived type in order to use the bouquet element in an instance document. When an element declaration refers to an abstract type, all instances of that element must use the xsi:type attribute ...
Get Essential XML: Beyond Markup now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.