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

Get Copper's XML I/O in order. #25

Closed
schwerdf opened this issue Dec 20, 2017 · 3 comments
Closed

Get Copper's XML I/O in order. #25

schwerdf opened this issue Dec 20, 2017 · 3 comments
Assignees
Milestone

Comments

@schwerdf
Copy link
Contributor

Currently, Copper's use of XML for input and output (''viz.'', the XML input skin and the XML dump format) is not properly specified or documented. The main shortcomings are:

  • The output XML dump format is not documented. There is an XSLT stylesheet to transform an XML dump into an HTML dump, but there is no schema or object model for the former.
  • The namespace on the input XML skin contains no version information. It would therefore be very difficult to maintain any kind of backward compatibility over schema changes.

These issues should be resolved as follows:

  • Work out a convention for all Copper-related namespaces. This convention should ideally allow for version updates to any schema associated with Copper, independent of any other schema or of the Copper version.
  • Create a schema for the XML dump format, with a new namespace conforming to this convention.
  • Change the namespace on the XML skin schema to conform to this convention.

The change of namespace in the XML skin will require corresponding changes in Silver and in the test cases.

@schwerdf
Copy link
Contributor Author

With commit 5fab6ce, this task is complete except for the changing of namespace on XML parser specs, which will need coordination to avoid breaking Silver.

I am proposing the following namespace convention for Copper XML schemas:

http://melt.cs.umn.edu/copper/xmlns/schema-name/copper-version

For example, I have given the new schema for XML dumps the namespace http://melt.cs.umn.edu/copper/xmlns/xmldump/0.8.

The 0.8 represents the first version of Copper in which this version of the schema will appear in the master branch. Specifically, it does not mean that we will be changing the namespace at every Copper release -- we will change a schema's namespace only when the schema changes. These schemas are stable enough that they should not need to change more than once per Copper version.

Along similar lines, I am proposing for XML parser specs the namespace http://melt.cs.umn.edu/copper/xmlns/skins/xml/0.8, replacing the current http://melt.cs.umn.edu/copper/xmlns. The only substantial change to the schema will be to remove the kludge detailed in issue #28.

As Silver is currently set to generate specs with the old namespace, this raises the question of how best to bring in this change. My preference is to switch Silver over to the new namespace, but still have Copper allow the use of the old one as a deprecated backward-compatibility measure.

@tedinski
Copy link
Member

tedinski commented Jan 4, 2018

My preference is to switch Silver over to the new namespace, but still have Copper allow the use of the old one as a deprecated backward-compatibility measure.

Sounds perfect to me.

@schwerdf
Copy link
Contributor Author

The XML skin parser now supports parsing using either schema, using the namespaces to differentiate.

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

No branches or pull requests

2 participants