[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Unsuccessful attempts at validating xsd:any

  • From: Ryan Dewell <rdewell@r...>
  • To: xml-dev@x...
  • Date: Fri, 05 Jan 2001 23:35:25 -0800

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
below:

Sample Schema (test.xsd):

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

Sample XML for the schema:

<root xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="test.xsd">
  <whatever/>
</root>

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?

Thanks,

Ryan


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.