-
Notifications
You must be signed in to change notification settings - Fork 22
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
Proposal to harmonize definitions of PremisesAffected
and LinkedPremises
#59
Changes from 1 commit
d95fdda
9383f51
48434ec
e659baa
4ae878a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Harmonize Definitions of `PremisesAffected` and `LinkedPremises` Elements | ||
|
||
## Overview | ||
|
||
The BuildingSync XML (BSXML) schema provides more than one way to relate a concept to other elements, including `Site`, `Facility` and `Subsection` elements: the `PremisesAffected` and `LinkedPremises` elements. | ||
|
||
The duplication of functionality is confusing for end-users and downstream software developers. | ||
|
||
## Justification | ||
|
||
An example of the usage of the `PremisesAffected` element (within the context of a `Measure` element) is: | ||
|
||
```xml | ||
<Measure> | ||
<!-- ... before ... --> | ||
<PremisesAffected> | ||
<PremiseAffected IDref="Site1"> | ||
<MeasureCoverage>10</MeasureCoverage> | ||
</PremiseAffected> | ||
<PremiseAffected IDref="Facility1"> | ||
<MeasureCoverage>20</MeasureCoverage> | ||
</PremiseAffected> | ||
<PremiseAffected IDref="Subsection1"> | ||
<MeasureCoverage>40</MeasureCoverage> | ||
</PremiseAffected> | ||
</PremisesAffected> | ||
<!-- ... after ... --> | ||
</Measure> | ||
``` | ||
|
||
A corresponding example of the usage of the `LinkedPremises` element is: | ||
|
||
```xml | ||
<LinkedPremises> | ||
<Site> | ||
<LinkedSiteID IDref="Site1"/> | ||
</Site> | ||
<Facility> | ||
<LinkedFacilityID IDref="Facility1"/> | ||
</Facility> | ||
<Subsection> | ||
<LinkedSubsectionID IDref="Subsection1"/> | ||
</Subsection> | ||
</LinkedPremises> | ||
``` | ||
|
||
Note that: | ||
|
||
* The `PremisesAffected` element is a child of the `Measure` element. Within each `PremiseAffected` element, there may be a child `MeasureCoverage` element. | ||
* Unlike the `LinkedPremises` element and its child elements, the `PremiseAffected` element does not indicate the type of the referenced element (the target of the `IDref` attribute). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this is a big issue. |
||
|
||
## Implementation | ||
|
||
This proposal is to harmonize the definition of the `PremisesAffected` element with that of the `LinkedPremises` element. For example: | ||
|
||
```xml | ||
<Measure> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks nice. I like that we can reuse LinkedPremises and remove the Tagging @jasondegraw There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @nllong It makes the most sense to me to just reuse |
||
<!-- ... before ... --> | ||
<LinkedPremises> | ||
<Site> | ||
<LinkedSiteID IDref="Site1"> | ||
<MeasureCoverage>10</MeasureCoverage> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer that we use the currently implemented floor area element instead of adding an additional element here. |
||
</LinkedSiteID> | ||
</Site> | ||
<Facility> | ||
<LinkedFacilityID IDref="Facility1"> | ||
<MeasureCoverage>20</MeasureCoverage> | ||
</LinkedFacilityID> | ||
</Facility> | ||
<Subsection> | ||
<LinkedSubsectionID IDref="Subsection1"> | ||
<MeasureCoverage>40</MeasureCoverage> | ||
</LinkedSubsectionID> | ||
</Subsection> | ||
</LinkedPremises> | ||
<!-- ... after ... --> | ||
</Measure> | ||
``` | ||
|
||
Note that: | ||
* Using XSD, the `LinkedPremises` element can be defined as a child element of the `Measure` element (with optional `MeasureCoverage` elements). | ||
* The `LinkedPremises` structure indicates the type of the referenced element. | ||
|
||
## References | ||
|
||
n/a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you suggest moving
MeasureCoverage
to another level, or addingMeasureCoverage
to LinkedPremises?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this context, adding a
MeasureCoverage
element is redundant. We can edit the documentation of theLinkedPremises
so that it is no longer so system-centric, which should be enough to use the element without structural additions.