CellEntry entry = (CellEntry) getEntry();
int row = entry.getRow();
int col = entry.getCol();
String value = entry.getValue();
String inputValue = entry.getInputValue();
if (row < 0 || col < 0) {
throw new ParseException("Negative row or column value");
}
// cells require row & col attrs, and allow inputValue and
// numericValue
serializer.startTag(NAMESPACE_GS_URI, "cell");
serializer.attribute(null /* ns */, "row", "" + row);
serializer.attribute(null /* ns */, "col", "" + col);
if (inputValue != null) {
serializer.attribute(null /* ns */, "inputValue", inputValue);
}
if (entry.hasNumericValue()) {
serializer.attribute(null /* ns */, "numericValue", entry
.getNumericValue());
}
// set the child text...
value = StringUtils.isEmpty(value) ? "" : value;
serializer.text(value);
serializer.endTag(NAMESPACE_GS_URI, "cell");