Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Holidays Schema Description (xsd) #318

Closed
3 tasks done
derTobsch opened this issue Sep 20, 2023 · 3 comments
Closed
3 tasks done

Improve Holidays Schema Description (xsd) #318

derTobsch opened this issue Sep 20, 2023 · 3 comments
Labels
status: new Initial state for every issue / pull request topic: public holiday type: breaking This is a breaking change
Milestone

Comments

@derTobsch
Copy link
Contributor

derTobsch commented Sep 20, 2023

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:

@derTobsch derTobsch added the status: new Initial state for every issue / pull request label Sep 20, 2023
@derTobsch
Copy link
Contributor Author

derTobsch commented Sep 20, 2023

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

@XSpielinbox
Copy link
Contributor

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

@derTobsch
Copy link
Contributor Author

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 :)

@derTobsch derTobsch added topic: public holiday type: breaking This is a breaking change labels Sep 20, 2023
@derTobsch derTobsch added this to the 0.21.0 milestone Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: new Initial state for every issue / pull request topic: public holiday type: breaking This is a breaking change
Projects
None yet
Development

No branches or pull requests

2 participants