On 29/05/17 13:00, Konstantin Kolinko wrote: > 2017-05-29 11:43 GMT+03:00 Mark Thomas <ma...@apache.org>: >> On 26/05/17 21:33, Christopher Schultz wrote:
<snip/> >>> Would it be reasonable to change trimSpaces so that spaces within >>> element attributes would be normalized to a single space, and others >>> would be removed? I'm not sure how aware the parser is of the >>> surrounding document structure. >> >> The parser is completely unaware. As far as it is concerned, it is just >> template text. Parsing the template text it is likely impossible since >> correct parsing depends on evaluating the entire page. > > Aren't EL expressions a part of that template text? No. You want to work from the EBNF Grammar (section JSP.1.3.10.1) rather than the text descriptions. It is much more precise. <snip/> > Jasper option "trimSpaces" is documented as > "Should white spaces in template text between actions or directives be > trimmed ?, default false." > http://tomcat.apache.org/tomcat-8.5-doc/jasper-howto.html That is poorly worded. It would be better if it stated that if true, it effectively forces the trimDirectiveWhitespaces page directive to true for every page and tag. <snip/> > JSP.8.5.1 The tag Directive > > <quote> > trimDirective- > Whitespaces > (optional) Carries the same syntax and semantics of the trim- > DirectiveWhitespaces attribute of the page directive. > However, there is no corresponding global configuration > element in web.xml. > </quote> > > Thus the global configuration should not apply to tag files at all? When it uses the word 'global' in this case, it means all JSP files defined by a <jsp-property-group> element in web.xml. There is no equivalent web.xml configuration option for tag files. When we add this new option, I don't think the new value should override and explicit per page or per tag directive to remove whitespace completely. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org