Nevermind, I seem to have figured it out.

I dont know what I did wrong, but this line works:

(retract-string (str-cat "(MAIN::triple (predicate " "\"
http://www.semanticweb.org/ontologies/ImageEditor.owl#Pickable\""; ")
(subject \"" ?tool1 "\") (object " "\"true\"" "))"))

Perhaps I messed up some brackets or inverted commas before....or maybe it
was the missing "MAIN::" in the head of my fact that I needed...

Problem solved.

/Chirag

On 31/03/2008, Chirag Vesuvala <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm trying to retract a fact via the retract-string method.  I need to use
> the str-cat method to assemble my fact.  The problem is that the slot values
> of my fact have " " (double quotations) around them.  str-cat is not
> detecting that my \" should be interpreted as a " only.
>
> How do I make str-cat concatenate a string which already has "" marks in
> it, so that it doesn't include the extra \ sign?  See the example below if
> this is way too confusing to understand.
>
> Yes, i am importing a .owl file developed in protege.
>
> (retract-string (str-cat
>     "(triple
>     (predicate \"
> http://www.semanticweb.org/ontologies/ImageEditor.owl#Pickable\<http://www.semanticweb.org/ontologies/ImageEditor.owl#Pickable%5C>
> ")
>     (subject \" " ?tool "\")  <----------- notice the 2 \" on this line
>     (object \"false\"))"
>                      )
> )
>
> The fact in the working set looks like this:
> (triple
>     (predicate "
> http://www.semanticweb.org/ontologies/ImageEditor.owl#Pickable";)
>     (subject "myTool")   <---------  This is how it should look.  No \"
> should be there.
>     (object "false")
> )
>
>
> Thanks,
> Chirag
>

Reply via email to