cancel
Showing results for 
Search instead for 
Did you mean: 

Web Form Saving Location Dynamically

suga_sugam
Champ in-the-making
Champ in-the-making
Hi ,

      I have created Web Form with Some text boxes and Path Option. While the Author Selects the Path Option that path option should be used as my destination to store my xml file. I have given below my Web Form and the Output Path which i formed during Web Form Creation Steps.

————————————————————————————————————
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
   xmlns:nav="http://www.alfresco.org/alfresco/navigation"
   targetNamespace="http://www.alfresco.org/alfresco/navigation"
   elementFormDefault="qualified">
   <xs:element name="navigation">
      <xs:complexType>
         <xs:sequence>
            <xs:element name="path" type="xs:anyURI" />
            <xs:element name="name" type="xs:normalizedString" />
            <xs:element name="description" type="xs:normalizedString"/>
         </xs:sequence>
      </xs:complexType>
   </xs:element>
</xs:schema>

————————————————————————————————————



Output Path Pattern :  /${webapp}/pages/static/${xml.nav.navigation.path}.${name}.${extension}



Its throwing below error. Can anyone help to resolve the below error.


——————————————————————————————————————–

Please correct the errors below then click Finish.
Error generating rendition using navigation-sitemap.xsl: Error processing output path pattern <#ftl ns_prefixes={
"alf":"http://www.alfresco.org",
"chiba":"http://chiba.sourceforge.net/xforms",
"ev":"http://www.w3.org/2001/xml-events",
"nav":"http://www.alfresco.org/alfresco/navigation",
"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}/pages/static/${xml.nav.navigation.path}.${name}.${extension} for ASDFQ.xml in webapp ROOT:
Error during processing of the template 'Error on line 10, column 27 in string://fixed
Expecting a string, date or number here, Expression xml.nav.navigation.path is instead a freemarker.ext.dom.NodeListModel'. Please contact your system administrator.
————————————————————————————————————————-
4 REPLIES 4

vipul
Champ in-the-making
Champ in-the-making
May be this will work:
/${webapp}/pages/static/${xml['navigation/path']}.${name}.${extension}

jaccky
Champ in-the-making
Champ in-the-making
Hi I use the same approach to let the user select the location of the content.
But I'm using version labs 3b and get this error:
when I create a content at the last step, clicking on "NEXT" in the summury page I see the Location: I've selected in the filePicker.
The problem is that after that I'm not able to change the value of the Location any more, nor clicking "back" to edit again the form, nor saving the content and the edit it again .
Any suggestion ?

mtaal
Champ in-the-making
Champ in-the-making
I just found out the following:

Say there is the following xml document:
<menu:menu>
<common:language>en</common:language>
</menu:menu>

- for the output path of a form namespaces do not work (eventhough the xml document has namespaces) and should not be used, the following works fine:
/${webapp}/${xml['menu/language']}/home/${name}.xml

- My impression is that for the output path of the rendition the namespaces must be used (if the xml document has namespaces ofcourse):
/${webapp}/${xml['menu:menu/common:language']}/home/${name}.xml

The following post gives also very good information:
http://forums.alfresco.com/en/viewtopic.php?t=11091

ben
Champ in-the-making
Champ in-the-making
I also posted some examples which may be useful - http://www.benh.co.uk/alfresco/web-forms-xforms/referencing-an-xml-element-within-an-output-path/.

Regards, Ben.