Revision 6526
Added by ben leinfelder about 13 years ago
src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java | ||
---|---|---|
466 | 466 |
// if no prefix was found, we grab the first namespace. |
467 | 467 |
String regex2; |
468 | 468 |
if (prefix != null) { |
469 |
regex2 = "xmlns:" + prefix + "=\"(.*)\"";
|
|
469 |
regex2 = "xmlns:" + prefix + "=['\"](.*)['\"]";
|
|
470 | 470 |
} else { |
471 |
regex2 = "xmlns:.*=\"(.*)\"";
|
|
471 |
regex2 = "xmlns:.*=['\"](.*)['\"]";
|
|
472 | 472 |
} |
473 | 473 |
Pattern pattern2 = Pattern.compile(regex2, Pattern.CASE_INSENSITIVE); |
474 | 474 |
Matcher matcher2 = pattern2.matcher(targetLine); |
Also available in: Unified diff
allow the XML namespace to be given in both double and single quotes. The regex pattern was only looking for xmlns values that were in double quotes. This was brought to light by LTER:
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=5497