<?xml version="1.0" encoding="UTF-8"?>
<folder_map>
	<rule>
		<attr_list>
			<attr>
				<name>authors</name>
				<value/>
			</attr>
		</attr_list>
		<path_list>
			<path>/samplesite.com/content</path>
		</path_list>
	</rule>
	<!-- We do not have a check in for subject.  This assumes the subject field is required -->
	<rule>
		<attr_list>
			<attr>
				<name>r_object_type</name>
				<value>dm_document</value>
			</attr>
		</attr_list>
		<path_list>
			<path>/samplesite.com/$(subject)/$(authors[])</path>
		</path_list>
	</rule>	
	
	<!-- Catch all -->
	<rule>
		<path_list>
			<path>/samplesite.com/content</path>
		</path_list>
	</rule>	
</folder_map>
<!--************* Examples *************

Example 1:
Suppose you want all files with the value 'Press Release'
in the attribute a_category to be placed in the folder
'press_releases' in the cabinet 'Website'.

	<rule>
		<attr_list>
			<attr>
				<name>a_category</name>
				<value>Press Releases</value>
			</attr>
		</attr_list>
		<path_list>
			<path>/Website/press_releases</path>
		</path_list>
	</rule>
	
	
Example 2:
Suppose you want all files with the value 'Press Release'
in the attribute a_category to be placed in two locations:
Website/press_releases and Extranet/marketing/pressroom.

	<rule>
		<attr_list>
			<attr>
				<name>a_category</name>
				<value>Press Releases</value>
			</attr>
		</attr_list>
		<path_list>
			<path>/Website/press_releases</path>
			<path>/Extranet/marketing/pressroom</path>
		</path_list>
	</rule>	
	
	
Example 3:
Suppose you want all files of the custom object type 
'marketing_doc' that also have the value 'Press Release'
in the attribute a_category to be placed in two locations:
Website/press_releases and Extranet/marketing/pressroom.

	<rule>
		<attr_list>
			<attr>
				<name>a_category</name>
				<value>Press Releases</value>
			</attr>
			<attr>
				<name>r_object_type</name>
				<value>marketing_doc</value>
			</attr>
		</attr_list>
		<path_list>
			<path>/Website/press_releases</path>
			<path>/Extranet/marketing/pressroom</path>
		</path_list>
	</rule>		
	
	
Example 4:
Suppose you want all files of the custom object type 
'press_doc' to be placed in the location
/Website/press_releases, but in a folder that corresponds 
to the year (which is stored in a custom attribute called
custom_attr_year). So for instance, 1999 releases would be
placed in /Website/press_releases/1999, while the 2000
releases would be placed in /Website/press_releases/2000.

	<rule>
		<attr_list>
			<attr>
				<name>r_object_type</name>
				<value>press_doc</value>
			</attr>
		</attr_list>
		<path_list>
			<path>/Website/press_releases/$(custom_attr_year)</path>
		</path_list>
	</rule>	
	
	
Example 5:
Suppose you want all 'press_doc' files to be placed in a 
folder in the 'Website' cabinet, where the folder name is 
the name of the value that is contained in the repeating
attribute keywords. So for instance, if a file had
"xml" as a keyword, it would be placed in the location
/Website/xml. If a file had "technology,medicine" in the
keywords, it would be placed in both /Website/technology
and /Website/medicine.

	<rule>
		<attr_list>
			<attr>
				<name>r_object_type</name>
				<value>press_doc</value>
			</attr>
		</attr_list>
		<path_list>
			<path>/Website/$(keywords[])</path>
		</path_list>
	</rule>	
	

Example 6:
Suppose you want all files where at least one of the 
authors (which is a repeating attribute) is 'Jane Doe'
to be placed in a folder in the 'Website' cabinet, 
where the folder name is the name of the first value 
that is contained in the repeating attribute keywords. 
So for instance, if a file had "xml" as a keyword, 
it would be placed in the location /Website/xml. 
If a file had "technology,medicine" in the
keywords, it would be placed in /Website/technology.

	<rule>
		<attr_list>
			<attr>
				<name>authors[]</name>
				<value>Jane Doe</value>
			</attr>
		</attr_list>
		<path_list>
			<path>/Website/$(keywords[1])</path>
		</path_list>
	</rule>	


Example 7:
Suppose you want to put all files to be placed in a folder
in the 'website' cabinet called 'bad_folder_map'. This is
good as a "catch-all" rule.

	<rule>
		<path_list>
			<path>/website/bad_folder_map</path>
		<path_list>
	</rule>

	
************* End of Examples ***********-->
<!--************* Tips *************	


1. WebPublisher processes this file from the top down. As soon
as it hits a rule that matches for that file, it will stop.
So put your more specific rules at the beginning, and more general
rules at the end.

2. WebPublisher will create any folder specified in the rule block
that does not exist yet, but it will not create a delivery cabinet.
Be sure to only put existing delivery cabinets in the <path>
element.

3. Suppose an author is using the "Create Page" functionality. 
When the new object is created, it inherits properties from the
selected template. If that new object, with its inherited
properties, does not match any of the rules specified in this
foldermap file, then WebPublisher won't know where in the
delivery cabinets to put this new object. Therefore, the create
operation will fail.

	
************* End of Tips *************-->
