Hi Mark,
Yes you can go with transformation to parse value and write your own logic. Transformation support's runat server scripts in which you can define a function or method to perform any operation on the page, it act's similar as code-behind of your transformation.
In transformation how to call function
<a href="<%# GetSharePointFileUrl("FileRef") %>">
<%# Eval("FileLeafRef") %>
{<%# GetSelectedValueAndParseString(Eval("Document_x0020_Type").ToString()) %>}
</a>
How to define your method to parse and get selected value
<script runat="server">
protected void GetSelectedValueAndParseString(object DocumentValue)
{
var Output;
//Write your logic to parse DocumentValue which holds Document_x0020_Type and get selected value.
return Output
}
</script>
It look like this
Thanks
Happy to help you