-
Notifications
You must be signed in to change notification settings - Fork 22
Feat/v3 to v2 translation #378
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
Conversation
Create v3_to_v2.xsl Create example v3 xml for validation
As we have not yet release 2.4. This reverse translator will translate v3 back to v2.3 for now. |
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.
Just one question, but everything looks good.
I made two additional changes to this PR:
- tweak version translation for both XSLTs
- update BuildingSync.xsd schema to include v3.0.0 so we could properly test translation
translation/v3_to_v2.xsl
Outdated
<!-- 5. Map enumeration "Energy cost reduction through rate adjustments - uncategorized" to "Other" under auc:EnergyCostReductionThroughRateAdjustments/auc:MeasureName --> | ||
<!--xsl:template match="auc:EnergyCostReductionThroughRateAdjustments/auc:MeasureName[. = 'Energy cost reduction through rate adjustments - uncategorized']"> | ||
<xsl:copy>Other</xsl:copy> | ||
</xsl:template--> | ||
<!-- 6. Map auc:FutureOtherECMs to auc:Uncategorized --> | ||
<!--xsl:template match="auc:FutureOtherECMs"> | ||
<xsl:element name="auc:Uncategorized"> | ||
<xsl:apply-templates/> | ||
</xsl:element> | ||
</xsl:template--> | ||
<!-- 7. Limit auc:MeasureName to exactly one by commenting out all other auc:MeasureNames --> |
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.
@JieXiong9119 why are these commented out? Should we remove them completely?
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.
I kept all the v2 to v3 changes in this xslt just for references or in case some of these changes should be brought in for backward translation. We can remove them if they are not needed.
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.
@JieXiong9119 gotcha, could you remove them if they're not required for backward translation? and if they are could you uncomment / tweak them to work?
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.
Nice! 🌴
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.
baller!
Create v3_to_v2.xsl
Create example v3 xml for validation