EnEff-BIM converter release 0.5

now supports nested time series in IfcPropertyReference.
Note: only implementation ready, the mapping entries need to be specified:

INLINE COMMENTS ON NEEDED ENTRIES (AND IMPLEMENTED „CODE BEHIND“ – CB) – EACH INLINE ADDED HYPHEN CORRESPONDS TO ONE NEEDED ENTRY
WITH THESE TO BE ADDED TO REQCAP SPECIFICATIONS (FOR ONE OF TWO POSSIBLE CASES - YEAR or DAY) THREE SIMMODEL ELEMENTS ARE GENERATED.

NOTE: in order to distinguish the two following generally supported time series mapping cases we evaluate the „TimeStep“ field value of the IFC object.
need to this for all following mapping table entries by adding one of the two possible terms in the „MappingType“ CSV column:
- case of year (code behind: value >= 31536000): IfcRegularTimeSeries.###.###.TimeStep.31536000
- case of day (code behind: value <= 3600): IfcRegularTimeSeries.###.###.TimeStep. 3600

1 - SimXML)

<SimTimeSeriesSchedule_Year_Default RefId="ID26351“>

-
RegularTimeSeries_1;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries";"SimTimeSeriesSchedule_Year_Default";

      <simcore:SimUniqueID>4c2ca483-7fd1-4a09-be78-025ebe317d4e</simcore:SimUniqueID>

- CB_1 (due to missing GlobalId on IFC time series object): use "IfcRegularTimeSeries.###.###.CB“ in the IFC column, it returns the unique id of the current element. then in order to add further specification, e.g. the reference id of the week element add the targets specific prefix („_prv02_“) separated by a dot at the end of the term: "IfcRegularTimeSeries.###.###.CB_1.ID_prv02_“. NOTE: returns static prefixed GlobalId value from the IFC component that is connected to the time series object, in order to distinguish multiple occurrences.
<simcore:SimModelType>Year</simcore:SimModelType>

- CB2: for all the static values you can add the exact value behind the last item in the IFC column, e.g. (…);"IfcRegularTimeSeries.###.###.Year“; "SimTimeSeriesSchedule_Year_Default .simcore:SimModelSubtype“
        Type;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries.###.###.Year";"SimTimeSeriesSchedule_Year_Default.simcore:SimModelType";
              <simcore:SimModelSubtype>Default</simcore:SimModelSubtype>

- same as CB2
        <simcore:SimModelName>RotationSpeed</simcore:SimModelName>

-
 Name;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries.###.###.Name";"SimTimeSeriesSchedule_Year_Default.simres:SimTimeSeriesSched_Name";

        <simres:SimTimeSeriesSched_Sched_WeekName_1_53>ID26353</simres:SimTimeSeriesSched_Sched_WeekName_1_53>

- NEW: ADD static value (prefix to common id see CB1):
 LinkToWeek;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries.###.###.CB_1.ID_prv02_";"SimTimeSeriesSchedule_Year_Default.simres:SimTimeSeriesSched_Sched_WeekName_1_53";

        <simres:SimTimeSeriesSched_StartMonth_1_53>1</simres:SimTimeSeriesSched_StartMonth_1_53>

CB_3: (provide xslt function for string operation; substring(<nameOfField>,<startIndex>,<howmanyCharacters>), sample entry:  StartMonth;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries.###.###.substring(StartTime,6,2)";"SimTimeSeriesSchedule_Year_Default.simres:SimTimeSeriesSched_StartMonth_1_53";

        <simres:SimTimeSeriesSched_StartDay_1_53>1</simres:SimTimeSeriesSched_StartDay_1_53>

	- CB_3: StartDay;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries.###.###.substring(StartTime,9,2)";"SimTimeSeriesSchedule_Year_Default.simres:SimTimeSeriesSched_StartDay_1_53";

        <simres:SimTimeSeriesSched_EndMonth_1_53>12</simres:SimTimeSeriesSched_EndMonth_1_53>

	- CB_3: EndMonth;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries.###.###.substring(EndTime,6,2)";"SimTimeSeriesSchedule_Year_Default.simres:SimTimeSeriesSched_EndMonth_1_53"

                <simres:SimTimeSeriesSched_EndDay_1_53>31</simres:SimTimeSeriesSched_EndDay_1_53>

	- CB_3: EndDay;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries.###.###.substring(EndTime,9,2)";"SimTimeSeriesSchedule_Year_Default.simres:SimTimeSeriesSched_EndDay_1_53";

    </SimTimeSeriesSchedule_Year_Default>
<SimTimeSeriesSchedule_Week_Daily RefId="ID26353“>

- RegularTimeSeries_2;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries";"SimTimeSeriesSchedule_Week_Daily";

        <simcore:SimUniqueID>a4794b2b-c660-4e8d-9ff6-bb9b18500366</simcore:SimUniqueID>

	- same as CB1
        <simcore:SimModelType>Week</simcore:SimModelType>

- same as CB2
        <simcore:SimModelSubtype>Daily</simcore:SimModelSubtype>

- same as CB2
        <simcore:SimModelName>RotationSpeed</simcore:SimModelName>

- copy the equivalent SimTimeSeriesSchedule_Year_Default entry and adjust it to SimTimeSeriesSchedule_Week_Daily
        <simres:SimTimeSeriesSched_SundaySched_DayName>ID26357</simres:SimTimeSeriesSched_SundaySched_DayName>

- do we need ALL these fields pointing to the same „generic“ day instance? needs specification.
        <simres:SimTimeSeriesSched_MondaySched_DayName>ID26357</simres:SimTimeSeriesSched_MondaySched_DayName>

- as previous
               <simres:SimTimeSeriesSched_TuesdaySched_DayName>ID26357</simres:SimTimeSeriesSched_TuesdaySched_DayName>

- as previous
        <simres:SimTimeSeriesSched_WedSched_DayName>ID26357</simres:SimTimeSeriesSched_WedSched_DayName>

- as previous
        <simres:SimTimeSeriesSched_ThursdaySched_DayName>ID26357</simres:SimTimeSeriesSched_ThursdaySched_DayName>

- as previous
        <simres:SimTimeSeriesSched_FridaySched_DayName>ID26357</simres:SimTimeSeriesSched_FridaySched_DayName>

- as previous
        <simres:SimTimeSeriesSched_SaturdaySched_DayName>ID26357</simres:SimTimeSeriesSched_SaturdaySched_DayName>

- as previous
        <simres:SimTimeSeriesSched_HolidaySched_DayName>ID26357</simres:SimTimeSeriesSched_HolidaySched_DayName>

- as previous
        <simres:SimTimeSeriesSched_SummerDesignDaySched_DayName>ID26357</simres:SimTimeSeriesSched_SummerDesignDaySched_DayName>

- as previous
        <simres:SimTimeSeriesSched_WinterDesignDaySched_DayName>ID26357</simres:SimTimeSeriesSched_WinterDesignDaySched_DayName>

- as previous
        <simres:SimTimeSeriesSched_CustomDay_1_2_SchedDayName>ID26357 ID26357</simres:SimTimeSeriesSched_CustomDay_1_2_SchedDayName>

- CB_1: LinkToDay"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries.###.###.CB_1.ID_prv03_";"SimTimeSeriesSchedule_Week_Daily.simres:SimTimeSeriesSched_CustomDay_1_2_SchedDayName";

           </SimTimeSeriesSchedule_Week_Daily>

<SimTimeSeriesSchedule_Day_Interval RefId="ID26357“>

-  RegularTimeSeries_3;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries";"SimTimeSeriesSchedule_Day_Interval";

               <simcore:SimUniqueID>3be5c98c-2f4f-4b4a-a6cc-171a582ffd90</simcore:SimUniqueID>

- same as above
        <simcore:SimModelType>Day</simcore:SimModelType>

- same as above
        <simcore:SimModelSubtype>Interval</simcore:SimModelSubtype>

- same as above
        <simcore:SimModelName>v</simcore:SimModelName>

- same as above
        <simres:SimTimeSeriesSched_Time_1_144>

- same as above
            <simcore:stringItem>Until: 24:00</simcore:stringItem>

- same as above
        </simres:SimTimeSeriesSched_Time_1_144>

        <simres:SimTimeSeriesSched_ValUntilTime_1_144>1</simres:SimTimeSeriesSched_ValUntilTime_1_144>

- Values;"";"IfcRegularTimeSeries.###.###.TimeStep.31536000";"IfcRegularTimeSeries.###.###.Values";"SimTimeSeriesSchedule_Day_Interval.simres:SimTimeSeriesSched_ValUntilTime_1_144";
    </SimTimeSeriesSchedule_Day_Interval>

2 - SimXML)

