= Deploying custom baggage files = Our WebWorks Help template needs to be able to add static files on a per-project basis after design-time; something like the Files directory, but stored with the source documents. At run-time, I determine if the source directory exists and copy any files from it with CopyDirectoryFiles(). This adds the files to the staging directory, but they do not get deployed. I have added code to set the deploy attribute to true (per Ben's suggestion, thanks!). However, it '''only works code when there is a single group'''. When there are multiple groups, this code fails (see error below) {{{ true }}} This file is called directly from the .wfmt {{{ }}} Here is the error I get: {{{ [Warning] [Custom] Copying files from C:\_wwfiles\files to C:\webworks\wwhelp_test2\Output\Target 1\First_group [Warning] [Custom] Copying files from C:\_wwfiles\files to C:\webworks\wwhelp_test2\Output\Target 1\Second_group [Error] An error occurred in pipeline 'custom_files' while processing stage transform 'wwformat:Transforms/custom_files.xsl'. [Error] Attribute and namespace nodes cannot be added to the parent element after a text, comment, pi, or sub-element node has already been added. }}} Why is this failing? == 2011-06-13 == Mike, Where is this template being invoked? It matters only because the {{{}}} elements must be emitted at the top-level of your root match template. Can you attach the full override .xsl file? BenAllums == 2011-06-13 == Ben, I updated the list to include everything except the xsl:stylesheet declaration. That's all there is to it, and it is called from the .wfmt. And here is the attachment [[attachment:nuan_files.xsl]]. -- Mike == 2011-06-14 == Mike, Please review the attached project [[attachment:Baggage Files.2011-06-14.zip]]. It contains further changes to your original transform which add the deploy attribute and update the groupID attribute. I found two issues: 1. The {{{}}} declaration in the {{{format.wwfmt}}} file referenced the "page" pipeline rather than the "Page" pipeline. 2. The {{{}}} loop selected {{{$CopiedFiles}}} rather than {{{$VarCopiedFiles/wwfiles:Files/wwfiles:File}}}. The first one is a File Info document, so when the root element was emitted, things were processed in an unexpected order. == 2011-06-15 == Ben, I suspected that for-each argument was the problem. I tried playing with it but could not get the namespace right. Your clarification is clear-as-a-bell (and helps explain namespace too). Thanks for the help!!! ---- CategoryHowto