You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2001/08/01 21:11:02 UTC

cvs commit: xml-xerces/c/src/sax2 SAX2XMLReader.hpp

tng         01/08/01 12:11:02

  Modified:    c/samples/DOMCount DOMCount.cpp
               c/samples/DOMPrint DOMPrint.cpp
               c/samples/IDOMCount IDOMCount.cpp
               c/samples/IDOMPrint IDOMPrint.cpp
               c/samples/MemParse MemParse.cpp
               c/samples/PParse PParse.cpp
               c/samples/SAX2Count SAX2Count.cpp
               c/samples/SAX2Print SAX2Print.cpp
               c/samples/SAXCount SAXCount.cpp
               c/samples/SAXPrint SAXPrint.cpp
               c/samples/StdInParse StdInParse.cpp
               c/src/internal XMLScanner.cpp XMLScanner.hpp
               c/src/parsers DOMParser.cpp DOMParser.hpp IDOMParser.cpp
                        IDOMParser.hpp SAX2XMLReaderImpl.cpp
                        SAX2XMLReaderImpl.hpp SAXParser.cpp SAXParser.hpp
               c/src/sax2 SAX2XMLReader.hpp
  Log:
  Add full schema constraint checking flag to the samples and the parser.
  
  Revision  Changes    Path
  1.14      +13 -5     xml-xerces/c/samples/DOMCount/DOMCount.cpp
  
  Index: DOMCount.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/DOMCount/DOMCount.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DOMCount.cpp	2001/05/17 15:27:50	1.13
  +++ DOMCount.cpp	2001/08/01 19:11:01	1.14
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: DOMCount.cpp,v 1.13 2001/05/17 15:27:50 tng Exp $
  + * $Id: DOMCount.cpp,v 1.14 2001/08/01 19:11:01 tng Exp $
    */
   
   // ---------------------------------------------------------------------------
  @@ -81,14 +81,15 @@
   void usage()
   {
       cout << "\nUsage:\n"
  -            "    DOMCount [-v -n] {XML file}\n\n"
  +            "    DOMCount [options] <XML file>\n\n"
               "This program invokes the XML4C DOM parser, builds\n"
               "the DOM tree, and then prints the number of elements\n"
               "found in the input XML file.\n\n"
               "Options:\n"
               "    -v=xxx      Validation scheme [always | never | auto*]\n"
               "    -n          Enable namespace processing. Defaults to off.\n"
  -            "    -s          Enable schema processing. Defaults to off.\n\n"
  +            "    -s          Enable schema processing. Defaults to off.\n"
  +            "    -f          Enable full schema constraint checking. Defaults to off.\n\n"
               "  * = Default if not provided explicitly\n\n"
            << endl;
   }
  @@ -118,8 +119,9 @@
   
       const char*              xmlFile = 0;
       DOMParser::ValSchemes    valScheme = DOMParser::Val_Auto;
  -    bool                     doNamespaces    = false;
  -    bool                     doSchema        = false;
  +    bool                     doNamespaces       = false;
  +    bool                     doSchema           = false;
  +    bool                     schemaFullChecking = false;
   
       // See if non validating dom parser configuration is requested.
       if ((argC == 2) && !strcmp(argV[1], "-?"))
  @@ -162,6 +164,11 @@
           {
               doSchema = true;
           }
  +         else if (!strcmp(argV[argInd], "-f")
  +              ||  !strcmp(argV[argInd], "-F"))
  +        {
  +            schemaFullChecking = true;
  +        }
            else
           {
               cerr << "Unknown option '" << argV[argInd]
  @@ -185,6 +192,7 @@
       parser.setValidationScheme(valScheme);
       parser.setDoNamespaces(doNamespaces);
       parser.setDoSchema(doSchema);
  +    parser.setValidationSchemaFullChecking(schemaFullChecking);
   
       // And create our error handler and install it
       DOMCountErrorHandler errorHandler;
  
  
  
  1.33      +13 -2     xml-xerces/c/samples/DOMPrint/DOMPrint.cpp
  
  Index: DOMPrint.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/DOMPrint/DOMPrint.cpp,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- DOMPrint.cpp	2001/06/05 19:42:27	1.32
  +++ DOMPrint.cpp	2001/08/01 19:11:01	1.33
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: DOMPrint.cpp,v 1.32 2001/06/05 19:42:27 jberry Exp $
  + * $Id: DOMPrint.cpp,v 1.33 2001/08/01 19:11:01 tng Exp $
    */
   
   
  @@ -225,6 +225,9 @@
   //  gDoSchema
   //      Indicates whether schema processing should be done.
   //
  +//  gSchemaFullChecking
  +//      Indicates whether full schema constraint checking should be done.
  +//
   //  gDoCreate
   //      Indicates whether entity reference nodes needs to be created or not
   //      Defaults to false
  @@ -241,6 +244,7 @@
   static char*                    gXmlFile               = 0;
   static bool                     gDoNamespaces          = false;
   static bool                     gDoSchema              = false;
  +static bool                     gSchemaFullChecking    = false;
   static bool                     gDoCreate              = false;
   static XMLCh*                   gEncodingName          = 0;
   static XMLFormatter::UnRepFlags gUnRepFlags            = XMLFormatter::UnRep_CharRef;
  @@ -267,7 +271,7 @@
   // ---------------------------------------------------------------------------
   void usage()
   {
  -    cout << "\nUsage: DOMPrint [options] file\n\n"
  +    cout << "\nUsage: DOMPrint [options] <XML file>\n\n"
               "This program invokes the Xerces-C DOM parser and builds the DOM\n"
               "tree. It then traverses the DOM tree and prints the contents\n"
               "of the tree. Options are NOT case sensitive.\n\n"
  @@ -277,6 +281,7 @@
               "    -v=xxx      Validation scheme [always | never | auto*]\n"
               "    -n          Enable namespace processing. Default is off.\n"
               "    -s          Enable schema processing. Default is off.\n"
  +            "    -f          Enable full schema constraint checking. Defaults to off.\n"
               "    -x=XXX      Use a particular encoding for output. Default is\n"
               "                the same encoding as the input XML file. UTF-8 if\n"
               "                input XML file has not XML declaration.\n"
  @@ -364,6 +369,11 @@
           {
               gDoSchema = true;
           }
  +         else if (!strcmp(argV[parmInd], "-f")
  +              ||  !strcmp(argV[parmInd], "-F"))
  +        {
  +            gSchemaFullChecking = true;
  +        }
            else if (!strcmp(argV[parmInd], "-e")
                 ||  !strcmp(argV[parmInd], "-E"))
           {
  @@ -424,6 +434,7 @@
       parser->setValidationScheme(gValScheme);
       parser->setDoNamespaces(gDoNamespaces);
       parser->setDoSchema(gDoSchema);
  +    parser->setValidationSchemaFullChecking(gSchemaFullChecking);
       DOMTreeErrorReporter *errReporter = new DOMTreeErrorReporter();
       parser->setErrorHandler(errReporter);
       parser->setCreateEntityReferenceNodes(gDoCreate);
  
  
  
  1.5       +14 -6     xml-xerces/c/samples/IDOMCount/IDOMCount.cpp
  
  Index: IDOMCount.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/IDOMCount/IDOMCount.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- IDOMCount.cpp	2001/06/25 15:52:09	1.4
  +++ IDOMCount.cpp	2001/08/01 19:11:01	1.5
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: IDOMCount.cpp,v 1.4 2001/06/25 15:52:09 tng Exp $
  + * $Id: IDOMCount.cpp,v 1.5 2001/08/01 19:11:01 tng Exp $
    */
   
   // ---------------------------------------------------------------------------
  @@ -82,14 +82,15 @@
   static void usage()
   {
       cout << "\nUsage:\n"
  -            "    IDOMCount [-v -n] {XML file}\n\n"
  +            "    IDOMCount [options] <XML file>\n\n"
               "This program invokes the XML4C DOM parser, builds\n"
               "the DOM tree, and then prints the number of elements\n"
               "found in the input XML file.\n\n"
               "Options:\n"
               "    -v=xxx      Validation scheme [always | never | auto*]\n"
  -            "    -n          Enable namespace processing. Defaults to off.\n\n"
  -            "    -s          Enable schema processing. Defaults to off.\n\n"
  +            "    -n          Enable namespace processing. Defaults to off.\n"
  +            "    -s          Enable schema processing. Defaults to off.\n"
  +            "    -f          Enable full schema constraint checking. Defaults to off.\n\n"
               "  * = Default if not provided explicitly\n\n"
            << endl;
   }
  @@ -151,8 +152,9 @@
   
       const char*               xmlFile = 0;
       IDOMParser::ValSchemes    valScheme = IDOMParser::Val_Auto;
  -    bool                      doNamespaces    = false;
  -    bool                      doSchema        = false;
  +    bool                      doNamespaces       = false;
  +    bool                      doSchema           = false;
  +    bool                      schemaFullChecking = false;
   
       // See if non validating dom parser configuration is requested.
       if ((argC == 2) && !strcmp(argV[1], "-?"))
  @@ -195,6 +197,11 @@
           {
               doSchema = true;
           }
  +         else if (!strcmp(argV[argInd], "-f")
  +              ||  !strcmp(argV[argInd], "-F"))
  +        {
  +            schemaFullChecking = true;
  +        }
            else
           {
               cerr << "Unknown option '" << argV[argInd]
  @@ -218,6 +225,7 @@
       parser.setValidationScheme(valScheme);
       parser.setDoNamespaces(doNamespaces);
       parser.setDoSchema(doSchema);
  +    parser.setValidationSchemaFullChecking(schemaFullChecking);
   
       // And create our error handler and install it
       DOMCountErrorHandler errorHandler;
  
  
  
  1.4       +13 -2     xml-xerces/c/samples/IDOMPrint/IDOMPrint.cpp
  
  Index: IDOMPrint.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/IDOMPrint/IDOMPrint.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IDOMPrint.cpp	2001/07/19 19:14:33	1.3
  +++ IDOMPrint.cpp	2001/08/01 19:11:01	1.4
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: IDOMPrint.cpp,v 1.3 2001/07/19 19:14:33 tng Exp $
  + * $Id: IDOMPrint.cpp,v 1.4 2001/08/01 19:11:01 tng Exp $
    */
   
   
  @@ -220,6 +220,9 @@
   //  gDoSchema
   //      Indicates whether schema processing should be done.
   //
  +//  gSchemaFullChecking
  +//      Indicates whether full schema constraint checking should be done.
  +//
   //  gDoCreate
   //      Indicates whether entity reference nodes needs to be created or not
   //      Defaults to false
  @@ -236,6 +239,7 @@
   static char*                    gXmlFile               = 0;
   static bool                     gDoNamespaces          = false;
   static bool                     gDoSchema              = false;
  +static bool                     gSchemaFullChecking    = false;
   static bool                     gDoCreate              = false;
   static const XMLCh*             gEncodingName          = 0;
   static bool                     gEncodingNameisOnHeap  = false;
  @@ -263,7 +267,7 @@
   // ---------------------------------------------------------------------------
   void usage()
   {
  -    cout << "\nUsage: IDOMPrint [options] file\n\n"
  +    cout << "\nUsage: IDOMPrint [options] <XML file>\n\n"
               "This program invokes the Xerces-C IDOM parser and builds the IDOM\n"
               "tree. It then traverses the DOM tree and prints the contents\n"
               "of the tree. Options are NOT case sensitive.\n\n"
  @@ -273,6 +277,7 @@
               "    -v=xxx      Validation scheme [always | never | auto*]\n"
               "    -n          Enable namespace processing. Default is off.\n"
               "    -s          Enable schema processing. Default is off.\n"
  +            "    -f          Enable full schema constraint checking. Defaults is off.\n"
               "    -x=XXX      Use a particular encoding for output. Default is\n"
               "                the same encoding as the input XML file. UTF-8 if\n"
               "                input XML file has not XML declaration.\n"
  @@ -360,6 +365,11 @@
           {
               gDoSchema = true;
           }
  +         else if (!strcmp(argV[parmInd], "-f")
  +              ||  !strcmp(argV[parmInd], "-F"))
  +        {
  +            gSchemaFullChecking = true;
  +        }
            else if (!strcmp(argV[parmInd], "-e")
                 ||  !strcmp(argV[parmInd], "-E"))
           {
  @@ -421,6 +431,7 @@
       parser->setValidationScheme(gValScheme);
       parser->setDoNamespaces(gDoNamespaces);
       parser->setDoSchema(gDoSchema);
  +    parser->setValidationSchemaFullChecking(gSchemaFullChecking);
       IDOMTreeErrorReporter *errReporter = new IDOMTreeErrorReporter();
       parser->setErrorHandler(errReporter);
       parser->setCreateEntityReferenceNodes(gDoCreate);
  
  
  
  1.10      +14 -3     xml-xerces/c/samples/MemParse/MemParse.cpp
  
  Index: MemParse.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/MemParse/MemParse.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MemParse.cpp	2001/05/11 13:24:55	1.9
  +++ MemParse.cpp	2001/08/01 19:11:01	1.10
  @@ -57,6 +57,9 @@
   
   /*
    * $Log: MemParse.cpp,v $
  + * Revision 1.10  2001/08/01 19:11:01  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.9  2001/05/11 13:24:55  tng
    * Copyright update.
    *
  @@ -185,7 +188,8 @@
            << "\nOptions:\n"
            << "    -v=xxx      Validation scheme [always | never | auto*]\n"
            << "    -n          Enable namespace processing. Defaults to off.\n"
  -         << "    -s          Enable schema processing. Defaults to off.\n\n"
  +         << "    -s          Enable schema processing. Defaults to off.\n"
  +         << "    -f          Enable full schema constraint checking. Defaults to off.\n\n"
            << "  * = Default if not provided explicitly\n"
            << endl;
   }
  @@ -209,8 +213,9 @@
       }
   
       SAXParser::ValSchemes    valScheme = SAXParser::Val_Auto;
  -    bool doNamespaces    = false;
  -    bool doSchema        = false;
  +    bool doNamespaces       = false;
  +    bool doSchema           = false;
  +    bool schemaFullChecking = false;
       if (argC > 1)
       {
           // See if non validating dom parser configuration is requested.
  @@ -250,6 +255,11 @@
               {
                   doSchema = true;
               }
  +             else if (!strcmp(argV[argInd], "-f")
  +                  ||  !strcmp(argV[argInd], "-F"))
  +            {
  +                schemaFullChecking = true;
  +            }
                else
               {
                   cerr << "Unknown option '" << argV[argInd]
  @@ -266,6 +276,7 @@
       parser.setValidationScheme(valScheme);
       parser.setDoNamespaces(doNamespaces);
       parser.setDoSchema(doSchema);
  +    parser.setValidationSchemaFullChecking(schemaFullChecking);
   
       //
       //  Create our SAX handler object and install it on the parser, as the
  
  
  
  1.10      +17 -2     xml-xerces/c/samples/PParse/PParse.cpp
  
  Index: PParse.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/PParse/PParse.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- PParse.cpp	2001/05/11 13:24:55	1.9
  +++ PParse.cpp	2001/08/01 19:11:01	1.10
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: PParse.cpp,v $
  + * Revision 1.10  2001/08/01 19:11:01  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.9  2001/05/11 13:24:55  tng
    * Copyright update.
    *
  @@ -108,6 +111,7 @@
   //      [-v=xxx]        - Validation scheme [always | never | auto*]
   //      [-n]            - Enable namespace processing
   //      [-s]            - Enable schema processing
  +//      [-f]            - Enable full schema constraint checking
   //      filename        - The path to the XML file to parse
   //
   //  * = Default if not provided explicitly
  @@ -136,13 +140,17 @@
   //  doSchema
   //      Indicates whether schema processing should be done.
   //
  +//  schemaFullChecking
  +//      Indicates whether full schema constraint checking should be done.
  +//
   //  valScheme
   //      Indicates what validation scheme to use. It defaults to 'auto', but
   //      can be set via the -v= command.
   // ---------------------------------------------------------------------------
   static char*	 xmlFile         = 0;
  -static bool     doNamespaces    = false;
  -static bool     doSchema        = false;
  +static bool     doNamespaces       = false;
  +static bool     doSchema           = false;
  +static bool     schemaFullChecking = false;
   static SAXParser::ValSchemes    valScheme       = SAXParser::Val_Auto;
   
   
  @@ -163,6 +171,7 @@
            <<  "      -v=xxx        - Validation scheme [always | never | auto*]\n"
            <<  "      -n            - Enable namespace processing [default is off]\n"
            <<  "      -s            - Enable schema processing [default is off]\n"
  +         <<  "      -f            - Enable full schema constraint checking [default is off]\n"
            <<  "      -?            - Show this help (must be the only parameter)\n\n"
            <<  "  * = Default if not provided explicitly\n"
            <<  endl;
  @@ -238,6 +247,11 @@
           {
               doSchema = true;
           }
  +         else if (!strcmp(argV[parmInd], "-f")
  +              ||  !strcmp(argV[parmInd], "-F"))
  +        {
  +            schemaFullChecking = true;
  +        }
            else
           {
               usage();
  @@ -268,6 +282,7 @@
       parser.setValidationScheme(valScheme);
       parser.setDoNamespaces(doNamespaces);
       parser.setDoSchema(doSchema);
  +    parser.setValidationSchemaFullChecking(schemaFullChecking);
   
       //
       //  Ok, lets do the progressive parse loop. On each time around the
  
  
  
  1.6       +11 -0     xml-xerces/c/samples/SAX2Count/SAX2Count.cpp
  
  Index: SAX2Count.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/SAX2Count/SAX2Count.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SAX2Count.cpp	2001/05/11 13:24:56	1.5
  +++ SAX2Count.cpp	2001/08/01 19:11:01	1.6
  @@ -56,6 +56,9 @@
   
   /*
   * $Log: SAX2Count.cpp,v $
  +* Revision 1.6  2001/08/01 19:11:01  tng
  +* Add full schema constraint checking flag to the samples and the parser.
  +*
   * Revision 1.5  2001/05/11 13:24:56  tng
   * Copyright update.
   *
  @@ -94,6 +97,7 @@
               "    -v=xxx      Validation scheme [always | never | auto*]\n"
               "    -n          Disable namespace processing. Defaults to on.\n"
               "    -s          Disable schema processing. Defaults to on.\n\n"
  +            "    -f          Enable full schema constraint checking processing. Defaults to off.\n\n"
               "This program prints the number of elements, attributes,\n"
               "white spaces and other non-white space characters in the "
               "input file.\n\n"
  @@ -132,6 +136,7 @@
       SAX2XMLReader::ValSchemes    valScheme    = SAX2XMLReader::Val_Auto;
       bool                         doNamespaces = true;
       bool                         doSchema = true;
  +    bool                         schemaFullChecking = false;
   
       // See if non validating dom parser configuration is requested.
       if ((argC == 2) && !strcmp(argV[1], "-?"))
  @@ -175,6 +180,11 @@
           {
               doSchema = false;
           }
  +         else if (!strcmp(argV[argInd], "-f")
  +              ||  !strcmp(argV[argInd], "-F"))
  +        {
  +            schemaFullChecking = true;
  +        }
           else
           {
               cerr << "Unknown option '" << argV[argInd]
  @@ -201,6 +211,7 @@
       SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
   	parser->setFeature(XMLString::transcode("http://xml.org/sax/features/namespaces"), doNamespaces);
   	parser->setFeature(XMLString::transcode("http://apache.org/xml/features/validation/schema"), doSchema);
  +	parser->setFeature(XMLString::transcode("http://apache.org/xml/features/validation/schema-full-checking"), schemaFullChecking);
   	if (valScheme == SAX2XMLReader::Val_Auto)
   	{
   	  parser->setFeature(XMLString::transcode("http://xml.org/sax/features/validation"), true);
  
  
  
  1.3       +42 -15    xml-xerces/c/samples/SAX2Print/SAX2Print.cpp
  
  Index: SAX2Print.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/SAX2Print/SAX2Print.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SAX2Print.cpp	2000/08/09 22:20:38	1.2
  +++ SAX2Print.cpp	2001/08/01 19:11:01	1.3
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAX2Print.cpp,v $
  + * Revision 1.3  2001/08/01 19:11:01  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.2  2000/08/09 22:20:38  jpolast
    * updates for changes to sax2 core functionality.
    *
  @@ -98,7 +101,9 @@
   static XMLFormatter::UnRepFlags unRepFlags      = XMLFormatter::UnRep_CharRef;
   static char*                    xmlFile         = 0;
   static SAX2XMLReader::ValSchemes valScheme      = SAX2XMLReader::Val_Auto;
  -static bool						expandNamespaces= false ;
  +static bool					        expandNamespaces= false ;
  +static bool                     doSchema        = true;
  +static bool                     schemaFullChecking = false;
   
   
   
  @@ -116,6 +121,8 @@
                "    -v=xxx      Validation scheme [always | never | auto*]\n"
                "    -e          Expand Namespace Alias with URI's.\n"
                "    -x=XXX      Use a particular encoding for output (LATIN1*).\n"
  +             "    -s          Disable schema processing. Defaults to on.\n\n"
  +             "    -f          Enable full schema constraint checking processing. Defaults to off.\n\n"
                "    -?          Show this help\n\n"
                "  * = Default if not provided explicitly\n\n"
                "The parser has intrinsic support for the following encodings:\n"
  @@ -212,6 +219,16 @@
                   return 2;
               }
           }
  +         else if (!strcmp(argV[parmInd], "-s")
  +              ||  !strcmp(argV[parmInd], "-S"))
  +        {
  +            doSchema = false;
  +        }
  +         else if (!strcmp(argV[parmInd], "-f")
  +              ||  !strcmp(argV[parmInd], "-F"))
  +        {
  +            schemaFullChecking = true;
  +        }
            else
           {
               cerr << "Unknown option '" << argV[parmInd]
  @@ -235,20 +252,30 @@
       //  the command line, set it to validate or not.
       //
       SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
  -	if (valScheme == SAX2XMLReader::Val_Auto)
  -	{
  -	  parser->setFeature(XMLString::transcode("http://xml.org/sax/features/validation"), true);
  -	  parser->setFeature(XMLString::transcode("http://apache.org/xml/features/validation/dynamic"), true);
  -	}
  +
  +    //
  +    //  Then, according to what we were told on
  +    //  the command line, set it to validate or not.
  +    //
  +    if (valScheme == SAX2XMLReader::Val_Auto)
  +    {
  +        parser->setFeature(XMLString::transcode("http://xml.org/sax/features/validation"), true);
  +        parser->setFeature(XMLString::transcode("http://apache.org/xml/features/validation/dynamic"), true);
  +    }
  +
       if (valScheme == SAX2XMLReader::Val_Never)
  -	{
  -	  parser->setFeature(XMLString::transcode("http://xml.org/sax/features/validation"), false);
  -	}
  -	if (valScheme == SAX2XMLReader::Val_Always)
  -	{
  -	  parser->setFeature(XMLString::transcode("http://xml.org/sax/features/validation"), true);
  -	  parser->setFeature(XMLString::transcode("http://apache.org/xml/features/validation/dynamic"), false);
  -	}
  +    {
  +        parser->setFeature(XMLString::transcode("http://xml.org/sax/features/validation"), false);
  +    }
  +
  +    if (valScheme == SAX2XMLReader::Val_Always)
  +    {
  +        parser->setFeature(XMLString::transcode("http://xml.org/sax/features/validation"), true);
  +        parser->setFeature(XMLString::transcode("http://apache.org/xml/features/validation/dynamic"), false);
  +    }
  +
  +    parser->setFeature(XMLString::transcode("http://apache.org/xml/features/validation/schema"), doSchema);
  +    parser->setFeature(XMLString::transcode("http://apache.org/xml/features/validation/schema-full-checking"), schemaFullChecking);
   
       //
       //  Create the handler object and install it as the document and error
  
  
  
  1.12      +14 -3     xml-xerces/c/samples/SAXCount/SAXCount.cpp
  
  Index: SAXCount.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/SAXCount/SAXCount.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- SAXCount.cpp	2001/05/11 13:24:57	1.11
  +++ SAXCount.cpp	2001/08/01 19:11:01	1.12
  @@ -56,6 +56,9 @@
   
   /*
   * $Log: SAXCount.cpp,v $
  +* Revision 1.12  2001/08/01 19:11:01  tng
  +* Add full schema constraint checking flag to the samples and the parser.
  +*
   * Revision 1.11  2001/05/11 13:24:57  tng
   * Copyright update.
   *
  @@ -120,7 +123,8 @@
               "Options:\n"
               "    -v=xxx      Validation scheme [always | never | auto*]\n"
               "    -n          Enable namespace processing. Defaults to off.\n"
  -            "    -s          Enable schema processing. Defaults to off.\n\n"
  +            "    -s          Enable schema processing. Defaults to off.\n"
  +            "    -f          Enable full schema constraint checking. Defaults to off.\n\n"
               "This program prints the number of elements, attributes,\n"
               "white spaces and other non-white space characters in the "
               "input file.\n\n"
  @@ -157,8 +161,9 @@
   
       const char*              xmlFile = 0;
       SAXParser::ValSchemes    valScheme = SAXParser::Val_Auto;
  -    bool                     doNamespaces = false;
  -    bool                     doSchema = false;
  +    bool                     doNamespaces       = false;
  +    bool                     doSchema           = false;
  +    bool                     schemaFullChecking = false;
   
   
       int argInd;
  @@ -195,6 +200,11 @@
           {
               doSchema = true;
           }
  +         else if (!strcmp(argV[argInd], "-f")
  +              ||  !strcmp(argV[argInd], "-F"))
  +        {
  +            schemaFullChecking = true;
  +        }
           else
           {
               cerr << "Unknown option '" << argV[argInd]
  @@ -227,6 +237,7 @@
           parser.setValidationScheme(valScheme);
           parser.setDoNamespaces(doNamespaces);
           parser.setDoSchema(doSchema);
  +        parser.setValidationSchemaFullChecking(schemaFullChecking);
   
           //
           //  Create our SAX handler object and install it on the parser, as the
  
  
  
  1.15      +17 -2     xml-xerces/c/samples/SAXPrint/SAXPrint.cpp
  
  Index: SAXPrint.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/SAXPrint/SAXPrint.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- SAXPrint.cpp	2001/05/11 13:24:58	1.14
  +++ SAXPrint.cpp	2001/08/01 19:11:01	1.15
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAXPrint.cpp,v $
  + * Revision 1.15  2001/08/01 19:11:01  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.14  2001/05/11 13:24:58  tng
    * Copyright update.
    *
  @@ -133,6 +136,10 @@
   //      Indicates whether schema processing should be enabled or not.
   //      Defaults to disabled.
   //
  +//  schemaFullChecking
  +//      Indicates whether full schema constraint checking should be enabled or not.
  +//      Defaults to disabled.
  +//
   //  encodingName
   //      The encoding we are to output in. If not set on the command line,
   //      then it is defaulted to LATIN1.
  @@ -144,8 +151,9 @@
   //      Indicates what validation scheme to use. It defaults to 'auto', but
   //      can be set via the -v= command.
   // ---------------------------------------------------------------------------
  -static bool                     doNamespaces    = false;
  -static bool                     doSchema        = false;
  +static bool                     doNamespaces        = false;
  +static bool                     doSchema            = false;
  +static bool                     schemaFullChecking  = false;
   static const char*              encodingName    = "LATIN1";
   static XMLFormatter::UnRepFlags unRepFlags      = XMLFormatter::UnRep_CharRef;
   static char*                    xmlFile         = 0;
  @@ -167,6 +175,7 @@
                "    -v=xxx      Validation scheme [always | never | auto*]\n"
                "    -n          Enable namespace processing.\n"
                "    -s          Enable schema processing.\n"
  +             "    -f          Enable full schema constraint checking.\n"
                "    -x=XXX      Use a particular encoding for output (LATIN1*).\n"
                "    -?          Show this help\n\n"
                "  * = Default if not provided explicitly\n\n"
  @@ -246,6 +255,11 @@
           {
               doSchema = true;
           }
  +         else if (!strcmp(argV[parmInd], "-f")
  +              ||  !strcmp(argV[parmInd], "-F"))
  +        {
  +            schemaFullChecking = true;
  +        }
            else if (!strncmp(argV[parmInd], "-x=", 3)
                 ||  !strncmp(argV[parmInd], "-X=", 3))
           {
  @@ -295,6 +309,7 @@
       parser.setValidationScheme(valScheme);
       parser.setDoNamespaces(doNamespaces);
       parser.setDoSchema(doSchema);
  +    parser.setValidationSchemaFullChecking(schemaFullChecking);
   
       //
       //  Create the handler object and install it as the document and error
  
  
  
  1.10      +17 -2     xml-xerces/c/samples/StdInParse/StdInParse.cpp
  
  Index: StdInParse.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/samples/StdInParse/StdInParse.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StdInParse.cpp	2001/05/11 13:24:59	1.9
  +++ StdInParse.cpp	2001/08/01 19:11:01	1.10
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: StdInParse.cpp,v $
  + * Revision 1.10  2001/08/01 19:11:01  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.9  2001/05/11 13:24:59  tng
    * Copyright update.
    *
  @@ -110,12 +113,17 @@
   //      Indicates whether schema processing should be enabled or not.
   //      The default is no, but -s overrides that.
   //
  +//  schemaFullChecking
  +//      Indicates whether full schema constraint checking should be enabled or not.
  +//      The default is no, but -s overrides that.
  +//
   //  valScheme
   //      Indicates what validation scheme to use. It defaults to 'auto', but
   //      can be set via the -v= command.
   // ---------------------------------------------------------------------------
  -static bool     doNamespaces    = false;
  -static bool     doSchema        = false;
  +static bool     doNamespaces       = false;
  +static bool     doSchema           = false;
  +static bool     schemaFullChecking = false;
   static SAXParser::ValSchemes    valScheme       = SAXParser::Val_Auto;
   
   
  @@ -130,6 +138,7 @@
            << "    -v=xxx      Validation scheme [always | never | auto] \n"
            << "    -n          Enable namespace processing. [default is off]\n"
            << "    -s          Enable schema processing. [default is off]\n"
  +         << "    -f          Enable full schema constraint checking. [defaults is off]\n"
   		   << "    -?          Show this help\n\n"
            << "  * = Default if not provided explicitly\n\n"
            << "This program allows you to redirect a file into the program\n"
  @@ -192,6 +201,11 @@
           {
               doSchema = true;
           }
  +         else if (!strcmp(argV[parmInd], "-f")
  +              ||  !strcmp(argV[parmInd], "-F"))
  +        {
  +            schemaFullChecking = true;
  +        }
            else
           {
               cerr << "Unknown option '" << argV[parmInd]
  @@ -207,6 +221,7 @@
       parser.setValidationScheme(valScheme);
       parser.setDoNamespaces(doNamespaces);
       parser.setDoSchema(doSchema);
  +    parser.setValidationSchemaFullChecking(schemaFullChecking);
   
   
       //
  
  
  
  1.58      +4 -2      xml-xerces/c/src/internal/XMLScanner.cpp
  
  Index: XMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/internal/XMLScanner.cpp,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- XMLScanner.cpp	2001/07/24 18:32:27	1.57
  +++ XMLScanner.cpp	2001/08/01 19:11:01	1.58
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: XMLScanner.cpp,v 1.57 2001/07/24 18:32:27 knoaman Exp $
  + * $Id: XMLScanner.cpp,v 1.58 2001/08/01 19:11:01 tng Exp $
    */
   
   
  @@ -178,6 +178,7 @@
       , fValidatorFromUser(false)
       , fValScheme(Val_Never)
       , fDoSchema(false)
  +    , fSchemaFullChecking(false)
       , fSeeXsi(false)
       , fEmptyNamespaceId(0)
       , fUnknownNamespaceId(0)
  @@ -232,6 +233,7 @@
       , fValidatorFromUser(false)
       , fValScheme(Val_Never)
       , fDoSchema(false)
  +    , fSchemaFullChecking(false)
       , fSeeXsi(false)
       , fEmptyNamespaceId(0)
       , fUnknownNamespaceId(0)
  @@ -2815,7 +2817,7 @@
       bool wasAdded = false;
       XMLElementDecl* elemDecl;
       const XMLCh* nameRawBuf = fNameBuf.getRawBuffer();
  -    const XMLCh* qnameRawBuf = fQNameBuf.getRawBuffer(); 
  +    const XMLCh* qnameRawBuf = fQNameBuf.getRawBuffer();
   
       if (uriId != fEmptyNamespaceId) {
   
  
  
  
  1.29      +20 -0     xml-xerces/c/src/internal/XMLScanner.hpp
  
  Index: XMLScanner.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/internal/XMLScanner.hpp,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- XMLScanner.hpp	2001/07/24 21:23:39	1.28
  +++ XMLScanner.hpp	2001/08/01 19:11:01	1.29
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: XMLScanner.hpp,v $
  + * Revision 1.29  2001/08/01 19:11:01  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.28  2001/07/24 21:23:39  tng
    * Schema: Use DatatypeValidator for ID/IDREF/ENTITY/ENTITIES/NOTATION.
    *
  @@ -305,6 +308,7 @@
       bool getDoNamespaces() const;
       ValSchemes getValidationScheme() const;
       bool getDoSchema() const;
  +    bool getValidationSchemaFullChecking() const;
       const XMLEntityHandler* getEntityHandler() const;
       XMLEntityHandler* getEntityHandler();
       const XMLErrorReporter* getErrorReporter() const;
  @@ -434,6 +438,7 @@
       void setValidationScheme(const ValSchemes newScheme);
       void setValidator(XMLValidator* const valToAdopt);
       void setDoSchema(const bool doSchema);
  +    void setValidationSchemaFullChecking(const bool schemaFullChecking);
       void setHasNoDTD(const bool hasNoDTD);
   
       // -----------------------------------------------------------------------
  @@ -744,6 +749,10 @@
       //      This flag indicates whether the client code wants Schema to
       //      be processed or not.
       //
  +    //  fSchemaFullChecking
  +    //      This flag indicates whether the client code wants full Schema
  +    //      constraint checking.
  +    //
       //  fSeeXsi
       //      This flag indicates a schema has been seen.
       //
  @@ -825,6 +834,7 @@
       ValSchemes                  fValScheme;
       int                         fErrorCount;
       bool                        fDoSchema;
  +    bool                        fSchemaFullChecking;
       bool                        fSeeXsi;
   
       XMLBuffer                   fAttNameBuf;
  @@ -957,6 +967,11 @@
       return fDoSchema;
   }
   
  +inline bool XMLScanner::getValidationSchemaFullChecking() const
  +{
  +    return fSchemaFullChecking;
  +}
  +
   inline int XMLScanner::getErrorCount()
   {
       return fErrorCount;
  @@ -1109,6 +1124,11 @@
   inline void XMLScanner::setDoSchema(const bool doSchema)
   {
       fDoSchema = doSchema;
  +}
  +
  +inline void XMLScanner::setValidationSchemaFullChecking(const bool schemaFullChecking)
  +{
  +    fSchemaFullChecking = schemaFullChecking;
   }
   
   inline void XMLScanner::setHasNoDTD(const bool hasNoDTD)
  
  
  
  1.55      +11 -1     xml-xerces/c/src/parsers/DOMParser.cpp
  
  Index: DOMParser.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/DOMParser.cpp,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- DOMParser.cpp	2001/07/03 19:18:02	1.54
  +++ DOMParser.cpp	2001/08/01 19:11:02	1.55
  @@ -59,7 +59,7 @@
   *  handler with the scanner. In these handler methods, appropriate DOM nodes
   *  are created and added to the DOM tree.
   *
  -* $Id: DOMParser.cpp,v 1.54 2001/07/03 19:18:02 tng Exp $
  +* $Id: DOMParser.cpp,v 1.55 2001/08/01 19:11:02 tng Exp $
   *
   */
   
  @@ -186,6 +186,11 @@
       return fScanner->getDoSchema();
   }
   
  +bool DOMParser::getValidationSchemaFullChecking() const
  +{
  +    return fScanner->getValidationSchemaFullChecking();
  +}
  +
   int DOMParser::getErrorCount() const
   {
       return fScanner->getErrorCount();
  @@ -249,6 +254,11 @@
   void DOMParser::setDoSchema(const bool newState)
   {
       fScanner->setDoSchema(newState);
  +}
  +
  +void DOMParser::setValidationSchemaFullChecking(const bool schemaFullChecking)
  +{
  +    fScanner->setValidationSchemaFullChecking(schemaFullChecking);
   }
   
   
  
  
  
  1.28      +31 -1     xml-xerces/c/src/parsers/DOMParser.hpp
  
  Index: DOMParser.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/DOMParser.hpp,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- DOMParser.hpp	2001/07/27 20:24:21	1.27
  +++ DOMParser.hpp	2001/08/01 19:11:02	1.28
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: DOMParser.hpp,v 1.27 2001/07/27 20:24:21 tng Exp $
  + * $Id: DOMParser.hpp,v 1.28 2001/08/01 19:11:02 tng Exp $
    *
    */
   
  @@ -234,6 +234,18 @@
         */
       bool getDoSchema() const;
   
  +    /** Get the 'full schema constraint checking' flag
  +      *
  +      * This method returns the state of the parser's full schema constraint
  +      * checking flag.
  +      *
  +      * @return true, if the parser is currently configured to
  +      *         have full schema constraint checking, false otherwise.
  +      *
  +      * @see #setValidationSchemaFullChecking
  +      */
  +    bool getValidationSchemaFullChecking() const;
  +
       /** Get error count from the last parse operation.
         *
         * This method returns the error count from the last parse
  @@ -526,6 +538,24 @@
         * @see #getDoSchema
         */
       void setDoSchema(const bool newState);
  +
  +    /**
  +      * This method allows the user to turn full Schema constraint checking on/off.
  +      * Only takes effect if Schema validation is enabled.
  +      * If turned off, partial constraint checking is done.
  +      *
  +      * Full schema constraint checking includes those checking that may
  +      * be time-consuming or memory intensive. Currently, particle unique
  +      * attribution constraint checking and particle derivation resriction checking
  +      * are controlled by this option.
  +      *
  +      * The parser's default state is: false.
  +      *
  +      * @param schemaFullChecking True to turn on full schema constraint checking.
  +      *
  +      * @see #getValidationSchemaFullChecking
  +      */
  +    void setValidationSchemaFullChecking(const bool schemaFullChecking);
   
       /**
         * This method allows users to set the toCreateXMLDeclTypeNode flag
  
  
  
  1.6       +10 -1     xml-xerces/c/src/parsers/IDOMParser.cpp
  
  Index: IDOMParser.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/IDOMParser.cpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- IDOMParser.cpp	2001/06/08 21:26:05	1.5
  +++ IDOMParser.cpp	2001/08/01 19:11:02	1.6
  @@ -59,7 +59,7 @@
   *  handler with the scanner. In these handler methods, appropriate IDOM nodes
   *  are created and added to the DOM tree.
   *
  -* $Id: IDOMParser.cpp,v 1.5 2001/06/08 21:26:05 tng Exp $
  +* $Id: IDOMParser.cpp,v 1.6 2001/08/01 19:11:02 tng Exp $
   *
   */
   
  @@ -191,6 +191,11 @@
       return fScanner->getDoSchema();
   }
   
  +bool IDOMParser::getValidationSchemaFullChecking() const
  +{
  +    return fScanner->getValidationSchemaFullChecking();
  +}
  +
   int IDOMParser::getErrorCount() const
   {
       return fScanner->getErrorCount();
  @@ -257,6 +262,10 @@
       fScanner->setDoSchema(newState);
   }
   
  +void IDOMParser::setValidationSchemaFullChecking(const bool schemaFullChecking)
  +{
  +    fScanner->setValidationSchemaFullChecking(schemaFullChecking);
  +}
   
   // ---------------------------------------------------------------------------
   //  IDOMParser: Parsing methods
  
  
  
  1.7       +31 -1     xml-xerces/c/src/parsers/IDOMParser.hpp
  
  Index: IDOMParser.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/IDOMParser.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- IDOMParser.hpp	2001/07/16 13:15:07	1.6
  +++ IDOMParser.hpp	2001/08/01 19:11:02	1.7
  @@ -55,7 +55,7 @@
    */
   
   /*
  - * $Id: IDOMParser.hpp,v 1.6 2001/07/16 13:15:07 tng Exp $
  + * $Id: IDOMParser.hpp,v 1.7 2001/08/01 19:11:02 tng Exp $
    *
    */
   
  @@ -227,6 +227,18 @@
         */
       bool getDoSchema() const;
   
  +    /** Get the 'full schema constraint checking' flag
  +      *
  +      * This method returns the state of the parser's full schema constraint
  +      * checking flag.
  +      *
  +      * @return true, if the parser is currently configured to
  +      *         have full schema constraint checking, false otherwise.
  +      *
  +      * @see #setValidationSchemaFullChecking
  +      */
  +    bool getValidationSchemaFullChecking() const;
  +
       /** Get error count from the last parse operation.
         *
         * This method returns the error count from the last parse
  @@ -508,6 +520,24 @@
         * @see #getDoSchema
         */
       void setDoSchema(const bool newState);
  +
  +    /**
  +      * This method allows the user to turn full Schema constraint checking on/off.
  +      * Only takes effect if Schema validation is enabled.
  +      * If turned off, partial constraint checking is done.
  +      *
  +      * Full schema constraint checking includes those checking that may
  +      * be time-consuming or memory intensive. Currently, particle unique
  +      * attribution constraint checking and particle derivation resriction checking
  +      * are controlled by this option.
  +      *
  +      * The parser's default state is: false.
  +      *
  +      * @param schemaFullChecking True to turn on full schema constraint checking.
  +      *
  +      * @see #getValidationSchemaFullChecking
  +      */
  +    void setValidationSchemaFullChecking(const bool schemaFullChecking);
   
       //@}
   
  
  
  
  1.16      +29 -0     xml-xerces/c/src/parsers/SAX2XMLReaderImpl.cpp
  
  Index: SAX2XMLReaderImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/SAX2XMLReaderImpl.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- SAX2XMLReaderImpl.cpp	2001/06/27 17:39:50	1.15
  +++ SAX2XMLReaderImpl.cpp	2001/08/01 19:11:02	1.16
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAX2XMLReaderImpl.cpp,v $
  + * Revision 1.16  2001/08/01 19:11:02  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.15  2001/06/27 17:39:50  knoaman
    * Fix for bug #2353.
    *
  @@ -262,6 +265,25 @@
   		chLatin_m, chLatin_a, chNull
   };
   
  +//Xerces: http://apache.org/xml/features/validation/schema-full-checking
  +const XMLCh SAX2XMLReaderImpl::SAX_XERCES_SCHEMA_FULL_CHECKING[] = {
  +		chLatin_h, chLatin_t, chLatin_t, chLatin_p,
  +		chColon, chForwardSlash, chForwardSlash,
  +		chLatin_a, chLatin_p, chLatin_a, chLatin_c, chLatin_h, chLatin_e, chPeriod,
  +		chLatin_o, chLatin_r, chLatin_g, chForwardSlash,
  +		chLatin_x, chLatin_m, chLatin_l, chForwardSlash,
  +		chLatin_f, chLatin_e, chLatin_a,
  +		chLatin_t, chLatin_u, chLatin_r,
  +		chLatin_e, chLatin_s, chForwardSlash,
  +		chLatin_v, chLatin_a, chLatin_l,
  +		chLatin_i, chLatin_d, chLatin_a, chLatin_t,
  +		chLatin_i, chLatin_o, chLatin_n, chForwardSlash,
  +		chLatin_s, chLatin_c, chLatin_h, chLatin_e, chLatin_m, chLatin_a,
  +      chDash, chLatin_f, chLatin_u, chLatin_l, chLatin_l,
  +      chDash, chLatin_c, chLatin_h, chLatin_e, chLatin_c, chLatin_k,
  +      chLatin_i, chLatin_n, chLatin_g, chNull
  +};
  +
   //deprecated
   //Xerces: http://apache.org/xml/features/validation/reuse-validator
   const XMLCh SAX2XMLReaderImpl::SAX_XERCES_REUSEVALIDATOR[] = {
  @@ -1245,6 +1267,11 @@
   		setDoSchema(value);
   	}
   
  +	else if (XMLString::compareIString(name, SAX2XMLReaderImpl::SAX_XERCES_SCHEMA_FULL_CHECKING) == 0)
  +	{
  +		fScanner->setValidationSchemaFullChecking(value);
  +	}
  +
      else
          throw SAXNotRecognizedException("Unknown Feature");
   }
  @@ -1265,6 +1292,8 @@
           return fReuseGrammar;
   	else if (XMLString::compareIString(name, SAX2XMLReaderImpl::SAX_XERCES_SCHEMA) == 0)
           return getDoSchema();
  +	else if (XMLString::compareIString(name, SAX2XMLReaderImpl::SAX_XERCES_SCHEMA_FULL_CHECKING) == 0)
  +        return fScanner->getValidationSchemaFullChecking();
      else
          throw SAXNotRecognizedException("Unknown Feature");
   	return false;
  
  
  
  1.13      +5 -0      xml-xerces/c/src/parsers/SAX2XMLReaderImpl.hpp
  
  Index: SAX2XMLReaderImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/SAX2XMLReaderImpl.hpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SAX2XMLReaderImpl.hpp	2001/06/27 17:39:52	1.12
  +++ SAX2XMLReaderImpl.hpp	2001/08/01 19:11:02	1.13
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAX2XMLReaderImpl.hpp,v $
  + * Revision 1.13  2001/08/01 19:11:02  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.12  2001/06/27 17:39:52  knoaman
    * Fix for bug #2353.
    *
  @@ -156,6 +159,7 @@
   	static const XMLCh SAX_XERCES_REUSEVALIDATOR[];
   	static const XMLCh SAX_XERCES_REUSEGRAMMAR[];
   	static const XMLCh SAX_XERCES_SCHEMA[];
  +	static const XMLCh SAX_XERCES_SCHEMA_FULL_CHECKING[];
   	
   	SAX2XMLReaderImpl() ;
   	~SAX2XMLReaderImpl() ;
  @@ -631,6 +635,7 @@
       * <br>http://apache.org/xml/features/validation/dynamic (default: false)
       * <br>http://apache.org/xml/features/validation/reuse-grammar (default: false)
       * <br>http://apache.org/xml/features/validation/schema (default: true)
  +    * <br>http://apache.org/xml/features/validation/schema-full-checking (default: false)
       *
       * @param name The unique identifier (URI) of the feature.
       * @param value The requested state of the feature (true or false).
  
  
  
  1.21      +13 -0     xml-xerces/c/src/parsers/SAXParser.cpp
  
  Index: SAXParser.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/SAXParser.cpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- SAXParser.cpp	2001/06/03 19:26:20	1.20
  +++ SAXParser.cpp	2001/08/01 19:11:02	1.21
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAXParser.cpp,v $
  + * Revision 1.21  2001/08/01 19:11:02  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.20  2001/06/03 19:26:20  jberry
    * Add support for querying error count following parse; enables simple parse without requiring error handler.
    *
  @@ -319,6 +322,11 @@
       return fScanner->getDoSchema();
   }
   
  +bool SAXParser::getValidationSchemaFullChecking() const
  +{
  +    return fScanner->getValidationSchemaFullChecking();
  +}
  +
   int SAXParser::getErrorCount() const
   {
       return fScanner->getErrorCount();
  @@ -359,6 +367,11 @@
   void SAXParser::setDoSchema(const bool newState)
   {
       fScanner->setDoSchema(newState);
  +}
  +
  +void SAXParser::setValidationSchemaFullChecking(const bool schemaFullChecking)
  +{
  +    fScanner->setValidationSchemaFullChecking(schemaFullChecking);
   }
   
   
  
  
  
  1.20      +32 -0     xml-xerces/c/src/parsers/SAXParser.hpp
  
  Index: SAXParser.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/parsers/SAXParser.hpp,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- SAXParser.hpp	2001/07/27 20:24:21	1.19
  +++ SAXParser.hpp	2001/08/01 19:11:02	1.20
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAXParser.hpp,v $
  + * Revision 1.20  2001/08/01 19:11:02  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.19  2001/07/27 20:24:21  tng
    * put getScanner() back as they were there before, not to break existing apps.
    *
  @@ -283,6 +286,18 @@
         */
       bool getDoSchema() const;
   
  +    /** Get the 'full schema constraint checking' flag
  +      *
  +      * This method returns the state of the parser's full schema constraint
  +      * checking flag.
  +      *
  +      * @return true, if the parser is currently configured to
  +      *         have full schema constraint checking, false otherwise.
  +      *
  +      * @see #setValidationSchemaFullChecking
  +      */
  +    bool getValidationSchemaFullChecking() const;
  +
       /** Get error count from the last parse operation.
         *
         * This method returns the error count from the last parse
  @@ -389,6 +404,23 @@
         */
       void setDoSchema(const bool newState);
   
  +    /**
  +      * This method allows the user to turn full Schema constraint checking on/off.
  +      * Only takes effect if Schema validation is enabled.
  +      * If turned off, partial constraint checking is done.
  +      *
  +      * Full schema constraint checking includes those checking that may
  +      * be time-consuming or memory intensive. Currently, particle unique
  +      * attribution constraint checking and particle derivation resriction checking
  +      * are controlled by this option.
  +      *
  +      * The parser's default state is: false.
  +      *
  +      * @param schemaFullChecking True to turn on full schema constraint checking.
  +      *
  +      * @see #getValidationSchemaFullChecking
  +      */
  +    void setValidationSchemaFullChecking(const bool schemaFullChecking);
   
       /**
         * This method allows users to set the parser's behaviour when it
  
  
  
  1.11      +4 -0      xml-xerces/c/src/sax2/SAX2XMLReader.hpp
  
  Index: SAX2XMLReader.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/sax2/SAX2XMLReader.hpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SAX2XMLReader.hpp	2001/06/27 17:40:16	1.10
  +++ SAX2XMLReader.hpp	2001/08/01 19:11:02	1.11
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAX2XMLReader.hpp,v $
  + * Revision 1.11  2001/08/01 19:11:02  tng
  + * Add full schema constraint checking flag to the samples and the parser.
  + *
    * Revision 1.10  2001/06/27 17:40:16  knoaman
    * Fix for bug #2353.
    *
  @@ -451,6 +454,7 @@
       * <br>http://apache.org/xml/features/validation/dynamic (default: false)
       * <br>http://apache.org/xml/features/validation/reuse-validator (default: false)
       * <br>http://apache.org/xml/features/validation/schema (default: true)
  +    * <br>http://apache.org/xml/features/validation/schema-full-checking (default: false)
       *
       * @param name The unique identifier (URI) of the feature.
       * @param value The requested state of the feature (true or false).
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org