if (value.canEvalLength()) {
return this.convertValueToLength(value, fobj, context);
}
if (value.canEvalKeyword()) {
final FoPropertyKeyword keyword = (FoPropertyKeyword) value;
final FoValue keywordValue = keyword.getValue();
switch (keywordValue) {
case THIN: {
return DtBorderWidth.BORDER_WIDTH_THIN;
}
case THICK: {
return DtBorderWidth.BORDER_WIDTH_THICK;
}
case MEDIUM: {
return DtBorderWidth.BORDER_WIDTH_MEDIUM;
}
default: {
throw new IllegalStateException("Invalid keyword for "
+ "border-width data type: " + keywordValue.toXslFo());
}
}
}
throw this.unexpectedRetrieval();
}