Hi Mike,

thanks for your report. It would be great if you could provide us with
a small example that allows us to reproduce the issue (an export of
your original database with the namespace (which is being added to the
new node) may suffice).

Best,
Christian
____________________________

On Mon, Apr 2, 2012 at 2:44 PM, Mike Hawkes <mikehaw...@me.com> wrote:
> Hi
>
> I have a weird problem ... I'm running a query via the PHP interface and run 
> the following query:
>
> declare variable $DB external;
>
> insert node
>    <audit QID='C54B14ED-C748-4DF0-87F2-91F505BE207B'
>                UID='i1'
>                guid='CC9D4D2B-B380-494B-B0F6-4D72471557B0'
>                sessionID='48090b7f0e3a62a42a0457a3e88301ca'
>                mode='active'
>                date='2012-04-02T12:21:05+00:00'/>
> into doc($DB)/root/auditlog
>
> --
> BaseX log shows that it gets the query as-is.
>
> When I look at the data within the database by running the XQuery
>
> /root/auditlog
>
> I find that BaseX has inserted a namespace attribute as follows:
>
> <audit xmlns="http://www.w3.org/1999/xhtml";
>    QID="C54B14ED-C748-4DF0-87F2-91F505BE207B"
>    UID="i1" guid="CC9D4D2B-B380-494B-B0F6-4D72471557B0" 
> sessionID="48090b7f0e3a62a42a0457a3e88301ca" mode="active" 
> date="2012-04-02T12:21:05+00:00"/>
>
> How do I stop this occurring? It only does it on the audit components, not on 
> anything else inserted by the PHP script. So, if I run two insert node 
> queries, the first will run normally, the audit update causes the xmlns 
> attribute to appear, effectively putting it in a different namespace to the 
> other data inserted  by the PHP.
>
> The PHP script is as follows:
>
> $audit = "declare variable \$DB external; " .
>        "insert node <audit QID='$queryID' UID='$userID' " .
>        "guid='$guid' sessionID='" . session_id() . "' " .
>        "mode='active' " .
>        "date='$dateTime'/> into doc(\$DB)/root/auditlog";
>
> $query = $session->query( $audit );
> $query->bind( 'DB', $DB);
> $query->bind( 'SYSDATA', $SYSDATA );
> $query->execute();
> $query->close();
>
>
> Thanks in advance for any suggestions.
>
> Mike
> _______________________________________________
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

Reply via email to