From: Ian B. <ian...@gm...> - 2005-01-27 15:10:54
|
I've tracked the problem down to the documentation - the 3 parameters that the store command expects are name, source and overwrite (not name, xml and overwrite). There is a similar problem results where the name should be "position" not "pos" as documented. I guess this is a problem with the tool used to generate the documentation, using the variable name, rather than the parameter name - so to avoid future problems maybe the variable name should always be the same as the parameter name. The store command doesn't actaully seem to work still, and won't work the way I expected as my the didn't actaully work as I wanted as I would have to do something like the following to create a doc: <xdb:collection uri=3D"xmldb:exist:///db/collection"> <xdb:store name=3D"doc.xml"> <xdb:source>"<tag>hello</tag>"</xdb:so= urce> </xdb:store> </xdb:collection> where the contents of source is a java expression. =20 Really I want to do the following: <xdb:source><tag>hello</tag></xdb:source> Has anyone else used the store command from an XSP? ---------- Forwarded message ---------- From: Pierrick Brihaye <pie...@cu...> Date: Thu, 27 Jan 2005 10:11:36 +0100 Subject: Re: [Exist-open] Trying to save a document into Exist using an XSP To: zo...@bi... Cc: exi...@li... Hi, Ian Beaumont a =E9crit : > Using Cocoon 2.1.6 and Exist 1.0 beta 2 > > I'm trying to use the store tag to insert a document into Exist - but > when the XSP is executed I get the following error: > > java.lang.RuntimeException: Stylesheet directed termination This is generally caused by an : <xsl:message terminate=3D"yes"/> ... in the XSLT, most probably xmldb.xsl. Unfortunately, I'm afraid that the message content is mangled by Cocoon (see below). Nothing in sitemap's logs ? > <xdb:collection uri=3D"xmldb:exist:///db/collection"> > <xdb:store> > <xdb:name>abc.xml</xdb:name> > <xdb:xml> > <myDoc> > <myData/> > </myDoc> > </xdb:xml> > </xdb:store> > </xdb:collection> > Any ideas? Do you have write access to the collection ? > It seems the XSP isn't even being generated (no temporary > java file created). It's normal : the problem occurs *before* Java files are generated, i.e. when your XSP is "expanded" with eXist logicsheet's content. I wonder whether : <xsl:template name=3D"error"> <xsl:param name=3D"message"/> <xsl:message terminate=3D"yes"> <xsl:value-of select=3D"$message"/> </xsl:message> </xsl:template> ... shouldn't try to write something into the logs (eXist's ones ?). BTW, could http://exist-db.org/xmldb.xsl.html be regenerated with the current state of the stylesheet ? Cheers, -- Pierrick Brihaye, informaticien Service r=E9gional de l'Inventaire DRAC Bretagne mailto:pie...@cu... +33 (0)2 99 29 67 78 |