summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGunnar Aastrand Grimnes <gromgull@gmail.com>2013-05-07 22:32:14 +0200
committerGunnar Aastrand Grimnes <gromgull@gmail.com>2013-05-07 22:32:14 +0200
commit944d0095da113280595103d84dc53ec26fb781e4 (patch)
tree3107c465d0d9978c0eb44db3ec7ae90b40d9fb33 /docs
parent51ef22af04a6a260e09979d09ebdd4816e9542e4 (diff)
downloadrdflib-944d0095da113280595103d84dc53ec26fb781e4.tar.gz
migrated faq from wiki to docs
Diffstat (limited to 'docs')
-rw-r--r--docs/faq.rst47
-rw-r--r--docs/index.rst1
2 files changed, 48 insertions, 0 deletions
diff --git a/docs/faq.rst b/docs/faq.rst
new file mode 100644
index 00000000..419226b4
--- /dev/null
+++ b/docs/faq.rst
@@ -0,0 +1,47 @@
+=============================================
+Frequently Asked Questions about using RDFLib
+=============================================
+
+Questions about parsing
+=======================
+
+Questions about manipulating
+============================
+
+Questions about serializing
+===========================
+
+Which serialization method is the most efficient?
+=================================================
+
+Currently, the "nt" output format uses the most efficient
+serialization; "rdf/xml" should also be efficient. You can
+serialize to these formats using code similar to the following::
+
+ myGraph.serialize(target_nt, format="nt")
+ myGraph.serialize(target_rdfxml, format="xml")
+
+How can I use some of the abbreviated RDF/XML syntax?
+=====================================================
+
+Use the "pretty-xml" `format` argument to the `serialize` method::
+
+ myGraph.serialize(target_pretty, format="pretty-xml")
+
+How can I control the binding of prefixes to XML namespaces when using RDF/XML?
+===============================================================================
+
+Each graph comes with a `NamespaceManager`__ instance in the `namespace_manager` field; you can use the `bind` method of this instance to bind a prefix to a namespace URI::
+
+
+ myGraph.namespace_manager.bind('prefix', URIRef('scheme:my-namespace-uri:'))
+
+__ http://rdflib.net/rdflib-2.4.0/html/public/rdflib.syntax.NamespaceManager.NamespaceManager-class.html
+
+Does RDFLib support serialization to the `TriX`__ format?
+=========================================================================================
+Yes, both parsing and serialising is supported::
+
+ graph.serialize(format="trix") and graph.load(source, format="trix")
+
+__ http://www.w3.org/2004/03/trix/
diff --git a/docs/index.rst b/docs/index.rst
index 797e2caf..4c885b16 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -95,6 +95,7 @@ For developers
univrdfstore
persisting_n3_terms
+ faq
Documentation notes <docs>