950
950
switch (next.kind)
954
// read "quoted" attribute.
956
readTillTokenE(QUOT);
957
attrValue = buffer.toString();
962
// read 'quoted' attribute.
965
attrValue = buffer.toString();
968
// read unquoted attribute.
973
// Check maybe the opening quote is missing.
974
next = getTokenAhead();
975
if (bQUOTING.get(next.kind))
978
error("The value without opening quote is closed with '" +
979
next.getImage() + "'"
982
attrValue = value.getImage();
986
break attributeReading;
954
// read "quoted" attribute.
956
readTillTokenE(QUOT);
957
attrValue = buffer.toString();
962
// read 'quoted' attribute.
965
attrValue = buffer.toString();
968
// read unquoted attribute.
973
// Check maybe the opening quote is missing.
974
next = getTokenAhead();
975
if (bQUOTING.get(next.kind))
978
error("The value without opening quote is closed with '"
979
+ next.getImage() + "'");
980
attrValue = value.getImage();
982
else if (next.kind == SLASH)
983
// The slash in this context is treated as the ordinary
984
// character, not as a token. The slash may be part of
987
StringBuffer image = new StringBuffer(value.getImage());
988
while (next.kind == NUMTOKEN || next.kind == SLASH)
990
image.append(getNextToken().getImage());
991
next = getTokenAhead();
993
attrValue = image.toString();
996
attrValue = value.getImage();
1003
// Check maybe the opening quote is missing.
1004
next = getTokenAhead();
1005
if (bQUOTING.get(next.kind))
1008
error("The value without opening quote is closed with '"
1009
+ next.getImage() + "'");
1010
attrValue = value.getImage();
1012
else if (next.kind == NUMTOKEN || next.kind == SLASH)
1013
// The slash in this context is treated as the ordinary
1014
// character, not as a token. The slash may be part of
1015
// the unquoted URL.
1017
StringBuffer image = new StringBuffer(value.getImage());
1018
while (next.kind == NUMTOKEN || next.kind == SLASH)
1020
image.append(getNextToken().getImage());
1021
next = getTokenAhead();
1023
attrValue = image.toString();
1026
attrValue = value.getImage();
1029
break attributeReading;
988
1031
attributes.addAttribute(name.getImage(), attrValue);
991
else // The '=' is missing: attribute without value.
1035
// The '=' is missing: attribute without value.
993
1037
noValueAttribute(element, name.getImage());
999
* Return string, corresponding the given named entity.
1000
* The name is passed with the preceeding &, but without
1001
* the ending semicolon.
1043
* Return string, corresponding the given named entity. The name is passed
1044
* with the preceeding &, but without the ending semicolon.
1003
1046
protected String resolveNamedEntity(final String a_tag)