Block (final CodeStyleSettings settings, FormattingModel baseModel) { final Block block = baseModel.getRootBlock(); if (block instanceof XmlBlock xmlBlock) { final XmlPolicy xmlPolicy = new XmlPolicy(settings, baseModel.getDocumentModel()) { @Override public boolean keepWhiteSpacesInsideTag(XmlTag xmlTag) { return super.keepWhiteSpacesInsideTag(xmlTag) || isXslTextTag(xmlTag); } @Override public boolean isTextElement(XmlTag tag) { return super.isTextElement(tag) || isXslTextTag(tag) || isXslValueOfTag(tag); } }; final ASTNode node = xmlBlock.getNode(); final Wrap wrap = xmlBlock.getWrap(); final Alignment alignment = xmlBlock.getAlignment(); final Indent indent = xmlBlock.getIndent(); final TextRange textRange = xmlBlock.getTextRange(); return new XmlBlock(node, wrap, alignment, xmlPolicy, indent, textRange); } else { return block; } }