20,741
edits
m (→tag) |
m (→tag) |
||
Line 119: | Line 119: | ||
debug.dump( attr ); | debug.dump( attr ); | ||
For filename/URL handling, we can look at other xlink/href handling in svg.nas and copy/adapt that accordingly: | |||
<syntaxhighlight lang="nasal"> | |||
var ref = attr["xlink:href"]; | |||
if( ref == nil or size(ref) < 2 or ref[0] != `#` ) | |||
return printlog("warn", "Invalid or missing href: '" ~ ref ~ '"'); | |||
</syntaxhighlight> | |||
Once we do have a valid filename/URL, we can simply call the setFile() method: |