Skip to content

Commit c7e7e70

Browse files
committed
Fixed support of integer enumeration attributes. JIRA: CXX-13988
git-svn-id: https://anonsvn.ncbi.nlm.nih.gov/repos/v1/trunk/c++@104310 78c7ea69-d796-4a43-9a09-de51944f1b03
1 parent 83d1697 commit c7e7e70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/serial/datatool/xsdparser.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1288,12 +1288,14 @@ void XSDParser::ParseEnumeration(DTDAttribute& att)
12881288
att.SetType(DTDAttribute::eEnum);
12891289
}
12901290
int id = 0;
1291+
bool hasint = false;
12911292
if (GetAttribute("intvalue")) {
12921293
id = NStr::StringToInt(m_Value);
12931294
att.SetType(DTDAttribute::eIntEnum);
1295+
hasint = true;
12941296
}
12951297
if (GetAttribute("value")) {
1296-
if (att.GetType() == DTDAttribute::eIntEnum) {
1298+
if (!hasint && att.GetType() == DTDAttribute::eIntEnum) {
12971299
id = NStr::StringToInt(m_Value);
12981300
}
12991301
string v(m_ValuePrefix);

0 commit comments

Comments
 (0)