Safe Haskell | None |
---|---|
Language | Haskell98 |
An parser for the RDF/XML format http://www.w3.org/TR/REC-rdf-syntax/.
Documentation
XmlParser
is an instance of RdfParser
.
The BaseUrl
is used as the base URI within the document for
resolving any relative URI references. It may be changed within
the document using the @base
directive. At any given point, the
current base URI is the most recent @base
directive, or if none,
the BaseUrl
given to parseURL
, or if none given, the document
URL given to parseURL
. For example, if the BaseUrl
were
http://example.org/
and a relative URI of <b>
were
encountered (with no preceding @base
directive), then the
relative URI would expand to http://example.org/b
.
The Maybe Text
argument is the document URL is for the purpose of
resolving references to 'this document' within the document, and
may be different than the actual location URL from which the
document is retrieved. Any reference to <>
within the document
is expanded to the value given here. Additionally, if no BaseUrl
is given and no @base
directive has appeared before a relative
URI occurs, this value is used as the base URI against which the
relative URI is resolved.
An example of using this RDF/XML parser is:
Right (rdf::RDF TList) <- parseURL (XmlParser Nothing Nothing) "http://www.w3.org/People/Berners-Lee/card.rdf"