<SimTimeSeriesSchedule_Year_Default> same as above

>> same as above with ModelType column: IfcRegularTimeSeries.###.###.Interval.3600
<SimTimeSeriesSchedule_Week_Daily> same as above

>> same as above with ModelType column: IfcRegularTimeSeries.###.###.Interval.3600
<SimTimeSeriesSchedule_Day_Interval RefId="ID26357“>
- RegularTimeSeries_3;"";"IfcRegularTimeSeries.###.###.TimeStep.3600";"IfcRegularTimeSeries";"SimTimeSeriesSchedule_Day_Interval";

             <simcore:SimUniqueID>3be5c98c-2f4f-4b4a-a6cc-171a582ffd90</simcore:SimUniqueID>
- same as above
        <simcore:SimModelType>Day</simcore:SimModelType>
- same as above
        <simcore:SimModelSubtype>Interval</simcore:SimModelSubtype>
- same as above
        <simcore:SimModelName>RotationSpeed</simcore:SimModelName>
- same as above
        <simres:SimTimeSeriesSched_Time_1_144>

- CB_1 (the only „BLACKBOX“ string operation hard code, due to count integrer derived from position function of xslt1.0):
Values;"";"IfcRegularTimeSeries.###.###.TimeStep.3600";"IfcRegularTimeSeries.###.###.Values__Until_24_00";"SimTimeSeriesSchedule_Day_Interval.simres:SimTimeSeriesSched_Time_1_144";

            <simcore:stringItem>Until: 1:00</simcore:stringItem>
- DONE GENERICALLY
            <simcore:stringItem>Until: 2:00</simcore:stringItem>
- ...
            <simcore:stringItem>Until: 3:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 4:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 5:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 6:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 7:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 8:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 9:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 10:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 11:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 12:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 13:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 14:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 15:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 16:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 17:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 18:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 19:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 20:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 21:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 22:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 23:00</simcore:stringItem>
-
            <simcore:stringItem>Until: 24:00</simcore:stringItem>
       </simres:SimTimeSeriesSched_Time_1_144>
        <simres:SimTimeSeriesSched_ValUntilTime_1_144>0.1 0.1 0.1 0.1 0.1 0.1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0.1 0.1 0.1 0.1</simres:SimTimeSeriesSched_ValUntilTime_1_144>
- Values;"";"IfcRegularTimeSeries.###.###.TimeStep.3600";"IfcRegularTimeSeries.###.###.Values";"SimTimeSeriesSchedule_Day_Interval.simres:SimTimeSeriesSched_ValUntilTime_1_144";

         </SimTimeSeriesSchedule_Day_Interval>
