Skip to content
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

Move Units children of Component to Model element. #8

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

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