|
Viola! After several attempts at several different methods I found the most simplest solution with a combination of your last suggestion and something I found in a article somewhere else. What happens is that the processor will strip all nodes containing only whitespace (chars in the set {0x09, 0x0a, 0x0d, 0x20}), as excepted so nothing new here..... What we need to do is preserve them and then properly translate them from 	 etc. to their unescaped equivalents. Again nothing new here but how do we achieve this when there are several methods that do not work? With a pipelines similar to the below: <map:generate type="serverpages" src=""/> <map:transform src=""> <map:parameter name="assetsCacheServer" value="{config:assetsCacheServer}"/> <map:parameter name="resourceCacheServer" value="{config:resourceCacheServer}"/> <map:parameter name="area" value="{page-envelope:area}"/> <map:parameter name="root" value="{request:contextPath}/{page-envelope:publication-id}/{page-envelope:area}"/> </map:transform> <map:transform src=""/> <map:serialize type="xhtml"/> So, there a 2 things that need to be done. (please refer to my first post for all lib versions) 1. The first stylesheet (xslt/lenya-dyn/wiredmag2xhtml.xsl) transforms our generated xml. It contains the proper style of indentation we desire. In the xsl root node *you need to declare* xml:space="preserve" like so: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XML/Transform xml:space="preserve"> ..... 2. The second style sheet prepares our output for the front ends. The thing you need to do here is *define a template that properly escapes your whitespace chars*. Otherwise you'll end up with tons of 	's and extra newlines where you don't want them <xsl:template match="text()"> <xsl:value-of disable-output-escaping="yes" select="."/> </xsl:template> <xsl:template match="comment()"> <xsl:copy/> </xsl:template> Thats it. In the above solution you do not need to "turn on" indentation or make a styleheet that does the indentation for you but simply make sure that whitespace is preserved during transformation and then properly unescapsed by another stylesheet before being serialized. HTH, -Justin Joerg Heinicke wrote: On 24.04.2006 17:18, Justin Hannus wrote: -- Justin Hannus Software Engineer | Infrastructure | Lycos Inc. [EMAIL PROTECTED], www.lycos.com [781] 370 2988 |
