diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2018-04-06 14:50:06 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-04-06 14:50:06 +0200 |
commit | c0e6f395d4241b1622c6b44ed2de3636ddab8cb9 (patch) | |
tree | 90a7006a863a8cb05f63d19f8867ecd49f3d0ac2 | |
parent | efd3a67e9a72bfe37cb69f88da0151fc2d98d5f3 (diff) |
pict-attr: Accept optional initial XPath.
-rw-r--r-- | pict.scm | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -593,10 +593,10 @@ strings that are built from the list of attributes LST." ,txt)))) -(define (pict-attr attr pict) +(define* (pict-attr attr pict #:key (path '())) "Return the value of the selected ATTRIBUTE of the outermost element of the SVG of PICT or #F." - (and=> ((sxpath `(@ ,attr *any*)) + (and=> ((sxpath `(,@path @ ,attr *any*)) (pict-sxml pict)) (lambda (m) (and (pair? m) (car m))))) |