/**
	 * Read recursively path & sub-paths of xsl file
	 *
	 * @access private
	 * @param string $path the root path
	 * @param bool $searchTemplateName true if you want to recover templates names
	 * @param array &$arrayTemplateName reference array, it will contains templates names
	 * @param array &$arrayPath reference array, it will contains paths
	 * @param array &$arrayFilename reference array, it will contains filenames
	 * @since 1.0
	 */
	private function recursiveRead($path, $searchTemplateName=false, &$arrayTemplateName, &$arrayPath, &$arrayFilename)
	{ 
		if (substr($path, strlen($path)-1, 1) != "/")
			$path .= "/";
		if (@is_dir($path))
		{
			$handle = opendir($path);			
			while (false !== ($object = readdir($handle))) 
			{
				if (is_dir($path.$object) && substr($object, 0, 1) != ".") 
					$this->recursiveRead($path.$object, $searchTemplateName, $arrayTemplateName, $arrayPath, $arrayFilename);				
				if (substr($object, 0, 1) != "." && is_file($path.$object) && SLS_String::getFileExtension($object) == "xsl") 
				{
					if ($searchTemplateName)
					{
						$xslHandle = file_get_contents($path.$object);
						$boundContent = SLS_String::trimString(array_shift(SLS_String::getBoundContent($xslHandle, "<xsl:template", ">")));
						if (($stringName = stristr($boundContent, "name=")) === false)
						{
							array_push($arrayTemplateName, "");
						}
						else
						{
							$templateName = explode($stringName{5}, $stringName);
							array_push($arrayTemplateName, $templateName[1]);
						}
					}
					array_push($arrayPath, $path.$object);
					array_push($arrayFilename, $object);
				}		
			}
			closedir($handle);
		}
	}