Fixed attrib switched with <item> bug. xlif data w/ more than one fix ongoing.

This commit is contained in:
Connor Tumbleson 2012-05-03 22:26:42 -05:00
parent df7e469ff4
commit d82ace7cfe

View File

@ -58,6 +58,15 @@ public abstract class ResScalarValue extends ResValue
throws IOException, AndrolibException {
String type = res.getResSpec().getType().getName();
boolean item = ! "reference".equals(mType) && ! type.equals(mType);
String body = encodeAsResXmlValue();
/* check for resource reference */
if (body.contains("@")){
item = true;
}
/* check for using attrib as node or item */
String tagName = item ? "item" : type;
serializer.startTag(null, tagName);
@ -68,7 +77,6 @@ public abstract class ResScalarValue extends ResValue
serializeExtraXmlAttrs(serializer, res);
String body = encodeAsResXmlValue();
if (! body.isEmpty()) {
serializer.ignorableWhitespace(body);
}