From: "Andrew E Switala" <[log in to unmask]>
> Weird. The Xerces parser from Apache (version 2.6.0) validates instance
> documents with either <mads> or <madsCollection> as the root element,
Sorry if I may have overstated the problem. XMLSpy does validate ok.
The problem is, I'm used to being promted for a root element in cases where
the schema defines multiple roots; in the cases cited it skips that step
and begins you with a default schema based on what it thinks should be the
root element so you have to erase/modify all that and start over, which (to
me) is not only a big nuissance but also disconcerting especially when you
start a new schema because it raises false concern that you didn't do it
right. Worse, it sometimes makes a ridiculous choice for the root element --
for example, for MADS it gives you ModsCollection (yes, modsCollection, not
madsCollection).
I've submitted this problem to XMLSpy and they have responded. I've
requested permission from them to share their response (since there is a
conficentiality agreement). I'll say this though, I suspect we'll just
have to accept that it's not going to work the way we'd like and move on.
--Ray
> using the simplified schema from R. Dennenberg's e-mail:
> -----------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.loc.gov/xxx"
> xmlns="http://www.loc.gov/xxx"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>
> <xsd:element name="mads"/>
> <xsd:element name="madsCollection">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element ref="mads" maxOccurs="unbounded"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> --------------------------------------------
> The instance documents tested were simply:
> --------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <mads
> xmlns="http://www.loc.gov/xxx"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.loc.gov/xxx mads2.xsd">
> </mads>
> --------------------------------------------
> and
> --------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <madsCollection
> xmlns="http://www.loc.gov/xxx"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.loc.gov/xxx mads2.xsd">
> <mads/>
> <mads/>
> </madsCollection>
> --------------------------------------------
> Do Oxygen or XMLSpy actually fail to validate a existing, valid
> document (created e.g. with a plain text editor), or is this just an
> issue with the editors' user interface for creating new documents? If
> validation fails, what's the error message?
>
> --Andy
>
> >>> [log in to unmask] 2004-12-07 13:57:40 >>>
> On Dec 7, 2004, at 1:26 PM, Andrew E Switala wrote:
>
> > It's definitely a XMLSpy bug.
>
> I've tried on more than one occasion to try it out with Oxygen. It
> doesn't work there either. Whether a bug in the applications or a bug
> in the spec, this is not good.
>
> Bruce
|