I don’t understand why you want use the url-path, also I think its not a good idea, because the url-path can change (example:friendly-urls and so on). I’m sure there are other document-fields or fields from parent-folders you can use for this. In my example I use the pagetitle, because I don’t know your site-structure. For example you want three or more different classes you can create a snippet like this:
<?php
$values=explode(',',$values);
$classes=explode(',',$classes);
$class=$defaultclass;
foreach ($values as $key=>$value){
if ($value==$fieldvalue){
$class=$classes[$key];
}
}
return $class;
?>
then in your template you can use something like that:
<body class="[!getclass?&fieldvalue=`[*pagetitle*]`&values=`about,another,onemore`&classes=`WIDE,SMALL,BIG`&defaultclass=`DEFAULT`!]">
And as ganesh says the easiest way would be to create TVs for this and use the TV-value for the class-name. See ganeshs post!