Add "xsd" "http://www.w3.org/2001/XMLSchema#"; as a prefix mapping for the model. The Turtle output (which I assume you're using), wil only abbreviate to prefix names if there is a prefix definition on the model.

To get false as "false"^^<http://www.w3.org/2001/XMLSchema#boolean>, output in N-Triples.

        Andy

On 23/07/13 12:59, Phil Ashworth wrote:
Many Thanks for that.
Is there a way to force the output to look like I was expecting?
Cheers
Phil


On Tue, Jul 23, 2013 at 12:54 PM, Damian Steer <[email protected]> wrote:


On 23 Jul 2013, at 12:16, Phil Ashworth <[email protected]> wrote:

Sorry if these are trivial questions.

Not a problem.

The triple written to the file is

<http://me.org#myresource> <http://me.org#myproperty> false ;

For boolean I don’t see the data type written out

i.e. I was expecting
<http://me.org#myresource>

<http://me.org#myproperty> “false”^^<
http://www.w3.org/2001/XMLSchema#boolean> ;



Am I missing something?

Yes! Note that the output is:

<http://me.org#myresource> <http://me.org#myproperty> false

not:

<http://me.org#myresource> <http://me.org#myproperty> "false"

(no quotes in the first one)

The former is the literal boolean value that could also be written as
“false”^^<http://www.w3.org/2001/XMLSchema#boolean>.

In other words, it's what you want, just written in a form you weren't
expecting.

One further question on this (sorry)

In the above examples can

String objecttype = “http://www.w3.org/2001/XMLSchema#string”;

Be Shortened to

String objecttype = “xsd:string”;

Good question. I don't think that works.

Damian


Reply via email to