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 2002/05/28 22:20:26 UTC

cvs commit: xml-xerces/c/samples/SAX2Print SAX2Print.cpp

tng         02/05/28 13:20:26

  Modified:    c/samples/SAX2Print SAX2Print.cpp
  Log:
  Add option '-n' to SAX2Print.
  
  Revision  Changes    Path
  1.11      +13 -1     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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SAX2Print.cpp	17 Apr 2002 20:18:08 -0000	1.10
  +++ SAX2Print.cpp	28 May 2002 20:20:26 -0000	1.11
  @@ -56,6 +56,9 @@
   
   /*
    * $Log: SAX2Print.cpp,v $
  + * Revision 1.11  2002/05/28 20:20:26  tng
  + * Add option '-n' to SAX2Print.
  + *
    * Revision 1.10  2002/04/17 20:18:08  tng
    * [Bug 7493] The word "occured" is misspelled and it is a global error.
    *
  @@ -124,6 +127,7 @@
   static char*                    xmlFile         = 0;
   static SAX2XMLReader::ValSchemes valScheme      = SAX2XMLReader::Val_Auto;
   static bool					        expandNamespaces= false ;
  +static bool                     doNamespaces    = true;
   static bool                     doSchema        = true;
   static bool                     schemaFullChecking = false;
   static bool                     namespacePrefixes = false;
  @@ -142,10 +146,12 @@
               "Options:\n"
                "    -u=xxx      Handle unrepresentable chars [fail | rep | ref*].\n"
                "    -v=xxx      Validation scheme [always | never | auto*].\n"
  -             "    -e          Expand Namespace Alias with URI's.\n"
  +             "    -e          Expand Namespace Alias with URI's. Defaults to off.\n"
                "    -x=XXX      Use a particular encoding for output (LATIN1*).\n"
                "    -f          Enable full schema constraint checking processing. Defaults to off.\n"
                "    -p          Enable namespace-prefixes feature. Defaults to off.\n"
  +             "    -n          Disable namespace processing. Defaults to on.\n"
  +             "                NOTE: THIS IS OPPOSITE FROM OTHER SAMPLES.\n"
                "    -s          Disable schema processing. Defaults to on.\n"
                "                NOTE: THIS IS OPPOSITE FROM OTHER SAMPLES.\n"
                "    -?          Show this help.\n\n"
  @@ -245,6 +251,11 @@
                   return 2;
               }
           }
  +         else if (!strcmp(argV[parmInd], "-n")
  +              ||  !strcmp(argV[parmInd], "-N"))
  +        {
  +            doNamespaces = false;
  +        }
            else if (!strcmp(argV[parmInd], "-s")
                 ||  !strcmp(argV[parmInd], "-S"))
           {
  @@ -306,6 +317,7 @@
           parser->setFeature(XMLUni::fgSAX2XercesDynamic, false);
       }
   
  +    parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, doNamespaces);
       parser->setFeature(XMLUni::fgSAX2XercesSchema, doSchema);
       parser->setFeature(XMLUni::fgSAX2XercesSchemaFullChecking, schemaFullChecking);
       parser->setFeature(XMLUni::fgSAX2CoreNameSpacePrefixes, namespacePrefixes);
  
  
  

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