-
Notifications
You must be signed in to change notification settings - Fork 193
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
Update gbXML schema to v7.03 #4995
Changes from all commits
b4856da
d40c8cf
f8fceca
72728f2
869c484
35e415b
dbda3b1
cd15f16
139077f
f818249
03ba0fc
5ddb8b5
c94807c
ad2d18e
203b0f7
bb8a9f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,13 +182,13 @@ namespace gbxml { | |
gbXMLElement.append_attribute("xmlns:xhtml") = "http://www.w3.org/1999/xhtml"; | ||
gbXMLElement.append_attribute("xmlns:xsi") = "http://www.w3.org/2001/XMLSchema-instance"; | ||
gbXMLElement.append_attribute("xmlns:xsd") = "http://www.w3.org/2001/XMLSchema"; | ||
gbXMLElement.append_attribute("xsi:schemaLocation") = "http://www.gbxml.org/schema http://gbxml.org/schema/6-01/GreenBuildingXML_Ver6.01.xsd"; | ||
gbXMLElement.append_attribute("xsi:schemaLocation") = "http://www.gbxml.org/schema http://gbxml.org/schema/7-03/GreenBuildingXML_Ver7.03.xsd"; | ||
gbXMLElement.append_attribute("temperatureUnit") = "C"; | ||
gbXMLElement.append_attribute("lengthUnit") = "Meters"; | ||
gbXMLElement.append_attribute("areaUnit") = "SquareMeters"; | ||
gbXMLElement.append_attribute("volumeUnit") = "CubicMeters"; | ||
gbXMLElement.append_attribute("useSIUnitsForResults") = "true"; | ||
gbXMLElement.append_attribute("version") = "6.01"; | ||
gbXMLElement.append_attribute("version") = "7.03"; | ||
Comment on lines
+185
to
+191
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. Forward translate with v7.03 header attributes. 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. Naively would expect some stuff to change in there. But from a cursory diff of the v6 and v7 schemas, I think we could perhaps handle the new |
||
gbXMLElement.append_attribute("SurfaceReferenceLocation") = "Centerline"; | ||
|
||
// translateFacility is responsible to translate Surfaces, and calls translateBuilding, which is responsible to translate spaces | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -190,7 +190,9 @@ INSTANTIATE_TEST_SUITE_P(XMLValidatorFixture, GbXMLValidatorParametrizedFixture, | |
std::make_tuple("gbxml/seb.xml", 0, 16), std::make_tuple("gbxml/simpleBox_vasari.xml", 0, 27), | ||
std::make_tuple("gbxml/TestCube.xml", 0, 8), std::make_tuple("gbxml/TestCubeAlternateUnits.xml", 0, 8), | ||
std::make_tuple("gbxml/TestSchedules.xml", 0, 16), std::make_tuple("gbxml/TropicBird.xml", 0, 110), | ||
std::make_tuple("gbxml/TwoStoryOffice_Trane.xml", 0, 236), std::make_tuple("gbxml/ZNETH.xml", 0, 204)), | ||
std::make_tuple("gbxml/TwoStoryOffice_Trane.xml", 0, 236), std::make_tuple("gbxml/ZNETH.xml", 0, 204), | ||
std::make_tuple("gbxml/11_Jay_St.xml", 0, 0), std::make_tuple("gbxml/A00.xml", 0, 0), | ||
std::make_tuple("gbxml/Building_Central_Conceptual_Model.xml", 0, 3)), | ||
Comment on lines
+193
to
+195
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. Test XML validation on the new v7.03 files. |
||
[](const testing::TestParamInfo<GbXMLValidatorParametrizedFixture::ParamType>& info) { | ||
auto filename = std::get<0>(info.param); | ||
std::replace_if( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -477,8 +477,8 @@ XMLValidator XMLValidator::gbxmlValidator() { | |
LOG_AND_THROW("Failed to create a temporary directory for extracting the embedded path"); | ||
} | ||
const bool quiet = true; | ||
::openstudio::embedded_files::extractFile(":/xml/resources/GreenBuildingXML_Ver6.01.xsd", openstudio::toString(tmpDir), quiet); | ||
return XMLValidator(tmpDir / "GreenBuildingXML_Ver6.01.xsd"); | ||
::openstudio::embedded_files::extractFile(":/xml/resources/GreenBuildingXML_Ver7.03.xsd", openstudio::toString(tmpDir), quiet); | ||
return XMLValidator(tmpDir / "GreenBuildingXML_Ver7.03.xsd"); | ||
Comment on lines
+480
to
+481
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. Validate all gbXML files against the v7.03 schema. This is called prior to RT, and after FT. 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 had noted on the first PR that Matt opened that maybe we should add an enum #4980 (comment) Quoting myself: Maybe we should use an enum (or a string with validation... ) and modifying the gbxmlValidator signature to take en optional gbxmlVersion parameter? enum class GbxmlVersion { Ver601, Ver703 };
XMLValidator gbxmlValidator(GbxmlVersion gbxmlVersion = GbxmlVersion::Ver601); Otherwise perhaps we should delete the |
||
} | ||
|
||
XMLValidator XMLValidator::bclXMLValidator(openstudio::BCLXMLType bclXMLType, const VersionString& schemaVersion) { | ||
|
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.
Add a few files (v7.03) from autodesk's test suite.