diff options
author | Dave Beckett <dave@dajobe.org> | 2007-08-26 08:02:09 +0000 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2007-08-26 08:02:09 +0000 |
commit | e86a34a8fbb281037a47dc1d522582daecdc2bcf (patch) | |
tree | b1ae5b6c2ead3b37b9b8a25d26bc7b56ddb95563 /docs/raptor-tutorial-parsing.xml | |
parent | 17edc8b65ebb42e4a203743c0a995e9f4ed1dc05 (diff) | |
download | raptor-e86a34a8fbb281037a47dc1d522582daecdc2bcf.tar.gz |
parsing filtering tutorial docs
Diffstat (limited to 'docs/raptor-tutorial-parsing.xml')
-rw-r--r-- | docs/raptor-tutorial-parsing.xml | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/docs/raptor-tutorial-parsing.xml b/docs/raptor-tutorial-parsing.xml index fd63cca6..8873397e 100644 --- a/docs/raptor-tutorial-parsing.xml +++ b/docs/raptor-tutorial-parsing.xml @@ -413,12 +413,14 @@ The parser feature <link linkend="RAPTOR-FEATURE-NO-NET:CAPS"><literal>RAPTOR_FEATURE_NO_NET</literal></link> can be set with <link linkend="raptor-set-feature"><function>raptor_set_feature()</function></link> -and forbids all network requests. There is no customisation of -this approach. +and forbids all network requests. There is no customisation with +this approach, for that see the URI filter in the next section. </para> <programlisting> rdf_parser = raptor_new_parser("rdfxml"); + + /* Disable internal network requests */ raptor_set_feature(rdf_parser, RAPTOR_FEATURE_NO_NET); </programlisting> @@ -502,6 +504,29 @@ the <link linkend="tutorial-filter-network-www-uri-filter">previous section</lin </section> + +<section id="tutorial-filter-network-parser-timeout"> +<title>Setting timeout for parser network requests with feature <link linkend="RAPTOR-FEATURE-WWW-TIMEOUT:CAPS"><literal>RAPTOR_FEATURE_WWW_TIMEOUT</literal></link></title> + +<para>If the value of feature +<link linkend="RAPTOR-FEATURE-WWW-TIMEOUT:CAPS"><literal>RAPTOR_FEATURE_WWW_TIMEOUT</literal></link> +if set to a number >0, it is used as the timeout in seconds +for retrieving of URIs during parsing (primarily for GRDDL). +This uses +<link linkend="raptor-www-set-connection-timeout"><function>raptor_www_set_connection_timeout()</function></link> +internally. +</para> + +<programlisting> + rdf_parser = raptor_new_parser("grddl"); + + /* set internal URI retrieval maximum time to 5 seconds */ + raptor_set_feature(rdf_parser, RAPTOR_FEATURE_WWW_TIMEOUT , 5); +</programlisting> + +</section> + + </section> |