rdf xsd:string conversion

Thomas McGuire <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
I am having trouble converting literals of type 'http://www.w3.org/XMLSchema#string'. When I do an rdf statement on a database I've loaded and try to pull out the object value it is being converted into a prolog atom. which means if the string text has words separated by spaces it is enclosed in single quotes. Even if I do string_to_atom/2 conversion the single quotes are placed into the string.

rdf(X,'http://www.w3.org/2000/01/rdf-schema#label',literal(type('http://www.w3.org/XMLSchema#string',Y))).

Y= 'some string of text'

or if just one word

Y = oneword      %No single quotes

when I attach string_to_atom(Str,Y). 

Str = "'some string of text'"    % single quotes propagate into the string

in the case of the oneword case it works fine:

Str = "oneword"


I want them the multiword string to not have the single quotes when inside a string.

Anyway to accomplish this conversion? The alternative is to do string processing on each after the conversion and manually remove the quotes.


Tom McGuire
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.