Skip to content

Document and decide xlink resolution approach #6043

Closed

Description

@SueValente

What: Based on SPIKE findings, implement the agreed approach for handling xlinks in ISO records.

If Option A (resolve at harvest time):

  • Add an xlink resolution step before MDTranslator is called
  • For each xlink:href in the raw ISO XML, make an HTTP GET request to the referenced URL
  • Replace the xlink element with the fetched content inline
  • Handle failures gracefully: log, continue without the field, do not fail the record
  • Add timeout and retry logic appropriate for external service calls
  • Test with the Census NGDC endpoints

If Option B (pass through and accept gaps):

  • Document the known gap in a harvester README or decision record
  • Confirm that fill_placeholders handles all fields that would be empty due to unresolved xlinks
  • Add a warning log when an unresolved xlink is detected

If Option C (require agencies to use inline values):

  • Draft publisher guidance for resources.data.gov explaining the limitation
  • Add a harvest warning (not error) when unresolved xlinks are detected in a record

Done When:

  • PM has chosen an option
  • Chosen option is implemented
  • Decision is documented in the harvester repo

Notes:

  • Option A adds latency per-record. For a WAF with hundreds of records this is significant. Consider whether xlink resolution should be cached across records in the same harvest run.
  • The NGDC docucomp endpoints used by Census are the most common xlink targets in federal ISO records. Test specifically with these.
  • Option C is only viable if agencies can actually update their ISO records -- not always within their control.

Activity

  1. rshewitt commented on Jun 5, 2026

    @rshewitt
    Contributor

    we currently do option A but for 1 situation and it's sufficient for DCATUS 1.1. We haven't heard of any data quality issues recently concerning lack of information making it into our catalog. If we're using the 1.1 to 3.0 python translator script then pulling from xlinks with the intention of them making it into 3 isn't guaranteed because mdtranslator only goes to 1.1.

  2. moved this from O&M Backlog to 📥 Queue in data.gov team boardon Jun 27, 2026
  3. moved this from 📥 Queue (ready but not in sprint) to Not Ready/Draft in data.gov team boardon Jul 24, 2026
  4. moved this from Not Ready/Draft to 📟 Sprint Backlog (Top Priority) in data.gov team boardon Sep 8, 2026
  5. rshewitt commented on Sep 10, 2026

    @rshewitt
    Contributor

    are data providers reaching out about this issue? i'm under the impression that we're not investing anymore into mdtranslator @SueValente or is that not true?

  6. moved this from 📟 Sprint Backlog (Top Priority) to Not Ready/Draft in data.gov team boardon Sep 14, 2026
  7. marcos-nieto-usds commented on Oct 14, 2026

    @marcos-nieto-usds
    Contributor

    MDTranslator related. This can potentially be closed since the value add is very specific. If we get reached out for this, we can look into working towards this again. Majority of use cases around this has been resolved hence no further investigation is needed.
    @jpyuda thoughts on the priority here.

  8. moved this from ✔ Done to Not Ready/Draft in data.gov team boardon Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions