not sure this is right (same for later occurrences). The `@href` attributes should really be resolved to their own base URI. If the element has its own `xml:base`, using `$base` is wrong.