AnsweredAssumed Answered

Web Form Output Path Error

Question asked by a_band on Oct 18, 2007
Latest reply on Oct 30, 2007 by a_band
I've got a web form created and it was working fine until I tried modifying the output path to use xml data from the document. I'm trying to get the output file to be generated into a directory based on a user-defined value in the web form.

Here's the output path:

/${webapp}/articles/${xml['article:article/article:title']}/${name}.xml

Here's the web form XSD:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

   xmlns:article="http://www.alfresco.org/alfresco/article"

   targetNamespace="http://www.alfresco.org/alfresco/article"

   elementFormDefault="qualified">



   <!– defines the form for creating a press release –>

   <xs:element name="article">

      <xs:complexType>

         <xs:sequence>

            <xs:element name="title" type="xs:normalizedString" />

            <xs:element name="author" type="xs:normalizedString" />

            <xs:element name="article_category" type="xs:normalizedString" />

            <xs:element name="teaser" type="xs:string"/>

            <xs:element name="keywords" type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded" />

            <xs:element name="body" type="xs:string" minOccurs="1" maxOccurs="unbounded" />

                 <xs:element name="–" minOccurs="0"

               maxOccurs="unbounded">

               <xs:complexType>

                  <xs:sequence>

                     <xs:element name="image" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>

                     <xs:element name="caption" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/>

                     <xs:element name="page_number" type="xs:integer" minOccurs="0" maxOccurs="1"/>

                  </xs:sequence>

               </xs:complexType>

            </xs:element>

            <xs:element name="publish_date" type="xs:date"/>

         </xs:sequence>

      </xs:complexType>

   </xs:element>

</xs:schema>

Everything looks good but when I try to save this I get this error:

Please correct the errors below then click Finish.

* Error processing output path pattern <#ftl ns_prefixes={ "alf":"http://www.alfresco.org", "article":"http://www.alfresco.org/alfresco/article", "chiba":"http://chiba.sourceforge.net/xforms", "ev":"http://www.w3.org/2001/xml-events", "xf":"http://www.w3.org/2002/xforms", "xhtml":"http://www.w3.org/1999/xhtml", "xs":"http://www.w3.org/2001/XMLSchema", "xsi":"http://www.w3.org/2001/XMLSchema-instance"}> /${webapp}/articles/${xml['article:article/article:title']}/${name}.xml for Baking Bread in webapp ROOT: Error during processing of the template 'Error on line 10, column 23 in string://fixed Expecting a string, date or number here, Expression xml['article:article/article:title'] is instead a freemarker.ext.dom.NodeListModel'. Please contact your system administrator.

Outcomes