XSLT Xml output is stripping whitespace from closing slash

kpltshbanc

New Member
The XSLT XML output format is stripping the whitespace before the closing tag\[code\]<Import Include="System.Web" />\[/code\] becomes \[code\]<Import Include="System.Web"/>\[/code\]As the XSLT is also removing many nodes in the documents it's applied to, I would like to strip whitespace except in the case of the closing slash.The xslt is being applied to many xml ms proj filestemplate.xsl;\[code\]<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ms="http://schemas.microsoft.com/developer/msbuild/2003"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements="*"/> <!--<xsl:preserve-space elements="text"/>--> <xsl:template match='@*|node()'> <xsl:copy> <xsl:apply-templates select='@*|node()'/> </xsl:copy> </xsl:template> ... ...</xsl:stylesheet>\[/code\]
 
Back
Top