validation of eml sample documents
Peter McCartney
peter.mccartney at asu.edu
Tue Aug 20 18:05:22 PDT 2002
Ok, ive chipped a little more off this problem. I'm able to get sample files
to validate with XML Spy if i change eml.xsd to import the complex types for
dataset, citation, software and protocol rather than use ref (which i think
we should do anyway). This elminates the need to declare a namespace for
whichever one of these we use and makes XML Spy's interactive editor work
flawlessly (ie, it intelligently adds required children as you add elements
and validates interactively as you make changes to the file). Using this
revised eml.xsd and the syntax shown here, the following sample file
validates fine (as does my more complicated CAP sample with references):
<?xml version="1.0" encoding="UTF-8"?>
<eml:eml packageId="xx1024494770867" system="CES"
xmlns:eml="eml:eml-2.0.0beta9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="eml:eml-2.0.0beta9 eml.xsd">
<dataset>
<title>Sample Dataset</title>
<creator>
<individualName>
<surName>Smith</surName>
</individualName>
</creator>
<contact>
<individualName>
<surName>Jones</surName>
</individualName>
</contact>
</dataset>
</eml:eml>
This did clean up some difficulties with Stylus studio's ability to read the
schemas, but not with validating. it is stumbling on the ScopeType simple
type claiming it is not found in eml-resource.xsd. It is also objecting to
the use of spaces within the xpath expressions in the key definitions -
Robin has seen a similar problem in Xindice. Taking out the spaces makes
this error go away, but we still hang on the SimpleType bug.
I recommend we make the change to eml.xsd so we get rid of unnecessary
namespace declarations and can use at least one popular tool. Given that its
now working with Spy, im less worried, though still dissapointed about the
problems problems with stylus studios.
Taking out the spaces in the xpath statements does no harm and might be a
good hedge against problems down the line if this is a known issue with
xpath.
Peter McCartney (peter.mccartney at asu.edu)
Center for Environmental Studies
Arizona State University
480-965-6791
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mercury.nceas.ucsb.edu/ecoinformatics/pipermail/eml-dev/attachments/20020820/38339afa/attachment.htm
More information about the Eml-dev
mailing list