Improve Holidays Schema Description (xsd) #318
Labels
status: new
Initial state for every issue / pull request
topic: public holiday
type: breaking
This is a breaking change
Milestone
More information
The
Holiday.xsd
that is used to describe the specific holidays of a country does not include best practices provided by https://www.xfront.com/BestPracticesHomepage.html.Best Practices in a Nutshell
Below is a very brief synopsis of the Best Practice guidelines. Each of the items will be
elaborated upon in great detail in the following guidelines.
elementFormDefault (in one copy set elementFormDefault=“qualified”, in the other copy
set elementFormDefault=“unqualified”)
thing as creating an element with an attribute that has an ID-datatype. Rather, what is being
referred to here is the capability to associate an id attribute with every schema component
(types, elements, attributes, etc). Here are some examples:
<xsd:element name=“elevation” type=“xsd:integer” id=“flight:aircraft:elevation”/>
<xsd:complexType name=“publication” id=“wrox:book:publication”/>
This provides a finer level of granularity for identifying components than does namespaces,
which provides only a course level of granularity.
4.1 Postpone binding schema components to a namespace.
Corrollary: Don’t give schema’s a targetNamespace. Let schemas which your no-
namespace schema supply a targetNamespace, one that makes sense to the ing
schema
4.2 Postpone binding a type reference to an implementation, i.e., use dangling types.
Corrollary: In an element the schemaLocation attribute is optional. Don’t use it.
5.1 Recognize your limitations as a schema designer, i.e, be smart enough to know that you’re
not smart enough to anticipate all the varieties of data that an instance document author
might need to use in creating an instance document.
Corrollary: use the element.
Express those business rules using either XSLT or Schematron.
ToDo:
The text was updated successfully, but these errors were encountered: