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

refactor anyUnitsAttr #555

Closed
prjemian opened this issue Apr 5, 2017 · 3 comments · Fixed by #683
Closed

refactor anyUnitsAttr #555

prjemian opened this issue Apr 5, 2017 · 3 comments · Fixed by #683
Assignees
Milestone

Comments

@prjemian
Copy link
Contributor

prjemian commented Apr 5, 2017

per PR #549 (for #545), consider the change in nxdlTypes.xsd of anyUnitsAttr from:

<xs:simpleType name="anyUnitsAttr">
	<xs:restriction base="xs:string">
	</xs:restriction>
</xs:simpleType>

to:

<xs:simpleType name="anyUnitsAttr">
	<xs:union memberTypes="xs:string">
	</xs:union>
</xs:simpleType>

and then converting <xs:enumeration to <xs:simpleType for each type of units

IMPORTANT The result of these changes in nxdlTypes.xsd should bump the minor version number of the XML Schema.

@prjemian prjemian added this to the PR_549 milestone Apr 5, 2017
@prjemian prjemian self-assigned this Apr 5, 2017
prjemian added a commit that referenced this issue Apr 5, 2017
@prjemian
Copy link
Contributor Author

prjemian commented Apr 5, 2017

testing will require merging with recent commits to master but those merges have some conflicts ... needs more time to investigate ... later

prjemian added a commit that referenced this issue Apr 9, 2017
prjemian added a commit that referenced this issue Apr 9, 2017
prjemian added a commit that referenced this issue Apr 9, 2017
prjemian added a commit that referenced this issue Apr 9, 2017
@prjemian
Copy link
Contributor Author

prjemian commented Apr 9, 2017

Since the unit types are enumerated in anyUnitsAttr now, the python code to convert units to rst must be refactored. It would assist that code if the field and group types also defined in nxdlTypes.xsd were enumerated similarly. This new enumeration anyTypeAttr is not currently referenced in validation; it will help documentation and possibly data file validation code.

Alternatively, the units could be moved into a separate file such as nxdlUnits.xsd. That might be clearer.

prjemian added a commit that referenced this issue Apr 9, 2017
anyUnitsAttr_555

Conflicts:
	base_classes/NXtransformations.nxdl.xml
prjemian added a commit that referenced this issue Apr 9, 2017
prjemian added a commit that referenced this issue Apr 9, 2017
prjemian added a commit that referenced this issue May 1, 2017
NOTE: This is different than the "3.1" used in the XML namespace.
@prjemian
Copy link
Contributor Author

Not sure why I closed this. Will re-open now and create a PR to re-examine.

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

Successfully merging a pull request may close this issue.

1 participant