Skip to content

Triples containing Variable result in invalid turtle #383

Open
@mrkvon

Description

@mrkvon

When creating a triple with Variables in it, and then writing it as text/turtle, the outcome is invalid turtle.

const writer = new Writer({ format: 'text/turtle' })
writer.addQuad(new Quad(new Variable('a'), new NamedNode(foaf.knows), new Variable('c')))
writer.end((err, result) => {
  console.log(result)
})

This yields

?a <http://xmlns.com/foaf/0.1/knows> ?c.

which is invalid turtle.

Along the argumentation in #165, this could rather throw error or gracefully drop the triples containing Variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions