OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unsuccessful attempts at validating xsd:any

Hello All,

I'm trying to create a schema where some elements can contain themself, or
other elements in that schema, any number of times, in any order, etc.  In
addition, these select elements should be able to include elements from
other schemas.  Naturally, xsd:any seemed like the way to go.

I've been plugging away at different renditions for days, to no avail.  Even
a simple example doesn't validate in XML Spy 3.5 beta 3 -- it gives an
"Unexpected Child Element" for the tag "<whatever/>" in the sample XML

Sample Schema (test.xsd):

<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
  <xsd:element name="root">
        <xsd:any namespace="##any" processContents="skip"/>

Sample XML for the schema:

<root xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"

This doesn't represent what I want to do by any means, but if I can't get
something as simple as the above to validate, I'm not going to be making
very much progress.  Any thoughts on this?  I'm either missing some
intellectual leap here (namespace usage?), or XML Spy isn't handling this
schema validation properly at all.  Would you say this is a problem with the
software or source, and if the source, what can I do to get this to work?