public static void main( String[] args)

	{

		if(args == null || args.length == 0)

		{

			System.err.println(

			"usage: java MappedPlaceholderResource <resourcefile basename> [[key] [value]] ...");

			System.exit(1);

		}

		try

		{

			MappedPlaceholderResource mpr = new MappedPlaceholderResource(args[0]);

			Hashtable h = new Hashtable();

			for(int i = 1; i < args.length - 1; i += 2)

			{

				h.put(args[i], args[i + 1]);

			}

			if(mpr.isSectionSeparatorsLoaded())

				System.out.println("section separators loaded correctly: " + 

									mpr.isSectionSeparatorsLoadedOk());

			if(mpr.isSectionWordReplaceLoaded())

				System.out.println("section wordreplace loaded correctly: " + 

									mpr.isSectionWordReplaceLoadedOk());

			if(mpr.isSectionValuesLoaded())

				System.out.println("section values loaded correctly: " + 

									mpr.isSectionValuesLoadedOk());

			if(mpr.isSectionLinesLoaded())

				System.out.println("section lines loaded correctly: " + 

									mpr.isSectionLinesLoadedOk());

			System.out.println("load errors:\n" + mpr.getLoadErrors());

			System.out.println(mpr.mapPlaceholders(mpr.getTemplateBody(), h));

		}

		catch(java.util.MissingResourceException mre)

		{

			System.err.println("Missing Resource Exception: " + mre.getMessage());

		}

		catch(Exception e)

		{

			System.err.println("Exception: " + e.getMessage());

			e.printStackTrace();

		}

	}