parent 40907822
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcActor.xsl 12.7.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcActor"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="'name'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<!-- KIT Tool | EneffBIM converter 2016 Version 0.5 (Author KIT BLM) IfcActor.xsl 25.7.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcActor"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="'name'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcController.xsl 12.7.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template name="IfcController" match="ifc:IfcController" mode="experimental"> <SimController_SupplyWater_Temperature RefId="ID877"> <simcore:SimUniqueID>ef8214c0-7b34-45cf-a4f5-b4a0473ccf13</simcore:SimUniqueID> <simcore:SimModelType>SupplyWater</simcore:SimModelType> <simcore:SimModelSubtype>Temperature</simcore:SimModelSubtype> <simcore:SimModelName>WTS-1</simcore:SimModelName> <simcore:SourceModelSchema>Simergy v1.9.0.20090</simcore:SourceModelSchema> <simcore:SourceModelObjectType>SIM:SimController</simcore:SourceModelObjectType> <simcore:IsTemplateObject>false</simcore:IsTemplateObject> <simcore:AssignedToGroups>ID851</simcore:AssignedToGroups> <simcore:Tag>WTS-1</simcore:Tag> <simcore:SelectedPropertyGroups> <simcore:stringItem>Controller:WaterTemperature</simcore:stringItem> </simcore:SelectedPropertyGroups> <simmep:SimCntrl_ControllerScheme_1>ID833</simmep:SimCntrl_ControllerScheme_1> </SimController_SupplyWater_Temperature> </xsl:template> <xsl:template name="tryAssembleTargetController"> <xsl:param name="input"/> <xsl:variable name="filterAllControllerContents"> <xsl:call-template name="filterAllOtherContents"> <xsl:with-param name="input" select="$input"/> <xsl:with-param name="token" select="'eeBIMc_FLAG_'"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$filterAllControllerContents != 'FALSE'"> <xsl:call-template name="FillSceleton"> <xsl:with-param name="taggedTargetContent" select="$filterAllControllerContents"/> <xsl:with-param name="prefixToken" select="'eeBIMc_FLAG_'"/> </xsl:call-template> </xsl:when> <xsl:otherwise> FALSE </xsl:otherwise> </xsl:choose> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<!-- KIT Tool | EneffBIM converter 2016 Version 0.5 (Author KIT BLM) IfcController.xsl 25.7.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template name="IfcController" match="ifc:IfcController" mode="experimental"> <SimController_SupplyWater_Temperature RefId="ID877"> <simcore:SimUniqueID>ef8214c0-7b34-45cf-a4f5-b4a0473ccf13</simcore:SimUniqueID> <simcore:SimModelType>SupplyWater</simcore:SimModelType> <simcore:SimModelSubtype>Temperature</simcore:SimModelSubtype> <simcore:SimModelName>WTS-1</simcore:SimModelName> <simcore:SourceModelSchema>Simergy v1.9.0.20090</simcore:SourceModelSchema> <simcore:SourceModelObjectType>SIM:SimController</simcore:SourceModelObjectType> <simcore:IsTemplateObject>false</simcore:IsTemplateObject> <simcore:AssignedToGroups>ID851</simcore:AssignedToGroups> <simcore:Tag>WTS-1</simcore:Tag> <simcore:SelectedPropertyGroups> <simcore:stringItem>Controller:WaterTemperature</simcore:stringItem> </simcore:SelectedPropertyGroups> <simmep:SimCntrl_ControllerScheme_1>ID833</simmep:SimCntrl_ControllerScheme_1> </SimController_SupplyWater_Temperature> </xsl:template> <xsl:template name="tryAssembleTargetController"> <xsl:param name="input"/> <xsl:variable name="filterAllControllerContents"> <xsl:call-template name="filterAllOtherContents"> <xsl:with-param name="input" select="$input"/> <xsl:with-param name="token" select="'eeBIMc_FLAG_'"/> </xsl:call-template> </xsl:variable> <xsl:choose> <xsl:when test="$filterAllControllerContents != 'FALSE'"> <xsl:call-template name="FillSceleton"> <xsl:with-param name="taggedTargetContent" select="$filterAllControllerContents"/> <xsl:with-param name="prefixToken" select="'eeBIMc_FLAG_'"/> </xsl:call-template> </xsl:when> <xsl:otherwise> FALSE </xsl:otherwise> </xsl:choose> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcOccupant.xsl 12.7.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcOccupant"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="'name'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<!-- KIT Tool | EneffBIM converter 2016 Version 0.5 (Author KIT BLM) IfcOccupant.xsl 25.7.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcOccupant"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="'name'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent"> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:with-param> </xsl:call-template> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM) IfcTank.xsl 12.7.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcTank"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="name()"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filtercontrollercontent"> <xsl:call-template name="tryAssembleTargetController"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filterreferencepropertycontent"> <xsl:call-template name="tryAssembleTargetElement"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:variable name="mergeGeneratedContents"> <xsl:choose> <xsl:when test="$filtercontrollercontent != 'FALSE' or $filterreferencepropertycontent != 'FALSE'"> <xsl:variable name="filteredcurrentelementcontents"> <xsl:call-template name="filterAllElementContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent" select="$mergeGeneratedContents"/> </xsl:call-template> <xsl:copy-of select="$filtercontrollercontent"/> <xsl:copy-of select="$filterreferencepropertycontent"/> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
<!-- KIT Tool | EneffBIM converter 2016 Version 0.5 (Author KIT BLM) IfcTank.xsl 25.7.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" exclude-result-prefixes="xsl ifc"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcTank"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="name()"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filtercontrollercontent"> <xsl:call-template name="tryAssembleTargetController"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filterreferencepropertycontent"> <xsl:call-template name="tryAssembleTargetElement"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:variable name="mergeGeneratedContents"> <xsl:choose> <xsl:when test="$filtercontrollercontent != 'FALSE' or $filterreferencepropertycontent != 'FALSE'"> <xsl:variable name="filteredcurrentelementcontents"> <xsl:call-template name="filterAllElementContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent" select="$mergeGeneratedContents"/> </xsl:call-template> <xsl:copy-of select="$filtercontrollercontent"/> <xsl:copy-of select="$filterreferencepropertycontent"/> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.5 (Author KIT BLM) IfcZone.xsl 25.7.2016 --><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl"> <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="ifc:IfcZone"> <xsl:param name="KeyPool"/> <xsl:if test="$KeyPool != ''"> <xsl:variable name="simelemname"> <xsl:call-template name="getTargetElementName"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="generictargetcontent"> <xsl:call-template name="resolvekeypool"> <xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/> <xsl:with-param name="elemname" select="name()"/> </xsl:call-template> </xsl:variable> <xsl:variable name="resolvedfromproperties"> <xsl:call-template name="GenerateTargetElementContentsFromSourceProperties"> <xsl:with-param name="KeyPool" select="$KeyPool"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filtercontrollercontent"> <xsl:call-template name="tryAssembleTargetController"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:variable name="filterreferencepropertycontent"> <xsl:call-template name="tryAssembleTargetElement"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:variable name="mergeGeneratedContents"> <xsl:choose> <xsl:when test="$filtercontrollercontent != 'FALSE' or $filterreferencepropertycontent != 'FALSE'"> <xsl:variable name="filteredcurrentelementcontents"> <xsl:call-template name="filterAllElementContents"> <xsl:with-param name="input" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:variable> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$filteredcurrentelementcontents"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="MergeTargetElementContentCollections"> <xsl:with-param name="generictargetcontent" select="$generictargetcontent"/> <xsl:with-param name="resolvedfromproperties" select="$resolvedfromproperties"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:call-template name="GenerateTargetElement"> <xsl:with-param name="KeyPool" select="$KeyPool"/> <xsl:with-param name="simelemname" select="$simelemname"/> <xsl:with-param name="unsortedtargetcontent" select="$mergeGeneratedContents"/> </xsl:call-template> <xsl:copy-of select="$filtercontrollercontent"/> <xsl:copy-of select="$filterreferencepropertycontent"/> </xsl:if> </xsl:template></xsl:stylesheet>
\ No newline at end of file
......@@ -193,7 +193,7 @@
<xsl:template name="filterAllElementContents">
<xsl:param name="input"/>
<xsl:for-each select="msxsl:node-set($input)/node()">
<xsl:if test="not(starts-with(local-name(), 'eeBIMc_FLAG_')) or not(starts-with(local-name(), 'eeBIMrp_FLAG_'))">
<xsl:if test="not(starts-with(local-name(), 'eeBIMc_FLAG_')) or not(starts-with(local-name(), 'eeBIMprv01_FLAG_')) or not(starts-with(local-name(), 'eeBIMprv02_FLAG_')) or not(starts-with(local-name(), 'eeBIMprv03_FLAG_'))">
<xsl:copy-of select="current()"/>
</xsl:if>
</xsl:for-each>
......@@ -224,13 +224,12 @@
IFC side TRIGGER from Psim_SimController bound to ((<xsl:value-of select="concat(current()/@name, current()/@GlobalId)"/>)):
-->
<xsl:for-each select="msxsl:node-set($taggedTargetContent)/node()">
<xsl:variable name="designatedElementTargetName">
<xsl:value-of select="substring-before(text(), ' ' )"/>
<!--<xsl:value-of select="normalize-space(substring-after(local-name(), 'eeBIMc_FLAG_'))"/>-->
</xsl:variable>
<xsl:choose>
<xsl:when test="contains(name(), 'SimDummy')">
<xsl:variable name="designatedElementTargetName">
<xsl:value-of select="substring-before(text(), ' ' )"/>
<!--<xsl:value-of select="normalize-space(substring-after(local-name(), 'eeBIMc_FLAG_'))"/>-->
</xsl:variable>
<!--SCELETON-->
<xsl:when test="contains(name(), 'eeBIMc_FLAG_SimDummy')">
<xsl:element name="{normalize-space($designatedElementTargetName)}">
<xsl:attribute name="RefId"><xsl:value-of select="normalize-space(substring-after(text(), ' ' ))"/></xsl:attribute>
<!--<xsl:copy-of select="./*"/>-->
......@@ -238,15 +237,53 @@
<!--<xsl:call-template name="IfcController"/>-->
<xsl:for-each select="msxsl:node-set($taggedTargetContent)/node()">
<xsl:if test="not(contains(name(), 'SimDummy')) and normalize-space(substring-after(local-name(),$prefixToken)) != '' and substring-before(text(), ' ') != ''">
<!--<xsl:element name="SimActor_Actor_Default">
<xsl:value-of select="text()"/>
</xsl:element>-->
<!--<xsl:element name="SimActor_Actor_Default"> <xsl:value-of select="text()"/> </xsl:element>-->
<xsl:element name="{normalize-space(substring-before(text(), ' '))}">
<xsl:value-of select="substring-after(text(), ' ')"/>
</xsl:element>
</xsl:if>
</xsl:for-each>
</xsl:element>
</xsl:when>
<xsl:when test="contains(name(), 'SimDummy')">
<!--DEBUG-->
<!--<xsl:element name="SimActor_Actor_Default">
<xsl:copy-of select="$designatedElementTargetName"/>
</xsl:element>-->
<!--DEBUG-->
<!--SCELETON-->
<xsl:element name="{normalize-space($designatedElementTargetName)}">
<xsl:attribute name="RefId"><xsl:value-of select="normalize-space(substring-after(text(), ' ' ))"/></xsl:attribute>
<!--<xsl:copy-of select="./*"/>-->
<xsl:variable name="content">
<xsl:for-each select="msxsl:node-set($taggedTargetContent)/node()">
<xsl:if test="not(contains(name(), 'SimDummy')) and normalize-space(substring-after(local-name(),$prefixToken)) != '' and substring-before(text(), ' ') != ''">
<!--<xsl:element name="SimActor_Actor_Default">
<xsl:value-of select="text()"/>
</xsl:element>-->
<xsl:variable name="simelemname" select="normalize-space(substring-before(text(), ' '))"/>
<xsl:element name="{$simelemname}">
<xsl:choose>
<xsl:when test="contains(substring-after(text(), ' '),'__')">
<xsl:call-template name="resolve_valtype_val_list">
<xsl:with-param name="list" select="substring-after(text(), ' ')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-after(text(), ' ')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:call-template name="IterateAlongSequenceOrder">
<!--<xsl:with-param name="KeyPool" select="' '"/>-->
<xsl:with-param name="CurrentSimElementName" select="$designatedElementTargetName"/>
<!--<xsl:with-param name="unsortedtargetcontent" select="$unsortedtargetcontent"/>-->
<xsl:with-param name="unsortedtargetcontent" select="$content"/>
</xsl:call-template>
</xsl:element>
<!--SCELETON-->
</xsl:when>
</xsl:choose>
......@@ -256,4 +293,22 @@
Hello controller!
</SimController>-->
</xsl:template>
<xsl:template name="resolve_valtype_val_list">
<xsl:param name="list"/>
<xsl:choose>
<xsl:when test="not(contains(substring-after(substring-after($list,'__'),'__'),'__'))">
<xsl:element name="{substring-before(substring-after($list,'__'),'__')}">
<xsl:value-of select="substring-after(substring-after($list,'__'),'__')"/>
</xsl:element>
</xsl:when>
<xsl:when test="contains(substring-after(substring-after($list,'__'),'__'),'__')">
<xsl:element name="{substring-before(substring-after($list,'__'),'__')}">
<xsl:value-of select="substring-before(substring-after(substring-after($list,'__'),'__'),'__')"/>
</xsl:element>
<xsl:call-template name="resolve_valtype_val_list">
<xsl:with-param name="list" select="substring-after(substring-after($list,'__'),'__')"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
......@@ -133,6 +133,12 @@
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<!--variant (obsolete): iterate topology objects after resolving their nested content in order to avoid duplicates in allsource collection-->
<!--<xsl:for-each select="descendant-or-self::ifc:IfcSpace">
<xsl:call-template name="KeyPoolHelper">
<xsl:with-param name="currentElement" select="name()"/>
</xsl:call-template>
</xsl:for-each>-->
</xsl:template>
<!--finalize output value-->
<xsl:template name="TargetValueFormatConditions">
......
......@@ -47,8 +47,8 @@
<!--temporary hardcode mappings according mapping table-->
<xsl:if test="$relatingPort != ''">
<simres:SourcePort>
<xsl:for-each select="msxsl:node-set($allsourceobjects)/descendant::ifc:IfcDistributionPort">
<xsl:if test="current()[@id = $relatingPort]">
<xsl:variable name="args" select="msxsl:node-set($allsourceobjects)/descendant::ifc:IfcDistributionPort[@id = $relatingPort and not(@GlobalId=following::ifc:IfcDistributionPort/@GlobalId)]"/>
<xsl:for-each select="msxsl:node-set($args)">
<xsl:call-template name="TargetValueFormatConditions">
<xsl:with-param name="sourcename">
<xsl:value-of select="'GlobalId'"/>
......@@ -60,14 +60,13 @@
<xsl:value-of select="'simres:SourcePort'"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</simres:SourcePort>
</xsl:if>
<xsl:if test="$relatedPort != ''">
<simres:TargetPort>
<xsl:for-each select="msxsl:node-set($allsourceobjects)/descendant::ifc:IfcDistributionPort">
<xsl:if test="current()[@id = $relatedPort]">
<xsl:variable name="args" select="msxsl:node-set($allsourceobjects)/descendant::ifc:IfcDistributionPort[@id = $relatedPort and not(@GlobalId=following::ifc:IfcDistributionPort/@GlobalId)]"/>
<xsl:for-each select="msxsl:node-set($args)">
<xsl:call-template name="TargetValueFormatConditions">
<xsl:with-param name="sourcename">
<xsl:value-of select="'GlobalId'"/>
......@@ -79,7 +78,6 @@
<xsl:value-of select="'simres:TargetPort'"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:for-each>
</simres:TargetPort>
</xsl:if>
......
......@@ -12,9 +12,15 @@
<xsl:strip-space elements="*"/>
<!--the IfcSpace template-->
<xsl:template match="ifc:IfcSpace" name="IfcSpace" mode="traverse">
<!--Check wether matched IfcSpace is instance (else ignore reference object with @ref="...")-->
<xsl:choose>
<xsl:when test="current()[@GlobalId]">
<xsl:when test="current()/@GlobalId">
<!--<xsl:call-template name="KeyPoolHelper">
<xsl:with-param name="currentElement" select="name()"/>
</xsl:call-template>-->
<xsl:copy-of select="current()"/>
<xsl:for-each select=".">
<xsl:if test="current()/ifc:ContainsElements/ifc:IfcRelContainedInSpatialStructure/ifc:RelatedElements">
<xsl:for-each select="current()/ifc:ContainsElements/ifc:IfcRelContainedInSpatialStructure/ifc:RelatedElements/node()">
......@@ -34,6 +40,7 @@
<xsl:if test="current()[contains(@id,$refid)]">
<!--a recursive "self-call" would be quite nice here ;) for now copied from above, thus redundant -->
<xsl:if test="current()[@GlobalId]">
<xsl:copy-of select="current()"/>
<xsl:for-each select=".">
<xsl:if test="current()/ifc:ContainsElements/ifc:IfcRelContainedInSpatialStructure/ifc:RelatedElements">
<!--TODO refId-->
......@@ -42,7 +49,7 @@
<xsl:copy-of select="node()"/>
</xsl:for-each>-->
<xsl:for-each select="current()/ifc:ContainsElements/ifc:IfcRelContainedInSpatialStructure/ifc:RelatedElements/node()">
<xsl:copy-of select="current()"/>
<!--<xsl:copy-of select="current()"/>-->
</xsl:for-each>
</xsl:if>
</xsl:for-each>
......@@ -55,6 +62,12 @@
<xsl:template match="ifc:IfcSpace">
<xsl:param name="KeyPool"/>
<xsl:if test="$KeyPool != ''">
<!--DEBUG-->
<!--<xsl:element name="SimActor_Actor_Default">-->
<!--<xsl:copy-of select="$PropertySetsByType"/>-->
<!--<xsl:copy-of select="$KeyPool"/>
</xsl:element>-->
<!--DEBUG-->
<xsl:variable name="simelemname">
<xsl:call-template name="getTargetElementName">
<xsl:with-param name="KeyPool" select="$KeyPool"/>
......
@echo off
cscript Main.js //Nologo %1
/* KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM)
* main.js
*
* JScript zur Transformation einer IFC Quelldatei in das designierte Zielformat durch den Einsatz von xsl stylesheet
*/var args = WScript.Arguments;
if (args.length == 0) {
WScript.Echo("Syntaxfehler.");
WScript.Quit();
}
// command-line argumente auslesen
filename = args(0); // Quelldatei
try {
// XML Objekt fr die Quelldatei erzeugen
var xml = new ActiveXObject("Msxml2.DOMDocument.6.0");
xml.async = false;
xml.validateOnParse = true;
xml.load(filename);
WScript.Echo("source XML load succeeded.");
// Einlesevorgang Quelldatei error handling
if (xml.parseError.errorCode != 0) {
WScript.Echo(xml.parseError.reason);
WScript.Quit()
}
// XSLT-Stylesheet laden
var xsl = new ActiveXObject("Msxml2.DOMDocument.6.0");
xsl.async = false;
xsl.resolveExternals = true; // xsl:include zulassen
xsl.setProperty("AllowXsltScript", true); // Skripte erlauben
////////////////
xsl.setProperty("AllowDocumentFunction", true); // document() Funktion erlauben
///////////////
xsl.validateOnParse = true;
xsl.load("xsl\\Main.xsl"); // "Statisch verdrahteter" Einstiegspunkt in XSLT Geflecht
WScript.Echo("XSL load succeeded.");
// Einlesevorgang XSLT error handling
if (xsl.parseError.errorCode != 0) {
WScript.Echo(xsl.parseError.reason);
WScript.Quit()
}
// Objekt fr Zieldokument erzeugen
var result = new ActiveXObject("Msxml2.DOMDocument.6.0");
// Speichere Startzeit
var sTime = new Date();
// Quelldatei TRANSFORMieren
WScript.Echo("Started Transformation.");
xml.transformNodeToObject(xsl.documentElement, result);
WScript.Echo("Transformation succeeded.");
var eTime = new Date();
var elapsed = (eTime.getTime() - sTime.getTime()) / 1000;
WScript.Echo("Transformation took " + elapsed + " seconds.");
// Zieldokument in UTF-8-Stream schreiben
var utf8Stream = new ActiveXObject("ADODB.Stream");
fso = new ActiveXObject("Scripting.FileSystemObject");
utf8Stream.Type = 2; // adTypeText
utf8Stream.Charset = "utf-8"
utf8Stream.LineSeparator = 10; // adLF
utf8Stream.Open();
utf8Stream.WriteText(result.xml);
utf8Stream.Position = 3; // Byte Order Mark berspringen
utf8Stream.SaveToFile("output\\" + fso.GetBaseName(filename) + ".simxml", 2); // adSaveCreateOverWrite
WScript.Echo("Transformation result saved to OUTPUT folder.");
utf8Stream.Close();
}
catch (err) {
WScript.Echo(err.description);
}
<?xml version="1.0" encoding="utf-8"?>
<ifcXML xmlns="http://www.buildingsmart-tech.org/ifcXML/IFC4/final" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/final" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.buildingsmart-tech.org/ifcXML/IFC4/final file:///C:/BLM.DEV/BLM.INVENTORY/XSD/IFC4/ifcXML4.xsd" id="ifcXML4">
<!--Containing Topological Element-->
<IfcSpaceType id="i2077"/>
<!--Topological Ref Element-->
<IfcRelContainedInSpatialStructure id="i33247">
<RelatedElements>
<IfcBuildingElementProxy/>
</RelatedElements>
<RelatingStructure xsi:nil="true" xsi:type="IfcSpace" ref="i2077"/>
</IfcRelContainedInSpatialStructure>
<!--The Element of Interest-->
<IfcBoiler id="i2464" Name="Boiler IFC4 Schema:Allgemein:929683" GlobalId="3WU0Up2sv6WPUm6U7AO_fO"/>
<!--Direct Related PropertySet | NOTE: NO additional decomposions (e.g. IfcRelDefinesByType via IfcBoilerTYPE)!-->
<IfcRelDefinesByProperties id="i2517" GlobalId="2PenJPNsHFQO2iEPuHvWsX">
<RelatedObjects xsi:type="ifc:IfcBoiler" ref="i2464"/>
<RelatingPropertyDefinition>
<IfcPropertySetDefinitionSet-wrapper>
<IfcPropertySet xsi:nil="true" ref="i10001"/>
<IfcPropertySet xsi:nil="true" ref="i10002"/>
</IfcPropertySetDefinitionSet-wrapper>
</RelatingPropertyDefinition>
</IfcRelDefinesByProperties>
<!-- The PropertySets of Interest, ONLY (we don't want generic IFC2SimModel Mapping - is out of scope AND NOT intended by using SimModfel as INTERMEDIATE "Model in the Middle" EneffBIM concept!)-->
<IfcPropertySet Name="Pset_BoilerTypeCommon" id="i10001">
<HasProperties>
<IfcPropertySingleValue Name="EnergySource">
<NominalValue>
<IfcLabel-wrapper>GAS</IfcLabel-wrapper>
</NominalValue>
</IfcPropertySingleValue>
<IfcPropertySingleValue Name="OperatingMode">
<NominalValue>
<IfcLabel-wrapper>MODULATING</IfcLabel-wrapper>
</NominalValue>
</IfcPropertySingleValue>
<IfcPropertySingleValue Name="PartialLoadEfficiencyCurves">
<NominalValue>
<IfcLabel-wrapper>0.</IfcLabel-wrapper>
</NominalValue>
</IfcPropertySingleValue>
<!--<IfcPropertySingleValue Name="WaterStorageCapacity" Description="BLMDEV_todo: additional unit info needed">
<NominalValue>
<IfcVolumeMeasure-wrapper>0.</IfcVolumeMeasure-wrapper>
</NominalValue>
</IfcPropertySingleValue>-->
<IfcPropertySingleValue ref="i10003"/>
<IfcPropertySingleValue Name="WaterInletTemperatureRange">
<NominalValue>
<IfcLabel-wrapper>328.15</IfcLabel-wrapper>
</NominalValue>
</IfcPropertySingleValue>
<IfcPropertySingleValue Name="OutletTemperatureRange">
<NominalValue>
<IfcLabel-wrapper>343.15</IfcLabel-wrapper>
</NominalValue>
</IfcPropertySingleValue>
</HasProperties>
</IfcPropertySet>
<!-- rel object-->
<!-- property object-->
<IfcPropertySingleValue Name="WaterStorageCapacity" Description="BLMDEV_todo: additional unit info needed" id="i10003">
<NominalValue>
<IfcVolumeMeasure-wrapper>20</IfcVolumeMeasure-wrapper>
</NominalValue>
</IfcPropertySingleValue>
<IfcPropertySet Name="Pset_BoilerTypeWater" id="i10002">
<HasProperties>
<IfcPropertyTableValue Name="HeatOutput" Description="3rd property in table">
<DefiningValues>
<IfcEnergyMeasure-wrapper>1</IfcEnergyMeasure-wrapper>
<IfcThermodynamicTemperatureMeasure-wrapper>1</IfcThermodynamicTemperatureMeasure-wrapper>
</DefiningValues>
</IfcPropertyTableValue>
<IfcPropertyTableValue Name="NominalEfficiency" Description="3rd property in table">
<DefiningValues>
<IfcEnergyMeasure-wrapper>1</IfcEnergyMeasure-wrapper>
<IfcThermodynamicTemperatureMeasure-wrapper>1</IfcThermodynamicTemperatureMeasure-wrapper>
</DefiningValues>
</IfcPropertyTableValue>
</HasProperties>
</IfcPropertySet>
</ifcXML>
<?xml version="1.0" encoding="utf-8"?>
<ifcXML xmlns="http://www.buildingsmart-tech.org/ifcXML/IFC4/final" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/final" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.buildingsmart-tech.org/ifcXML/IFC4/final file:///C:/BLM.DEV/BLM.INVENTORY/XSD/IFC4/ifcXML4.xsd" id="ifcXML4">
<!--Containing Topological Element-->
<IfcSpaceType id="i2077"/>
<!--Topological Ref Element-->
<IfcRelContainedInSpatialStructure id="i33247">
<RelatedElements>
<IfcBuildingElementProxy/>
</RelatedElements>
<RelatingStructure xsi:nil="true" xsi:type="IfcSpace" ref="i2077"/>
</IfcRelContainedInSpatialStructure>
<!--The Element of Interest-->
<IfcBoiler id="i2464" Name="Boiler IFC4 Schema:Allgemein:929683" GlobalId="3WU0Up2sv6WPUm6U7AO_fO"/>
<IfcRelDefinesByType id="i32979" GlobalId="1vJIFPeIn68ugHpSzeSsYx">
<RelatedObjects>
<IfcBoiler ref="i2464"/>
</RelatedObjects>
<RelatingType xsi:type="IfcBoilerType" ref="i2440"/>
</IfcRelDefinesByType>
<!-- define Type for common information regarding all refernced Boiler -->
<IfcBoilerType id="i2440">
<HasPropertySets>
<IfcPropertySet xsi:nil="true" ref="i10001"/>
<IfcPropertySet xsi:nil="true" ref="i10002"/>
</HasPropertySets>
</IfcBoilerType>
<!--Related PropertySet defined by general Type | NOTE: NO additional decomposions (e.g. IfcRelDefinesByType via IfcBoilerTYPE)!-->
<!--<IfcRelDefinesByProperties id="i2517" GlobalId="2PenJPNsHFQO2iEPuHvWsX">
<RelatedObjects xsi:type="ifc:IfcBoiler" ref="i2464"/>
<RelatingPropertyDefinition>
<IfcPropertySetDefinitionSet-wrapper>
<IfcPropertySet xsi:nil="true" ref="i10001"/>
<IfcPropertySet xsi:nil="true" ref="i10002"/>
</IfcPropertySetDefinitionSet-wrapper>
</RelatingPropertyDefinition>
</IfcRelDefinesByProperties>-->
<!-- The PropertySets of Interest, ONLY (we don't want generic IFC2SimModel Mapping - is out of scope AND NOT intended by using SimModfel as INTERMEDIATE "Model in the Middle" EneffBIM concept!)-->
<IfcPropertySet Name="Pset_BoilerTypeCommon" id="i10001">
<HasProperties>
<IfcPropertySingleValue Name="EnergySource">
<NominalValue>
<IfcLabel-wrapper>GAS</IfcLabel-wrapper>
</NominalValue>
</IfcPropertySingleValue>
<IfcPropertySingleValue Name="OperatingMode">
<NominalValue>
<IfcLabel-wrapper>MODULATING</IfcLabel-wrapper>
</NominalValue>
</IfcPropertySingleValue>
<IfcPropertySingleValue Name="PartialLoadEfficiencyCurves">
<NominalValue>
<IfcLabel-wrapper>0.</IfcLabel-wrapper>
</NominalValue>
</IfcPropertySingleValue>
<!--<IfcPropertySingleValue Name="WaterStorageCapacity" Description="BLMDEV_todo: additional unit info needed">
<NominalValue>
<IfcVolumeMeasure-wrapper>0.</IfcVolumeMeasure-wrapper>
</NominalValue>
</IfcPropertySingleValue>-->
<IfcPropertySingleValue ref="i10003"/>
<IfcPropertySingleValue Name="WaterInletTemperatureRange">
<NominalValue>
<IfcLabel-wrapper>328.15</IfcLabel-wrapper>
</NominalValue>
</IfcPropertySingleValue>
<IfcPropertySingleValue Name="OutletTemperatureRange">
<NominalValue>
<IfcLabel-wrapper>343.15</IfcLabel-wrapper>
</NominalValue>
</IfcPropertySingleValue>
</HasProperties>
</IfcPropertySet>
<!-- rel object-->
<!-- property object-->
<IfcPropertySingleValue Name="WaterStorageCapacity" Description="BLMDEV_todo: additional unit info needed" id="i10003">
<NominalValue>
<IfcVolumeMeasure-wrapper>20</IfcVolumeMeasure-wrapper>
</NominalValue>
</IfcPropertySingleValue>
<IfcPropertySet Name="Pset_BoilerTypeWater" id="i10002">
<HasProperties>
<IfcPropertyTableValue Name="HeatOutput" Description="3rd property in table">
<DefiningValues>
<IfcEnergyMeasure-wrapper>1</IfcEnergyMeasure-wrapper>
<IfcThermodynamicTemperatureMeasure-wrapper>1</IfcThermodynamicTemperatureMeasure-wrapper>
</DefiningValues>
</IfcPropertyTableValue>
<IfcPropertyTableValue Name="NominalEfficiency" Description="3rd property in table">
<DefiningValues>
<IfcEnergyMeasure-wrapper>1</IfcEnergyMeasure-wrapper>
<IfcThermodynamicTemperatureMeasure-wrapper>1</IfcThermodynamicTemperatureMeasure-wrapper>
</DefiningValues>
</IfcPropertyTableValue>
</HasProperties>
</IfcPropertySet>
</ifcXML>
<?xml version="1.0"?>
<SimModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.lbl.gov/namespaces/Sim/Model" xmlns:simcore="http://www.lbl.gov/namespaces/Sim/SimModelCore" xmlns:simres="http://www.lbl.gov/namespaces/Sim/ResourcesGeneral" xmlns:simgeom="http://www.lbl.gov/namespaces/Sim/ResourcesGeometry" xmlns:simbldg="http://www.lbl.gov/namespaces/Sim/BuildingModel" xmlns:simmep="http://www.lbl.gov/namespaces/Sim/MepModel" SimModelVersion="19-Feb-15" SimModelSchemaVersion="1.150219" SimModelUnitsVersion="12-Jan-15" SimModelUnitDefaultsVersion="12-Jan-15" SimModelSchemaIDKey="Simergy v1.5.0.18438">
<SimFlowPlant_Boiler_BoilerHotWater RefId="ID75124">
<simcore:SimUniqueID>e707e683-068b-40f5-878a-d0f5ef5513e0</simcore:SimUniqueID>
<simcore:SimModelType>Boiler</simcore:SimModelType>
<simcore:SimModelSubtype>BoilerHotWater</simcore:SimModelSubtype>
<simcore:SimModelName>BLR-1(5)</simcore:SimModelName>
<simcore:SourceModelSchema>Simergy v1.5.0.18438</simcore:SourceModelSchema>
<simcore:SourceModelObjectType>SIM:SimFlowPlant</simcore:SourceModelObjectType>
<simcore:IsTemplateObject>true</simcore:IsTemplateObject>
<simcore:AssignedToGroups>ID74373</simcore:AssignedToGroups>
<simcore:Tag>BLR-1</simcore:Tag>
<simmep:SimFlowPlant_Name>BLR-1</simmep:SimFlowPlant_Name>
<simmep:SimFlowPlant_FuelType>NaturalGas</simmep:SimFlowPlant_FuelType>
<simmep:SimFlowPlant_NomCap>-2147483648</simmep:SimFlowPlant_NomCap>
<simmep:SimFlowPlant_NomThermalEff>0.8</simmep:SimFlowPlant_NomThermalEff>
<simmep:SimFlowPlant_EfficiencyCurveTempEvaluationVar>LeavingBoiler</simmep:SimFlowPlant_EfficiencyCurveTempEvaluationVar>
<simmep:SimFlowPlant_NrmlizedBoilerEffCurveName>ID79689</simmep:SimFlowPlant_NrmlizedBoilerEffCurveName>
<simmep:SimFlowPlant_DesignWaterOutletTemp>82.222214</simmep:SimFlowPlant_DesignWaterOutletTemp>
<simmep:SimFlowPlant_DesignWaterFlowRate>-2147483648</simmep:SimFlowPlant_DesignWaterFlowRate>
<simmep:SimFlowPlant_MinPartLoadRatio>0</simmep:SimFlowPlant_MinPartLoadRatio>
<simmep:SimFlowPlant_MaxPartLoadRatio>1.2</simmep:SimFlowPlant_MaxPartLoadRatio>
<simmep:SimFlowPlant_OptimumPartLoadRatio>1</simmep:SimFlowPlant_OptimumPartLoadRatio>
<simmep:SimFlowPlant_WaterOutletUpTempLimit>99.99999</simmep:SimFlowPlant_WaterOutletUpTempLimit>
<simmep:SimFlowPlant_BoilerFlowMode>VariableFlow</simmep:SimFlowPlant_BoilerFlowMode>
<simmep:SimFlowPlant_SizingFactor>0.5</simmep:SimFlowPlant_SizingFactor>
</SimFlowPlant_Boiler_BoilerHotWater>
</SimModel>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!-- KIT Tool | EneffBIM converter 2016 Version 0.1 (Author KIT BLM)-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://d-alchemy.com/schema/simxml/Model" xmlns:simcore="http://d-alchemy.com/schema/simxml/SimModelCore" xmlns:simres="http://d-alchemy.com/schema/simxml/ResourcesGeneral" xmlns:simgeom="http://d-alchemy.com/schema/simxml/ResourcesGeometry" xmlns:simbldg="http://d-alchemy.com/schema/simxml/BuildingModel" xmlns:simmep="http://d-alchemy.com/schema/simxml/MepModel" xmlns:ifc="http://www.buildingsmart-tech.org/ifcXML/IFC4/Add1" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="xsl ifc msxsl">
<xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<!--the IfcZone template-->
<xsl:template match="ifc:IfcZone">
<xsl:param name="KeyPool"/>
<!--DEBUG-->
<xsl:element name="SimActor_Actor_Default">
<xsl:copy-of select="'test'"/>
</xsl:element>
<!--DEBUG-->
<xsl:if test="$KeyPool != ''">
<xsl:variable name="simelemname">
<xsl:call-template name="getTargetElementName">
<xsl:with-param name="KeyPool" select="$KeyPool"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="generictargetcontent">
<!--<xsl:element name="simcore:SimUniqueID">TTT</xsl:element>-->
<!-- generate current source object's target elements specific fields and attributes (e.g. UniqueId)-->
<!--<xsl:copy>-->
<xsl:call-template name="resolvekeypool">
<xsl:with-param name="KeyPoolSnippet" select="$KeyPool"/>
<xsl:with-param name="elemname" select="name()"/>
</xsl:call-template>
<!--</xsl:copy>-->
</xsl:variable>
<xsl:variable name="resolvedfromproperties">
<!-- generate target element content from current source object's properties-->
<!--<xsl:copy>-->
<xsl:call-template name="GenerateTargetElementContentsFromSourceProperties">
<xsl:with-param name="KeyPool" select="$KeyPool"/>
</xsl:call-template>
<!--</xsl:copy>-->
</xsl:variable>
<!--we need to introduce additional xsl:variable as intermediate step because with the content of target element also the content of e.g. corrosponding controller was generated which we need to filter and assemble-->
<xsl:variable name="filtercontrollercontent">
<xsl:call-template name="tryAssembleTargetController">
<xsl:with-param name="input" select="$resolvedfromproperties"/>
</xsl:call-template>
</xsl:variable>