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

Newbie - Schemas - Problem with minOccurs? or xmlns?

  • From: "Stout, Joel R" <Stout.Joel@e...>
  • To: "'xml-dev@l...'" <xml-dev@l...>
  • Date: Tue, 24 Jul 2001 17:40:15 +0000

Newbie - Schemas - Problem with minOccurs? or xmlns?

I've been working with XML for a little while but just started to work with
Schemas yesterday.  I am having some problems with my first attempt (big
surprise).  Basically I am just trying to get a simple document to validate
to make sure I know the basics.  I am checking the document by using a
little VB app I wrote for checking DTDs (so I know the program works).    

Below are my XML and XSD contents.  The XSD is in my wwwroot folder and PWS
is turned on.  The problem is when I say minOccurs="8", there is no error
during validation.  There should be because there's only 2 person elements.
I am pretty sure the document is not being checked by the schema at all.
Any help would be great.  


p.s. Thanks again Jim.

<?xml version="1.0"?>
<addressBook xmlns="http://mymachine/schema"
   <cname>Joel Stout</cname>
   <cname>Harrison Ford</cname>
  <cname>Julia Roberts</cname>

<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
<complexType name="record">
      <element name="cname" type="xsd:string"/>
      <element name="email" type="xsd:string"/>
<element name="addressBook">
         <element name="owner" type="record"/>
         <element name="person" type="record" 
                     minOccurs="8" maxOccurs="unbounded"/>


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.
First Name
Last Name
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.