* @param fobj The FO for which this value is needed.
* @return The value of this property.
*/
public String[] getValue(final FoContext context, final FObj fobj) {
if (value().canEvalKeyword()) {
final FoValue keyword = this.convertValueToFoValue(value());
switch (keyword) {
case INHERIT: {
return getValueNoInstance(context, fobj);
}
case MALE:
case FEMALE:
case CHILD: {
final String[] returnArray
= {keyword.toXslFo()};
return returnArray;
}
}
}
if (value() instanceof ValueCollection) {
final ValueCollection collection = (ValueCollection) value();
final String[] returnArray = new String[collection.getCount()];
for (int i = 0; i < returnArray.length; i++) {
final PropertyValue innerValue = collection.getItem(i);
if (innerValue.canEvalKeyword()) {
final FoValue foValue = this.convertValueToFoValue(
innerValue);
returnArray[i] = foValue.toXslFo();
} else if (innerValue instanceof DtName) {
final DtName name = (DtName) innerValue;
returnArray[i] = name.getValue();
} else {
throw this.unexpectedRetrieval();