Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ private boolean hasOpeningTag(String content) {
private String consumeCommentTokens(String line) {
int indexOfStartComment = line.indexOf(START_COMMENT);
if (indexOfStartComment == -1 && !line.contains(END_COMMENT)) {
return line;
// If we are inside a multi-line comment, the entire line is comment
// data and must not be treated as content.
return (this.inComment ? "" : line);
}

String result = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ void dtdDetection(String fileName) throws Exception {
"xsdWithNoComments.xml",
"xsdWithMultipleComments.xml",
"xsdWithDoctypeInComment.xml",
"xsdWithDoctypeInOpenCommentWithAdditionalCommentOnSameLine.xml"
"xsdWithDoctypeInOpenCommentWithAdditionalCommentOnSameLine.xml",
"xsdWithDoctypeInMultiLineCommentBody.xml"
})
void xsdDetection(String fileName) throws Exception {
assertValidationMode(fileName, VALIDATION_XSD);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
See the DOCTYPE notes for legacy configs
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans.xsd">

</beans>