buildingSMART / mvdXML

Repository used by the mvdXML group to support mvdXML specification and implementation.
28 stars 10 forks source link

mvdXML 1.2 reference to IfcUnit #22

Open SergejMuhic opened 3 years ago

SergejMuhic commented 3 years ago

With the requirement to have units available in mvdxml 1.2 we have added a reference to the IFC schema element IfcUnit. Unfortunately, this results in the generation of the entire IFC schema when generating the mvdxml schema just to access IfcUnit.

I would propose to rethink this approach and maintain the IFC and MVD specifications centrally, generating the subschema for mvdxml with just IfcUnit (namespace could also be ifcunit) from this central specification. This would mean that only the IfcUnit would be added to the classes required in mvdxml and would be in-sync with the IFC specification.

pjanck commented 3 years ago

This would probably also resolve #9. I'm glad to help test the final solution.

MatthiasWeise commented 2 years ago

I am not sure about the best approach for automatic schema generation. My feeling is that it depends a bit on your implementation strategy. What I would like to make clear in the mvdXML.xsd is that we are using an existing definition from the IFC schema and do not introduce a new specification. I am therefore very much in favour to use the official namespace "https://standards.buildingsmart.org/IFC/RELEASE/IFC4/Add2TC1" for IfcUnit (with proper import statement as tested by Sergej and Stefan).

For better schema generation we could provide a separate XSD that maybe includes/embeddes the relevant subset for IfcUnit (if that subset is of interest only). This would however mean that we have to resolve all dependencies to other definitions, meaning that we have to add IfcDerivedUnit, IfcMonetaryUnit, IfcNamedUnit, ... and so forth. Right?

So, my proposal is to have one official version with proper link to the IFC4.xsd. A second "implementation" version could include all relevant parts of IfcUnit (for mvdXML implementation only).

SergejMuhic commented 2 years ago

I tested a bit and xsd can be generated according to MVD specs. Meaning, if we would want to restrict the schema to only IfcUnit and its referenced classes, it would be enough to publish a subset based on an MVD definition in https://github.com/bSI-InfraRoom/IFC-Specification. This could be maintained automatically with github.