This is a collection of official and community provided BuildingSync Use Cases. Each folder is an application, standard, or organization which the Use Case is intended for.
To contribute a new use case, open a pull request that includes a Schematron and example XML file which meet our requirements specified below. All tests should pass as well (see development below).
Schematron files must be located under <Org or Application Name>/schematron/<Use Case Name>.sch, where:
<Org or Application Name>can be anything<Use Case Name>starts with the name (any alphanumeric characters) followed a dash-separated version. For example:MyUseCase-1.0.0.
The Schematron file itself must meet the following requirements (which are tested by our automated test suite).
- The
sch:schemaattribute@queryBindingmust be xslt1 - The
sch:schemaattribute@schemaVersionmust be defined and follow the pattern of<schematron semantic version>-<minimum supported BuildingSync version>-<maximum supported BuildingSync version>. Note that<maximum supported BuildingSync version>is optional. Versioning of Schematron documents should follow BuildingSync's recommended versioning. For example, the followingschemaVersions are considered valid:1.0.0-2.3.0: Schematron is version1.0.0and it validates against BuildingSync documents2.3.0and later2.3.4-2.0.0-3.0.0: Schematron version is2.3.4and it validates against BuildingSync documents from2.0.0to3.0.0.
- Every
sch:patternMUST include atitle - Every
sch:assertMUST include the attribute@rolewhich must be one ofERROR,WARNINGorINFO
In addition to the Schematron, we require that you provide at least one example of a BuildingSync document which validates against the Use Case. The example file must be under the examples/ subdirectory, and must start with the name of the Schematron it is valid against.
For example, if your use case was at Foo/schematron/Foo-1.0.0.sch, then you must have one or more files such as Foo/examples/Foo-1.0.0-<example name>.xml.
E.g.
Foo/examples/Foo-1.0.0-Simple.xmlFoo/examples/Foo-1.0.0-Residential.xmlFoo/examples/Foo-1.0.0-Commercial.xml
Additional tests specific to a use case can be added under the tests/use_cases/ directory.
First install poetry. Then run
poetry installpoetry run pytest