From 4527ffba1bbd22de7311659adc0611c3876cf2ff Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Fri, 3 Aug 2012 22:41:01 +0800 Subject: [PATCH] Bug #2812686 Attribute values from DTD are separated at underscore --- src/xmlpromptgenerator.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/xmlpromptgenerator.cpp b/src/xmlpromptgenerator.cpp index 06049be..694fea4 100755 --- a/src/xmlpromptgenerator.cpp +++ b/src/xmlpromptgenerator.cpp @@ -250,15 +250,23 @@ void XMLCALL XmlPromptGenerator::attlistdeclhandler ( std::set attributeValues; if ( *att_type == '(' ) // change to exclude _known_ identifiers? { - size_t len; char *s, *word; s = ( char * ) att_type; - while ( ( word = GetWord::run ( &s, &len ) ) != NULL ) - { - std::string currentValue ( word, len ); + do { + s++; + while ( wxIsspace( *s ) ) + s++; + word = s; + while ( *s != '|' && *s != ')' && !wxIsspace( *s ) ) + s++; + + std::string currentValue ( word, s - word ); attributeValues.insert ( currentValue ); - } + + while ( *s != '|' && *s != ')') + s++; + } while ( *s != ')' && *s ); } if ( attributeValues.empty() )