Skip to content

Conversation

@hsorby
Copy link
Contributor

@hsorby hsorby commented Jun 14, 2021

Fixes #4.

<!-- Units elements can only be declared as a child of the model element -->
<xsl:for-each select="cellml10:component/cellml10:units | cellml11:component/cellml11:units" >
<xsl:element name="{local-name()}" namespace="http://www.cellml.org/cellml/2.0#">
<xsl:apply-templates select="@* | node()"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this will result in attributes on the units elements being ignored, since the template for @* above does nothing. Have you checked this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're correct, now I have added a copy command to copy the name attribute. Testing with the van der pol model seems to give the correct result now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model with units defined in a component don't get properly converted

2 participants