The DITA-OT project has found that filtering first provides several benefits. Consider the
following sample that contains a <note> element that both uses conref and contains a @product
attribute:
If the @conref attribute is evaluated first, then documentA must be parsed in order to retrieve the note content. That content is then stored in the current document (or in a representation of that document in memory). However, if all content with product="MyProd" is filtered out, then that work is all discarded later in the build.
If the filtering is done first (as in the DITA-OT), this element is discarded immediately, and documentA is never examined. This provides several important benefits:
If the order of these two steps is reversed, so that conref is evaluated first, it is possible
that results will differ. For example, in the code sample above, the @product attribute will
override the product setting on the referencing note. Assume that the <note> elements in
documentA is defined as
follows:
A process that filters out product="SomeOtherProduct" will remove the target of the original conref before that conref is ever evaluated, which will result in a broken reference. Evaluating conref first would resolve the reference, and only later filter out the target of the conref. While some use cases can be found where this is the desired behavior, benefits such as those described above resulted in the current processing order used by the DITA-OT..