focus-shift/jollyday

Improve Holidays Schema Description (xsd)

Closed this issue · 3 comments

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.

  1. Make targetNamespace the default namespace.
  2. Make two identical copies of all your schemas, where the copies differ only in the value of
    elementFormDefault (in one copy set elementFormDefault=“qualified”, in the other copy
    set elementFormDefault=“unqualified”)
  3. Uniquely identify all schema components with the id attribute. Note: this is NOT the same
    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.

  1. Postpone decisions as long as possible.
    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.
  2. Create extensible schemas.
    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.
  3. Recognize that with XML Schemas you will not be able to express all your business rules.
    Express those business rules using either XSLT or Schematron.

ToDo:

This is to get to know the code better for #284 and #275

In case, I can help, feel free to reach out to me and I will see what I can do.

In case, I can help, feel free to reach out to me and I will see what I can do.

Thanks @XSpielinbox. At the moment I need to get an overview where we are standing with jollyday in the "xml section" with xsds and other things. But when I have an overview I will ping you :)