You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Jonathan Mark <jh...@xenops.com> on 2002/04/24 23:30:25 UTC

XUpdate fails for empty element

hi ...
I noticed that XUpdate will fail with the following message, if an update
contains an empty <text> element:

fault code 0: java.lang.Exception:
org.apache.xindice.core.query.ProcessingException: Error executing XUpdate
query

I suppose this might possibly be intentional, since there is probably no
good reason to supply an empty <text> element.
However I suggest that it would be friendlier if this were accepted, or at
least a more specific error message given.

Appended here is an example of an update which fails as written, but
succeeds if some text is added inside the <text> element on line 5.

Now I'll go fix my application to avoid generating that.
(By the way, let me know if there is a better way to report Xindice
issues.)

thanks,

	Jonathan Mark

<X:modifications version="1.0" xmlns:X="http://www.xmldb.org/xupdate">
  <X:append select="/user[@name='testuser']/calendar">
    <X:element name="event">
      <X:element name="pmid"><X:text>242</X:text></X:element>
      <X:element name="repeat"><X:text></X:text></X:element>
    </X:element>
  </X:append>
</X:modifications>