File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
main/java/com/nwalsh/sinclude
test/java/com/nwalsh/sinclude Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
basename =sinclude
2
2
sincludeTitle =Saxon XInclude
3
- sincludeVersion =5.2.0
3
+ sincludeVersion =5.2.1
4
4
5
5
saxonVersion =11.5
Original file line number Diff line number Diff line change @@ -467,9 +467,9 @@ public XdmNode process(XdmNode node) throws XPathException {
467
467
while (last > first && lines [pos ].charAt (last ) == ' ' ) {
468
468
last --;
469
469
}
470
- if ( first != last ) {
471
- ReceiverUtils . handleCharacters ( receiver , lines [ pos ]. substring ( first , last + 1 ));
472
- }
470
+ // There must be at least one non-space character on the line, so
471
+ // this is always going to be a legal substring
472
+ ReceiverUtils . handleCharacters ( receiver , lines [ pos ]. substring ( first , last + 1 ));
473
473
}
474
474
}
475
475
// Only output newlines between lines, not after the last line
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ public class FakeDocumentResolver implements DocumentResolver {
172
172
" </section>\n " +
173
173
"</doc>\n " );
174
174
xmlMap .put ("trimtext.xml" , "<doc xmlns:xi='http://www.w3.org/2001/XInclude'>\n " +
175
- "<xi:include href='four.txt' parse='text' fragid='L2-L4 '/>\n " +
175
+ "<xi:include href='four.txt' parse='text' fragid='L2-L6 '/>\n " +
176
176
"</doc>\n " );
177
177
}
178
178
@@ -182,7 +182,7 @@ public class FakeDocumentResolver implements DocumentResolver {
182
182
textMap .put ("one.txt" , "This is line one.\n " );
183
183
textMap .put ("two.txt" , "\n \n \n \n \n \n \n \n \n This is line 10.\n \n \n \n \n This is line 15." );
184
184
textMap .put ("three.xml" , "<doc>Document three.</doc>" );
185
- textMap .put ("four.txt" , " Four leading blanks\n Three leading blanks\n Six leading blanks\n No leading blanks" );
185
+ textMap .put ("four.txt" , " Four leading blanks\n { \n Three leading blanks\n } \n Four leading blanks\n No leading blanks" );
186
186
}
187
187
188
188
private static Map <String , String > expandedMap = null ;
@@ -318,7 +318,7 @@ public class FakeDocumentResolver implements DocumentResolver {
318
318
"</doc>\n " );
319
319
expandedMap .put ("selfrefloop.xml" , "<doc/>" );
320
320
expandedMap .put ("trimtext.xml" , "<doc xmlns:xi='http://www.w3.org/2001/XInclude'>\n " +
321
- "Three leading blanks\n Six leading blanks\n No leading blanks\n \n " +
321
+ "{ \n Three leading blanks\n } \n Four leading blanks\n No leading blanks\n \n " +
322
322
"</doc>\n " );
323
323
324
324
}
You can’t perform that action at this time.
0 commit comments