Bug #2812686 Attribute values from DTD are separated at underscore

This commit is contained in:
Zane U. Ji 2012-08-03 22:41:01 +08:00
parent 33b2e3c57c
commit 4527ffba1b
1 changed files with 13 additions and 5 deletions

View File

@ -250,15 +250,23 @@ void XMLCALL XmlPromptGenerator::attlistdeclhandler (
std::set<std::string> attributeValues; std::set<std::string> attributeValues;
if ( *att_type == '(' ) // change to exclude _known_ identifiers? if ( *att_type == '(' ) // change to exclude _known_ identifiers?
{ {
size_t len;
char *s, *word; char *s, *word;
s = ( char * ) att_type; s = ( char * ) att_type;
while ( ( word = GetWord::run ( &s, &len ) ) != NULL ) do {
{ s++;
std::string currentValue ( word, len ); while ( wxIsspace( *s ) )
s++;
word = s;
while ( *s != '|' && *s != ')' && !wxIsspace( *s ) )
s++;
std::string currentValue ( word, s - word );
attributeValues.insert ( currentValue ); attributeValues.insert ( currentValue );
}
while ( *s != '|' && *s != ')')
s++;
} while ( *s != ')' && *s );
} }
if ( attributeValues.empty() ) if ( attributeValues.empty() )