Eric, Pete:
Following up, I'm attaching two files, a draft "wrapper schema" proposed for OAI that imports Pete's xsd and then an instance file that validates according to that schema. At least according to xml spy there are no sequencing problems.
Carl
> -----Original Message-----
> From: Pete Johnston [mailto:[log in to unmask]]
> Sent: Wednesday, March 06, 2002 5:46 AM
> To: [log in to unmask]
> Subject: Re: Public Comment on DC-simple XML Schema declaration within
> OAI
>
>
> Hello Eric,
>
> > My XML Schema is a bit rusty...
>
> ... and I will freely admit I make no claim to have grasped the myriad
> subtleties of the XML Schema specs... ;-)
>
> > but your use of xs:sequence I
> > believe defines an ordered sequence of sub-elements. While
> > this does indeed validate syntactically, is this constraint
> > really what you want to specify? This requires all
> > applications to first use dc:title, dc:creator, etc.
> >
> > Is it your assertion that OAI is expected to comply with this
> > restriction?
>
> No, we weren't intending to impose that restriction.... I _hope_ we
> haven't done so.... ;-)
>
> I'm not sure the use of xs:sequence does enforce the ordering
> you imply
> here, because it has a child element xs:choice within it?
>
> If it used a xs:sequence with the references to the dc
> elements directly
> nested within it, then, yes, it would imply the ordering
> restriction you
> suggest, but I _think_ the current version manages to avoid that.
>
> I _think_ what the xs:group construct in the current version says is:
>
> Allow a sequence of:
>
> [first/only item in sequence] 0 to n occurrences (in _any_
> order) of any
> one of:
>
> [first item in selection] 0 to n occurrences of dc:title
> [second item in selection] 0 to n occurrences of dc:creator
> etc.
>
> FWIW, I've managed to validate a few examples using XML Spy
> and XSV with
> a sample application/wrapper schema
>
> http://www.ukoln.ac.uk/metadata/dcmi/dcxml/xmls/appz.xsd
>
> I went out of my way to vary the order of elements in the examples to
> test this very point. The content is junk but see
>
> http://www.ukoln.ac.uk/metadata/dcmi/dcxml/xml/examplez.xml
>
> which XML Spy and XSV seem to accept as valid against appz.xsd.
>
> (Xerces seems to want to actually load a copy of the schema
> for xml.xsd
> and I think I'm hitting some sort of firewall problems
> accessing the W3C
> version from my machine here, but if I tweak simpledc20020305.xsd to
> reference a local copy then Xerces C++ is happy too.)
>
> I understand that Herbert Van Der Sompel has also validated some
> OAI-based examples of his own using his own application schema (using
> XML Spy). I haven't seen those examples, so I can't comment on the
> ordering of the DC elements - but I'd be surprised if he
> hasn't diverged
> from the ordering here somewhere, even if inadvertently! So I _think_
> it's OK, but I will check it again.
>
> The use of xs:sequence as a "wrapper" here was based on the suggestion
> by Jeni Tennison on xmlschema-dev, because the initial
> version we posted
> (without xs:sequence) was illegal according to XSV and
> Xerces. At first
> we thought this might be a problem with the tools, but based on Jeni's
> analysis, I think the tools are correct here.
>
> This use of xs:sequence wasn't a construct I would have thought up (my
> attempt at a workaround involved two xs:groups), but it seems
> to address
> the problem.
>
> Cheers
>
> Pete
>
|