Extend xref mechanism to support non-page targets
Currently, the xref mechanism is geared towards page references. It should be possible to reference any publishable resource, which includes images and attachments.
This can either by done by building on the existing xref macro (and xref
attribute on an image macro) to allow the target to be a non-page (e.g., xref:image$scheme_timing_diagrams.png[timing diagram]
) or by adding resource ID support to the link macro (and link
attribute on an image macro) (e.g. link:image$scheme_timing_diagrams.png[timing diagram]
). The former seems most appropriate.
In either case, the logic would be that if the family segment is present (e.g., image$
), it would be picked up as a resource ID. (If no family is present, the target must end in .adoc, which implies the pages family).