/* There should be one or more border-style instances. If there is only
* one, it will not be returned above as a valid property value, because
* we only test for "inherit" there. Therefore we need to tokenize
* and parse each item, even if there is only one token. */
final ValueCollection collection = new ValueCollection();
final StringTokenizer st = new StringTokenizer(value);
if (st.countTokens() < 1
|| st.countTokens() > PdBorderStyle.MAX_TOKENS) {
throw this.unexpectedValue(value, fobj);
}
while (st.hasMoreTokens()) {
final String token = st.nextToken();
final PropertyValue parsedToken = this.standardParse(fobj, token,
DtBorderStyle.VALID_KEYWORDS);
final FoValue foValue = this.convertValueToFoValue(parsedToken);
if (DtBorderStyle.isBorderStyle(foValue)) {
final DtBorderStyle borderStyle = DtBorderStyle.getInstance(
foValue);
collection.addItem(borderStyle);
} else {
throw this.unexpectedValue(token, fobj);
}
}
return collection;