Hi folks. I'm trying to get my act done with Cocoon (great stuff btw.) and have stumbled about a problem, which might point to a problem with Xalan, since it worked with Saxon.
It appears to me, as if xsl:copy-of behaves differently, when namespaces are involved. I've searched the archives, but it appears this have not yet been seen. I started out with this simple xhtml file (just as an demo example): ==================== <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Link Sammlung</title> </head> <body bgcolor="#ffffff" link="#008080" alink="#0077FF" vlink="#AA00BB"> <h1>Link Sammlung</h1> <p> <img alt="" border="0" height="11" src="/images/s.gif" width="1" /> <br/> </p> <dl> <!-- one of (dd dt) --> <dd>allgemein</dd> <dt></dt> </dl> </body> </html> ==================== This is integrated into the output (after beeing aggregated in the sitemap) with this xsl snipped: ==================== <div style="margin-left: 11px"> <xsl:copy-of select="page/html:html/html:body/node()"/> </div> ==================== and the resulting fragment looks like this: ==================== <div style="margin-left: 11px"> <h1 xmlns="http://www.w3.org/1999/xhtml">Link Sammlung</h1> <p xmlns="http://www.w3.org/1999/xhtml"> <img alt="" border="0" height="11" src="/images/s.gif" width="1"/> <br clear="none"/> </p> <dl xmlns="http://www.w3.org/1999/xhtml"> <dd>allgemein</dd> <dt/> </dl> </div> ==================== Now, if I remove the DOCTYPE and the namespace declaration from the html in the input file and integrate it into the output with this ==================== <div style="margin-left: 11px"> <xsl:copy-of select="page/html/body/node()"/> </div> ==================== my resulting output looks like this, which is much more html-ish: ==================== <div style="margin-left: 11px"> <h1>Link Sammlung</h1> <p> <img alt="" border="0" height="11" src="/images/s.gif" width="1"> <br> </p> <dl> <dd>allgemein</dd> <dt></dt> </dl> </div> ==================== So it appears, that xsl:copy-of produces xml in the output, when namespaces are involved and HTML otherwise. I tried xsl:strip-space without effect. This doesn't seen like much of a problem, however with a more complex page, when a couple of pictures are integrated into a larger picture with the help of a table, this leeds to additional white space in the output, which in turn means, that the subpictures are not properly aligned. I'm using this sitemap entry: <map:match pattern="links/index"> <map:aggregate element="page"> <map:part src="{0}.xml"/> <map:part element="sidebar" src="links/sidebar.xml"/> </map:aggregate> <map:transform src="stylesheets/links/main.xsl"/> <map:serialize type="html"/> </map:match> I then dropped saxon into cocoon instead of xalan (after a small source change in cocoon to force saxon to use xerces a parser) everything worked as I would have expected. Before I go to the xalan list, I like to have an opinion from fellow cocoon users. -- Mit freundlichen Gruessen / Regards Frank Ridderbusch Fujitsu Siemens Computers, EP SQ XS1 Heinz Nixdorf Ring, 33106 Paderborn, Germany Tel.: (49) 5251-8-22033 Email: [EMAIL PROTECTED] --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>