vcproj - XSLT: keeping whitespaces when copying attributes -
i'm trying sort microsoft visual studio's vcproj diff show meaningful after e.g. deleting file project. besides sorting, want keep intact, including whitespaces. input looks like
space<file
spacespacerelativepath="filename"
spacespace>
...
the xslt fragment below can add spaces around elements, can't find out how deal around attributes, output looks like
space<file relativepath="filename">
xslt use msxsl 4.0 processor:
<xsl:for-each select="file">
<xsl:sort select="@relativepath"/>
<xsl:value-of select="preceding-sibling::text()[1]"/>
<xsl:copy>
<xsl:for-each select="text()|@*">
<xsl:copy/>
</xsl:for-each>
those spaces always insignificant in xml, , believe there no option control behavior in general way xml/xslt library.
Comments
Post a Comment