summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sources/scala/xml/dtd/ValidationException.scala11
1 files changed, 8 insertions, 3 deletions
diff --git a/sources/scala/xml/dtd/ValidationException.scala b/sources/scala/xml/dtd/ValidationException.scala
index 065fd401a3..337259ffb1 100644
--- a/sources/scala/xml/dtd/ValidationException.scala
+++ b/sources/scala/xml/dtd/ValidationException.scala
@@ -16,9 +16,14 @@ object MakeValidationException {
new ValidationException("attribute " + key +" not allowed here" );
def fromMissingAttribute( allKeys:scala.collection.Set[String] ) = {
- new ValidationException("missing value for REQUIRED attribute"+
- { if( allKeys.size > 1 ) "s" else "" }+
- allKeys );
+ val sb = new StringBuffer();
+ sb.append("missing value for REQUIRED attribute");
+ if( allKeys.size > 1 ) sb.append('s');
+ val it = allKeys.elements;
+ while (it.hasNext) {
+ sb.append('\'').append(it.next).append('\'')
+ }
+ new ValidationException(sb.toString());
}
def fromMissingAttribute( key: String, tpe: String ) = {