Open vs closed Templates

Revision as of 10:00, 17 May 2013 by Admin (talk | contribs) (What makes an open / closed template?)

What makes an open / closed template?

An open template defines what's relevant for that template while allowing undefined contents in the instance. From the perspective of the template this undefined content is ignored. This may have benefits if it is to be expected that implementations add additional content, or when you want to cater backward compatibility in a next version of the template.

A closed template defines what's relevant for that template and leaves no room for any other contents in the instance. An instance is considered non-conformant if it contains anything beyond the template definition.

Note that during the publication phase, e.g. for development, testing and qualification purposes, it is possible via a parameter to create schematrons as if everything has @isClosed="true" so any undefined content is detected.