cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: XML-Binding in Woody <wb:insert-node>-tag
Date Fri, 31 Oct 2003 10:20:23 GMT
On Fri, 2003-10-31 at 09:58, Johannes Becker wrote:
> Hi there,
> 
> I have problems customizing the Woody "form2xml.flow"-example. I wanted to 
> try to insert some xml permanently in a already existing xml-document. From 
> the Wiki-docu I understood that <wb:insert-node> tag would do the job. So I 
> created an external xml file (insertdata.xml) and customized the
> "form2_bind_xml.xml"-file.
> 
> What I changed in the "form2_bind_xml.xml"-file:
> old:
> ...
> <wb:insert-node>
> 
> new:
> ...
> <wb:insert-node src="forms/insertdata.xml" 
> xpath="/data/wrapper/context/contacts">
> 
> My xml-file "insertdata.xml" in the forms folder:
> <?xml version="1.0" encoding="UTF-8"?>
> <data>
> 	<wrapper>
> 		<context>
> 			<contacts>
> 			</contacts>
> 		</context>
> 	</wrapper>
> </data>
> 
> 
> This produces an error:
> An Error Occurred
> uncaught JavaScript exception: at form2xml 
> (file:/C:/Programme/cocoon-2.1.2/build/webapp/samples/woody/flow/binding_example.js,

> Line 73) at (resource://org/apache/cocoon/woody/flow/javascript/woody2.js, 
> Line 199): org.apache.commons.jxpath.JXPathException: Exception trying to 
> create xpath contact[3]; Factory could not create a child node for path: 
> /data[1]/wrapper[1]/context[1]/contacts[1]/contact[3]
> 
> org.apache.avalon.framework.CascadingRuntimeException: uncaught JavaScript 
> exception: at form2xml 
> (file:/C:/Programme/cocoon-2.1.2/build/webapp/samples/woody/flow/binding_example.js,

> Line 73) at (resource://org/apache/cocoon/woody/flow/javascript/woody2.js, 
> Line 199): org.apache.commons.jxpath.JXPathException: Exception trying to 
> create xpath contact[3]; Factory could not create a child node for path: 
> /data[1]/wrapper[1]/context[1]/contacts[1]/contact[3]
> 
> cause: org.apache.commons.jxpath.JXPathException: Exception trying to create 
> xpath contact[3]; Factory could not create a child node for path: 
> /data[1]/wrapper[1]/context[1]/contacts[1]/contact[3]
> 
> 
> Did I understand the use of the <wb:insert-node>-tag wrong?

Yes.

Didn't you ask exactly the same question on monday? I posted an answer
on wednesday, maybe you missed it.

> Is there further documentation on woody/xml-binding?

nope

> Are there other woody samples where is xml permanently stored in an 
> xml-file?
> 
> 
> An other problem I have is with the "Registration"-example.
> When I send a valid form I'm always getting an java.lang.StackoverflowError. 
> Cutting out the "<wd:field id="confirmPassword" required="true">"-tag in the 
> registration.xml-file "solves" this problem.

This is fixed in current CVS.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message