use fragment.toString() instead of (slower) fragment.getValue() with attributes where possible