| Portability | OverloadedStrings |
|---|---|
| Stability | experimental |
| Maintainer | Douglas Burke |
Swish.RDF.TurtleParser
Description
This Module implements a Turtle parser (see [1]), returning a
new RDFGraph consisting of triples and namespace information parsed from
the supplied input string, or an error indication.
REFERENCES:
1 http://www.w3.org/TR/turtle/ Turtle, Terse RDF Triple Language W3C Working Draft 09 August 2011 (http://www.w3.org/TR/2011/WD-turtle-20110809/)
Notes:
At present there is a lot of overlap with the N3 Parser.
- type ParseResult = Either String RDFGraph
- parseTurtle :: Text -> Maybe URI -> ParseResult
- parseTurtlefromText :: Text -> ParseResult
Documentation
type ParseResult = Either String RDFGraphSource
Arguments
| :: Text | input in N3 format. |
| -> Maybe URI | optional base URI |
| -> ParseResult |
Parse a string with an optional base URI.
Unlike parseN3 we treat the base URI as a URI and not
a QName.
Arguments
| :: Text | input in N3 format. |
| -> ParseResult |
Parse as Turtle (with no real base URI).
See parseTurtle if you need to provide a base URI.