URIs and href
This page documents Inkscape's handling of URI's.
There are two types of URI's:
- In attributes: <use xlink:href="#MyObject">
- In properties: style="fill:#MyGradient"
Basic functionality is handled by the URIReference class which has many derived classes:
- ItemReference (LPE)
- PathReference (LPE)
- SPClipPathReference (created in SPItem::SPItem with object )
- SPGradientReference (created in SPGradient::SPGradient)
- SPMarkerReference (not used!)
- SPPaintServerReference (created in SPIPaint::read with document)
- SPUseReference (created in SPUse::SPUse with object)
- SPFilterReference (created in SPIFilter::read with object)b
- SPMaskReference (created in SPItem::SPItem with item)
The derived classes generally only override:
- The constructor
- getObject() checking to make sure it's the right type of object
- _acceptObject() checking to make sure it's the right type of object and checking for circular references
Currently only SPPaintServerReference and SPFilterReference are used by properties, although SPMaskReference and SPClipPathReference should be too as they correspond to CSS properties (but Inkscape doesn't support these properties yet).