Hi,
I can now import a complete XML document via the
plugins mechanism, where the schema to import
doesn't contain any schema infor (i.e., has no model
stamp) :-)
However, I've still got a bit of a problem in that, if I have
an application that contains a plugin that wants to
import some XML (as a complete doc) that corresponds
to just a subset of the complete schema, then there
doesn't look to be a mechanism to do this. I.e.:
I have an Experiment schema, and want the plugin to
import an XML doc representing a Microscope. Since
the Microscope doesn't match the schema for the
complete Experiment schema, when I try to do the
following:
File xml = getMicroscopeXMLDoc();
File schemaFile = new File
(recordModelFactory.getSchemaName());
XMLSubmissionFileReader pedroReader = new
XMLSubmissionFileReader(schemaFile.toURI().toURL(),
recordModelFactory,
recordModelFactory.getConfigurationReader(),false);
pedroReader.omitModelStamp();
pedroReader.readFile(xml);
then this fails as the xml doesn't match the schema.
It would be good to have a simple utility to allow Xml to
be pasted into the recordmodel and verified as part of
the complete pedro model.
Thoughts?
Tony