validation of eml sample documents
Matt Jones
jones at nceas.ucsb.edu
Tue Aug 20 18:57:04 PDT 2002
Peter,
That's excellent that you've gotten it to validate under XML Spy. If
the changes you made are still compliant with the spec then I would
agree we should make them without question. The spaces in the XPath
statements are just for readability, so I can't imagine why we can't
take them out. I'll test it and try it. Changing the way we do imports
in eml.xsd also was bugging me because of the need for the namespace
prefix, so this seems like an all around good idea to do the import.
When we're done with the schemas, we should make sure that they and
some instance docs validate against Xerces, WSV, and XML Spy (although
to me XML Spy is the lower priority because they have always lagged a
bit in terms of conformance to the specs).
Matt
Peter McCartney wrote:
> 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
>
>
>
More information about the Eml-dev
mailing list