- fix error in namespaces in get company footer

- add a very demoware ready sample multi channel output, meaning generating a really ugly plain text version of the press release and adding a link to it from the html version.
- removing the company footer xsl as it is no longer mandatory to have one
- passing more parameters to the xsl process - rather ugly implementation - needs to be revisited



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4044 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ariel Backenroth
2006-10-06 04:00:21 +00:00
parent d26fe8cbb5
commit d465973b34
7 changed files with 42 additions and 23 deletions

View File

@@ -17,6 +17,7 @@
package org.alfresco.web.templating.xforms;
import java.io.*;
import java.util.Map;
import org.alfresco.web.templating.*;
import org.chiba.xml.util.DOMUtil;
@@ -33,7 +34,7 @@ public class FreeMarkerOutputMethod
public void generate(final Document xmlContent,
final TemplateType tt,
final String sandBoxUrl,
final Map<String, String> parameters,
final Writer out)
{
}

View File

@@ -43,6 +43,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;
import org.alfresco.service.cmr.repository.NodeRef;
import java.util.Map;
public class XSLTOutputMethod
implements TemplateOutputMethod
@@ -62,7 +63,7 @@ public class XSLTOutputMethod
public void generate(final Document xmlContent,
final TemplateType tt,
final String sandBoxUrl,
final Map<String, String> parameters,
final Writer out)
throws ParserConfigurationException,
TransformerConfigurationException,
@@ -70,6 +71,8 @@ public class XSLTOutputMethod
SAXException,
IOException
{
// XXXarielb - dirty - fix this
final String sandBoxUrl = (String)parameters.get("avm_store_url");
final TransformerFactory tf = TransformerFactory.newInstance();
final TemplatingService ts = TemplatingService.getInstance();
final DOMSource source = new DOMSource(ts.parseXML(this.nodeRef));
@@ -103,7 +106,12 @@ public class XSLTOutputMethod
}
}
});
t.setParameter("avm_store_url", sandBoxUrl);
for (Map.Entry<String, String> e : parameters.entrySet())
{
t.setParameter(e.getKey(), e.getValue());
}
LOGGER.debug("setting parameter avm_store_url=" + sandBoxUrl);
final StreamResult result = new StreamResult(out);
try