I just noticed that a work-around would be to create a variable in the WHERE clause, for example

INSERT {
    GRAPH <http://kaiko.getalp.org/gbdlex/bridges/testBridge> {
        ?bnode a gbdlex:axie .
        ?bnode gbdlex:link ?this .
    }.
}
WHERE {
    ?this a gbdlex:wordSense .
    BIND (BNODE() AS ?bnode) .
}

This at least should keep you going with 4.1 until the original issue is fixed in 4.2.

HTH
Holger


On 2/21/2013 10:56, Holger Knublauch wrote:
Hi David,

yes you are unfortunately correct: there is a bug in all versions including 4.1 that doesn't handle bnodes in GRAPHs inside of INSERT/DELETE templates correctly. I had fixed this a few weeks ago, so it's already corrected in the published SPIN API 1.3.0. For TBC I am not aware of a work-around except waiting for the next release which is scheduled to go into beta in mid March.

FWIW here is the change log entry:

- Bug fix: INSERT { GRAPH { _:b0 ... was incorrectly rendered as INSERT { GRAPH { [] ...

Thanks
Holger


On 2/21/2013 7:15, David Rouquet wrote:
Hi everyone,

I'm having troubles with a SPIN rule that should insert triples with blank nodes in a given graph. I'm not sure if it comes from a misunderstanding I have using bnodes or a bug in TopBraid Composer.

When I validate the rule in TBC, it sometimes automatically modify the syntax. This is usually OK as the modified rule should be equivalent to the one I entered. However, when I specify the graph where the triples have to be inserted, the modified syntax imposed by TBC is not equivalent to the one I entered.

For instance, when I don't specify the graph like in the following query, everything is fine (the query is not modified when I validate) :

INSERT {
    _:b0 a gbdlex:axie .
    _:b0 gbdlex:link ?this .
}
WHERE {
    ?this a gbdlex:wordSense .
}

But with the same query where I specify the graph where the triples have to be inserted :

INSERT {
    GRAPH <http://kaiko.getalp.org/gbdlex/bridges/testBridge> {
        _:b0 a gbdlex:axie .
        _:b0 gbdlex:link ?this .
    }.
}
WHERE {
    ?this a gbdlex:wordSense .
}

TBC rewrite the rule in the following form, that is not equivalent, when I validate (press enter) :

INSERT {
    GRAPH <http://kaiko.getalp.org/gbdlex/bridges/testBridge> {
        [] a gbdlex:axie .
        [] gbdlex:link ?this .
    }.
}
WHERE {
    ?this a gbdlex:wordSense .
}

To the best of my understanding, the two occurrences of the shorten form [] are bound to two different bnodes whereas I need them to represent the same bnode (as specified using the _:b0 syntax).

I tried other short syntaxes for bnodes as :
[] a gbdlex:axie ; gbdlex:link ?this .
or
[a gbdlex:axie] gbdlex:link ?this .
but TBC always rewrite the rule in the same non equivalent form.

I know that TBC automatically rewrite the rules that use deprecated SPARQL syntaxes so I suspected a bug in this rewriting process.

Any help would be much appreciated !

Best
-----
David

--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.




--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
--- You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to