File: iri.rst

package info (click to toggle)
svgpp 1.3.0%2Bdfsg1-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,548 kB
  • sloc: cpp: 30,523; makefile: 165; python: 73; xml: 48; sh: 36
file content (21 lines) | stat: -rw-r--r-- 952 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
.. _iri-section:

IRI
=====

`IRIs <http://www.w3.org/TR/SVG/linking.html#IRIandURI>`_, including ones that are set with
`FuncIRI <http://www.w3.org/TR/SVG/types.html#DataTypeFuncIRI>`_
syntax, are passed to the user code the same way as other :ref:`strings <passing-string>` in SVG++. 

The only setting in *IRI Policy* configures whether to distinguish
local references to document fragment (IRIs prefixed with "#") from non-local IRI references. 
If ``policy::iri::distinguish_local`` used (as by default), then local reference to document fragment
is passed as pair of parameters: {``tag::iri_fragment()``, *<fragment string>*}. 
If ``policy::iri::raw`` is set, then any IRI is passed as single :ref:`string <passing-string>`.

:ref:`Named class template parameter <named-params>` for *IRI Policy* is ``iri_policy``.

Example of using default *IRI Policy* (``src/samples/sample_iri.cpp``):
  
.. literalinclude:: ../../src/samples/sample_iri.cpp