linearGradient removed; multiple linearGradient xlink:hrefernce on the same linearGradient
Created by: JoKalliauer
Prozessing File:Oxygen480-mimetypes-image-svg%2Bxml-compressed.svg after some other processing leads to a removement of some parts.
$ scour -i input.svg.txt -o output.svg.txt --nindent=1
most likely related to https://github.com/scour-project/scour/issues/198
Input with file&sourcecode&picture
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<linearGradient id="a" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#fff"/>
<stop offset="1" stop-color="#fff" stop-opacity="0"/>
</linearGradient>
<radialGradient id="b" cx="64" cy="64" fx="63.79" fy="47.28" gradientTransform="matrix(1.6842 -.0843 .0689 1.3759 -48.2 -18.66)" r="47.5" xlink:href="#a"/>
<linearGradient id="c" xlink:href="#a"/>
<filter id="d">
<feGaussianBlur stdDeviation="1.002"/>
</filter>
<mask id="e">
<path d="m50.444-73.209c-.22 0-.324.152-.324.324v70.694a.98.98 0 0 0 .973.973l35.682.02c.034 0 .647-.005 1.095 0 6.55-2.59 16.5-14.6 22.29-20.407.958-1.08.723-.747.943-1.874v-49.407c0-.209-.106-.324-.324-.324z" fill="url(#f)" opacity=".85"/>
</mask>
<radialGradient id="f" cx="64" cy="64" r="47.5" fx="63.79" fy="47.28" gradientTransform="matrix(1.0926 -.0547 .0447 .8926 7.5 -90.83)" xlink:href="#c"/>
<filter id="g">
<feGaussianBlur stdDeviation=".278"/>
</filter>
<radialGradient id="h" cx="73.97" cy="-42.72" r="29.65" gradientTransform="matrix(1.9051 0 0 1.9929 -66.95 42.6)" gradientUnits="userSpaceOnUse">
<stop offset="0"/>
<stop stop-opacity="0" offset="1"/>
</radialGradient>
<path d="m18.5 9c-.34 0-.5.235-.5.5v107.97c0 .822.679 1.5 1.5 1.5l54.5.031c.053 0 3.27-.008 3.964 0 6.54-4.5 22.6-22 31.583-30.955 1.48-1.66.458-.37 1.454-1.608v-76.938c0-.323-.163-.5-.5-.5z" fill="url(#b)" opacity=".85"/>
<g transform="matrix(1.5414 0 0 1.5414 -55.76 120.88)" filter="url(#d)" mask="url(#e)" opacity=".62">
<path d="m83.952-33.81c-.573-.329-1.17-.531-1.765-.571-1.96-.132-4.14.534-5.625 1.615-1.08.786-2.19 2.1-2.5 3.645-.102.507-.679.992-.969 1.201s-.67.42-1.094.58c-.663.256-1.6.337-2.625.207-2.22-.352-4.04-1.78-5.188-3.52-1.3-2.28-1.49-4.94-1-7.289.557-2.58 2.18-5.24 4.438-7.621 2-2.15 4.57-4 7.469-5.633 2.9-1.64 6.1-3.05 9.313-4.432 9.18-3.75 19.3-8.45 25.156-15.448.726-.89 1.35-1.76 1.938-2.651v-3.81c-1.13 1.62-2.46 3.28-4.094 4.846-1.76 1.7-3.84 3.27-6.188 4.639-2.58 1.53-5.52 2.81-8.75 3.935-3.23 1.12-6.75 2.11-10.344 3.231-3.46 1.03-7.05 2.2-10.562 3.769s-6.93 3.55-10.031 6.047c-1.74 1.42-3.3 3.02-4.625 4.804s-2.4 3.73-3.188 5.798a18.234 18.234 0 0 0 -1.219 6.917c.049 2.34.541 4.69 1.469 6.875 1.11 2.56 2.84 4.74 4.938 6.461 2.1 1.72 4.56 2.97 7.156 3.728 2.46.679 4.93.822 7.226.579m6.714-2.093c1.37-.738 2.47-1.51 3.404-2.379 1.48-1.39 2.34-2.72 2.875-3.728.535-1.01.762-1.71.813-1.947.139-.653.172-1.37.125-2.112a8.26 8.26 0 0 0 -.381-1.987" fill="none" stroke="url(#h)" stroke-width=".3"/>
<path d="m91.75-67.375-37.314 18.283" fill="none" stroke="#000" stroke-width=".1"/>
<path d="m91.5-69.5v3h3v-3h-2.5zm.5.5h2v2h-2zm-40.5 19.5v3h3v-3h-2.5zm.5.5h2v2h-2z"/>
<path d="m91.75-67.375-37.314 18.283" fill="none" filter="url(#g)" stroke="#000" stroke-width=".2"/>
<path d="m71-59.5v2.5h2.5v-2.5z"/>
<path d="m77.368-34.608v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298zm-20.436 12.651v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298zm28.546-7.461v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298z" opacity=".4"/>
</g>
<g transform="matrix(1.5414 0 0 1.5414 -55.76 120.88)" mask="url(#e)" opacity=".28">
<path d="m83.97-33.8c-.578-.335-1.18-.541-1.782-.581-1.96-.132-4.14.534-5.625 1.615-1.08.786-2.19 2.1-2.5 3.645-.102.507-.679.992-.969 1.201s-.67.42-1.094.58c-.663.256-1.6.337-2.625.207-2.22-.352-4.04-1.78-5.188-3.52-1.3-2.28-1.49-4.94-1-7.289.557-2.58 2.18-5.24 4.438-7.621 2-2.15 4.57-4 7.469-5.633 2.9-1.64 6.1-3.05 9.313-4.432 9.18-3.75 19.3-8.45 25.156-15.448.726-.89 1.35-1.76 1.938-2.651v-3.81c-1.13 1.62-2.46 3.28-4.094 4.846-1.76 1.7-3.84 3.27-6.188 4.639-2.58 1.53-5.52 2.81-8.75 3.935-3.23 1.12-6.75 2.11-10.344 3.231-3.46 1.03-7.05 2.2-10.562 3.769s-6.93 3.55-10.031 6.047c-1.74 1.42-3.3 3.02-4.625 4.804s-2.4 3.73-3.188 5.798a18.234 18.234 0 0 0 -1.219 6.917c.049 2.34.541 4.69 1.469 6.875 1.11 2.56 2.84 4.74 4.938 6.461 2.1 1.72 4.56 2.97 7.156 3.728 2.46.679 4.93.822 7.224.579m6.716-2.093c1.37-.738 2.47-1.51 3.404-2.379 1.48-1.39 2.34-2.72 2.875-3.728.535-1.01.762-1.71.813-1.947.139-.653.172-1.37.125-2.112a8.21 8.21 0 0 0 -.367-1.944" fill="none" stroke="url(#h)" stroke-width=".13"/>
<path d="m91.75-67.375-37.314 18.283" fill="none" stroke="#000" stroke-width=".1"/>
<path d="m91.5-69.5v3h3v-3h-2.5zm.5.5h2v2h-2zm-40.5 19.5v3h3v-3h-2.5zm.5.5h2v2h-2z"/>
<path d="m91.75-67.375-37.314 18.283" fill="none" filter="url(#g)" stroke="#000" stroke-width=".2"/>
<path d="m71-59.5v2.5h2.5v-2.5z"/>
<path d="m77.368-34.608v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298zm-20.436 12.651v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298zm28.546-7.461v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298z" opacity=".4"/>
</g>
</svg>
Output with file&sourcecode&picture
<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<radialGradient id="b" cx="64" cy="64" r="47.5" fx="63.79" fy="47.28" gradientTransform="matrix(1.6842 -.0843 .0689 1.3759 -48.2 -18.66)" gradientUnits="userSpaceOnUse">
<stop stop-color="#fff" offset="0"/>
<stop stop-color="#fff" stop-opacity="0" offset="1"/>
</radialGradient>
<filter id="d">
<feGaussianBlur stdDeviation="1.002"/>
</filter>
<mask id="e">
<path d="m50.444-73.209c-.22 0-.324.152-.324.324v70.694a.98.98 0 0 0 .973.973l35.682.02c.034 0 .647-.005 1.095 0 6.55-2.59 16.5-14.6 22.29-20.407.958-1.08.723-.747.943-1.874v-49.407c0-.209-.106-.324-.324-.324z" fill="url(#f)" opacity=".85"/>
</mask>
<radialGradient id="f" cx="64" cy="64" r="47.5" fx="63.79" fy="47.28" gradientTransform="matrix(1.0926 -.0547 .0447 .8926 7.5 -90.83)"/>
<filter id="g">
<feGaussianBlur stdDeviation=".278"/>
</filter>
<radialGradient id="h" cx="73.97" cy="-42.72" r="29.65" gradientTransform="matrix(1.9051 0 0 1.9929 -66.95 42.6)" gradientUnits="userSpaceOnUse">
<stop offset="0"/>
<stop stop-opacity="0" offset="1"/>
</radialGradient>
<path d="m18.5 9c-.34 0-.5.235-.5.5v107.97c0 .822.679 1.5 1.5 1.5l54.5.031c.053 0 3.27-.008 3.964 0 6.54-4.5 22.6-22 31.583-30.955 1.48-1.66.458-.37 1.454-1.608v-76.938c0-.323-.163-.5-.5-.5z" fill="url(#b)" opacity=".85"/>
<g transform="matrix(1.5414 0 0 1.5414 -55.76 120.88)" filter="url(#d)" mask="url(#e)" opacity=".62">
<path d="m83.952-33.81c-.573-.329-1.17-.531-1.765-.571-1.96-.132-4.14.534-5.625 1.615-1.08.786-2.19 2.1-2.5 3.645-.102.507-.679.992-.969 1.201s-.67.42-1.094.58c-.663.256-1.6.337-2.625.207-2.22-.352-4.04-1.78-5.188-3.52-1.3-2.28-1.49-4.94-1-7.289.557-2.58 2.18-5.24 4.438-7.621 2-2.15 4.57-4 7.469-5.633 2.9-1.64 6.1-3.05 9.313-4.432 9.18-3.75 19.3-8.45 25.156-15.448.726-.89 1.35-1.76 1.938-2.651v-3.81c-1.13 1.62-2.46 3.28-4.094 4.846-1.76 1.7-3.84 3.27-6.188 4.639-2.58 1.53-5.52 2.81-8.75 3.935-3.23 1.12-6.75 2.11-10.344 3.231-3.46 1.03-7.05 2.2-10.562 3.769s-6.93 3.55-10.031 6.047c-1.74 1.42-3.3 3.02-4.625 4.804s-2.4 3.73-3.188 5.798a18.234 18.234 0 0 0 -1.219 6.917c.049 2.34.541 4.69 1.469 6.875 1.11 2.56 2.84 4.74 4.938 6.461 2.1 1.72 4.56 2.97 7.156 3.728 2.46.679 4.93.822 7.226.579m6.714-2.093c1.37-.738 2.47-1.51 3.404-2.379 1.48-1.39 2.34-2.72 2.875-3.728.535-1.01.762-1.71.813-1.947.139-.653.172-1.37.125-2.112a8.26 8.26 0 0 0 -.381-1.987" fill="none" stroke="url(#h)" stroke-width=".3"/>
<path d="m91.75-67.375-37.314 18.283" fill="none" stroke="#000" stroke-width=".1"/>
<path d="m91.5-69.5v3h3v-3h-2.5zm.5.5h2v2h-2zm-40.5 19.5v3h3v-3h-2.5zm.5.5h2v2h-2z"/>
<path d="m91.75-67.375-37.314 18.283" fill="none" filter="url(#g)" stroke="#000" stroke-width=".2"/>
<path d="m71-59.5v2.5h2.5v-2.5z"/>
<path d="m77.368-34.608v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298zm-20.436 12.651v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298zm28.546-7.461v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298z" opacity=".4"/>
</g>
<g transform="matrix(1.5414 0 0 1.5414 -55.76 120.88)" mask="url(#e)" opacity=".28">
<path d="m83.97-33.8c-.578-.335-1.18-.541-1.782-.581-1.96-.132-4.14.534-5.625 1.615-1.08.786-2.19 2.1-2.5 3.645-.102.507-.679.992-.969 1.201s-.67.42-1.094.58c-.663.256-1.6.337-2.625.207-2.22-.352-4.04-1.78-5.188-3.52-1.3-2.28-1.49-4.94-1-7.289.557-2.58 2.18-5.24 4.438-7.621 2-2.15 4.57-4 7.469-5.633 2.9-1.64 6.1-3.05 9.313-4.432 9.18-3.75 19.3-8.45 25.156-15.448.726-.89 1.35-1.76 1.938-2.651v-3.81c-1.13 1.62-2.46 3.28-4.094 4.846-1.76 1.7-3.84 3.27-6.188 4.639-2.58 1.53-5.52 2.81-8.75 3.935-3.23 1.12-6.75 2.11-10.344 3.231-3.46 1.03-7.05 2.2-10.562 3.769s-6.93 3.55-10.031 6.047c-1.74 1.42-3.3 3.02-4.625 4.804s-2.4 3.73-3.188 5.798a18.234 18.234 0 0 0 -1.219 6.917c.049 2.34.541 4.69 1.469 6.875 1.11 2.56 2.84 4.74 4.938 6.461 2.1 1.72 4.56 2.97 7.156 3.728 2.46.679 4.93.822 7.224.579m6.716-2.093c1.37-.738 2.47-1.51 3.404-2.379 1.48-1.39 2.34-2.72 2.875-3.728.535-1.01.762-1.71.813-1.947.139-.653.172-1.37.125-2.112a8.21 8.21 0 0 0 -.367-1.944" fill="none" stroke="url(#h)" stroke-width=".13"/>
<path d="m91.75-67.375-37.314 18.283" fill="none" stroke="#000" stroke-width=".1"/>
<path d="m91.5-69.5v3h3v-3h-2.5zm.5.5h2v2h-2zm-40.5 19.5v3h3v-3h-2.5zm.5.5h2v2h-2z"/>
<path d="m91.75-67.375-37.314 18.283" fill="none" filter="url(#g)" stroke="#000" stroke-width=".2"/>
<path d="m71-59.5v2.5h2.5v-2.5z"/>
<path d="m77.368-34.608v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298zm-20.436 12.651v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298zm28.546-7.461v1.946h1.946v-1.946zm.324.324h1.298v1.298h-1.298z" opacity=".4"/>
</g>
</svg>
<linearGradient id="c" xlink:href="#a"/>
gets removed
Copyright of the picture
License: LGPLv3
Author: The Oxygen Team, KDE
Source: https://github.com/KDE/oxygen-icons5
Details: https://commons.wikimedia.org/wiki/File:Oxygen480-mimetypes-image-svg%2Bxml-compressed.svg