dbertoni    01/12/19 20:20:01

  Modified:    c/src/XSLT FunctionSystemProperty.cpp
  Log:
  Don't die if a property isn't supported or is not found.
  
  Revision  Changes    Path
  1.21      +15 -4     xml-xalan/c/src/XSLT/FunctionSystemProperty.cpp
  
  Index: FunctionSystemProperty.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionSystemProperty.cpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- FunctionSystemProperty.cpp        2001/09/26 21:30:23     1.20
  +++ FunctionSystemProperty.cpp        2001/12/20 04:20:01     1.21
  @@ -139,17 +139,28 @@
                        else
                        {
                                executionContext.warn(
  -                                     "Don't currently do anything with 
namespace " + *nspace + " in property: " + fullName,
  +                                     "Only the XSLT namespace is supported 
in the function system-property()",
                                        context,
                                        locator);
  -
  -                             result = 
TranscodeFromLocalCodePage(::getenv(c_str(TranscodeToLocalCodePage(propName))));
                        }
                }
        }
        else
        {
  -             result = 
TranscodeFromLocalCodePage(::getenv(c_str(TranscodeToLocalCodePage(fullName))));
  +             const char* const       theEnvString =
  +                     getenv(c_str(TranscodeToLocalCodePage(fullName)));
  +
  +             if (theEnvString == 0)
  +             {
  +                             executionContext.warn(
  +                                     "Unknown environment proprerty 
requested",
  +                                     context,
  +                                     locator);
  +             }
  +             else
  +             {
  +                     result = TranscodeFromLocalCodePage(theEnvString);
  +             }
        }
   
        if (fNumberResult == true)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to