Skip to content

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

Merged
merged 5 commits into from
Sep 7, 2021
Merged

Feat/v3 to v2 translation #378

merged 5 commits into from
Sep 7, 2021

Conversation

JieXiong9119
Copy link
Contributor

Create v3_to_v2.xsl
Create example v3 xml for validation

Create v3_to_v2.xsl
Create example v3 xml for validation
@JieXiong9119 JieXiong9119 self-assigned this Aug 6, 2021
@JieXiong9119 JieXiong9119 linked an issue Aug 6, 2021 that may be closed by this pull request
@JieXiong9119
Copy link
Contributor Author

As we have not yet release 2.4. This reverse translator will translate v3 back to v2.3 for now.

Copy link
Contributor

@macintoshpie macintoshpie left a 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

Comment on lines 60 to 70
<!-- 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 -->
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor

@macintoshpie macintoshpie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🌴

Copy link
Member

@nllong nllong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

baller!

@nllong nllong merged commit 3fb882b into develop-v3 Sep 7, 2021
@nllong nllong deleted the v3-to-v2-translation branch September 7, 2021 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create reverse translation from 3.0 to 2.4
3 participants