Java Reference
In-Depth Information
</xsd:simpleType>
<xsd:simpleType name="CategoryType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="LITERATURE"/>
<xsd:enumeration value="PHILOSOPHY"/>
<xsd:enumeration value="PROGRAMMING"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="PriceType">
<xsd:restriction base="xsd:float" />
</xsd:simpleType>
</xsd:schema>
Choose Venetian Blind when you need to maximize reuse and flexibility, and take advantage
of namespace exposure.
See Also
Creating Canonical Data Model .
Garden of Eden
The Garden of Eden schema design pattern, identified by Sun Microsystems, is a combination
of Salami Slice and Venetian Blind. To make a schema following this pattern, define all ele-
ments and types in the global namespace, and then reference elements as necessary.
With Garden of Eden, you get the maximum reuse of all the schema design patterns. You can
freely reuse all elements and types. There is no encapsulation of elements in such a schema.
There are many potential root elements, as they are all global. Documents following this pat-
tern can be harder to read. Unlike Russian Doll, in which it is clear what the root element is,
with Garden of Eden, the author's intentions are masked. The only intention you can gather
is that the author intends to allow you the most flexibility when creating XML instance docu-
ments based on the schema. Of course, as the schema author, you can define elements out of
the box that combine a variety of types your users might need, thereby illustrating to them the
reason you're following this pattern.
The Topic schema you've been working with is shown in Example 2-4 , rearranged to use
Garden of Eden.
Example2-4.Book schema following the Garden of Eden design pattern
Search WWH ::




Custom Search