You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2001/12/20 05:20:01 UTC

cvs commit: xml-xalan/c/src/XSLT FunctionSystemProperty.cpp

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: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org