Pierrick Brihaye | 1 May 2007 09:13
Picon
Favicon

Re: Adding processing instruction using (X)update with eXist 1.1.1

Hi,

Thamm, Russell a écrit :

> 1) Execute following query in client
> 
> let $c := <xupdate:modifications version="1.0" xmlns:xupdate="http://www.xmldb.org/xupdate">
>               <xupdate:insert-before select="/addresses">
>                  <xupdate:processing-instruction name="cocoon-process">type="xsp"</xupdate:processing-instruction>
>               </xupdate:insert-before>
>           </xupdate:modifications>
> return $c

Mmmh... this one is related to our XQuery parser :-(

> 2) Execute following query in client - need to modify to suit your database
> 
> let $docnode := doc("/db/hie/hosts/burns.xml")/document-node()
> let $pi := <?xml-stylesheet type="text/xsl" href="http://hiexmldb:8080/schema/HostInfo.xsl"?>
> return
>   update insert $pi preceding $docnode

I would have expected a self-contained test... it should not be too 
difficult to create a minimal document from a query then to update it.

> org.xmldb.api.base.XMLDBException: java.lang.NullPointerException
> 	at org.exist.xmldb.RemoteXPathQueryService.query(RemoteXPathQueryService.java:64)

... and a server stack trace, not a client's.

> 3)  Following is a listing of the xupdate 
> 
> <xupdate:modifications version="1.0" xmlns:xupdate="http://www.xmldb.org/xupdate" >
>   <xupdate:insert-before select="/document-node()">
>     <xupdate:processing-instruction name="xml-stylesheet">type="text/xml" href="http://hiexmldb:8080/schema/HostInfo.xsl"</xupdate:processing-instruction>
>   </xupdate:insert-before>
> </xupdate:modifications>
> 
> Executing the XUpdate using the SOAP interface, I get a SOAP FAULT with faultstring of java.lang.NullPointerException.

Could you provide a stack trace ?

[snip]

Cheers,

p.b.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Gmane