xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Cleary <da...@progress.com>
Subject RE: XML Schema root element
Date Fri, 16 Aug 2002 13:26:28 GMT
Your schema isn't valid as it doesn't start with the schema element.

David Cleary

  -----Original Message-----
  From: Peter A. Volchek [mailto:PeterV@ti.com.od.ua]
  Sent: Friday, August 16, 2002 6:22 AM
  To: xerces-c-dev@xml.apache.org
  Subject: Re: XML Schema root element


  Tinny,

  I have attached the sample files. Run a.bat to process

  Here is the a.bat content
  DOMPrint.exe -v=always -n -s -f a.xml

  As you may see the validation is set to always. Since it parses and
validates the xml successfully, that may be the problem with the DOMPrint
sample.
  But I think the problem is somewhere in the code, since I got that
situation in my project's tests

  Peter
    ----- Original Message -----
    From: Tinny Ng
    To: xerces-c-dev@xml.apache.org
    Sent: Thursday, August 15, 2002 9:39 PM
    Subject: Re: XML Schema root element


    Peter,

    Is it you have validation schema set to Val_Auto?  If so, change it to
Val_Always, then you should see validation error of the root element.

    How Val_Auto works is:
    1. When the parser enters the xs:ANYNAME, the validation flag is off.
    2. Then a schema is encountered, the validation flag is then set to on
    3. So when the parser entering the xs:element, the validation flag is on

    Such validation flag works like a stack, and is being popped and pushed
when entering and leaving the element.   Since the validation flag was off
when entering xs:ANYNAME, thus the root is not validated but xs:element is.

    Tinny
      ----- Original Message -----
      From: Peter A. Volchek
      To: Xerces-Dev
      Sent: Thursday, August 15, 2002 12:52 PM
      Subject: XML Schema root element


      I have noticed that Xerces does not validate the XML schema's root
element.
      In other words, it is possible to validate the following schema w/o
errors

      <xs:ANYNAME xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <xs:element name="A" type="xs:string"/>
      </xs:ANYNAME>

      Is it bug or just missed item or even allowed situation?



Mime
View raw message