Uploaded image for project: 'Metadata Aggregator'
  1. Metadata Aggregator
  2. MDA-109

add stage to trim whitespace from start and end of text contents of selected elements

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.9.0
    • Component/s: DOM Metadata
    • Labels:
      None

      Description

      One common edgy practice is to put leading and/or trailing whitespace into metadata elements whose contents are defined as something like an anyURI. You can't strictly speaking rely on a consumer handling this as you expect, but in many cases it works anyway either because the consumer is schema-aware or performs either explicit or implicit trimming of its own.

      If you don't want to have the discussion about what is strictly correct, it would be valuable to have a stage which fixed things up on the fly by trimming leading and trailing whitespace from named elements.

      I think a Collection<QName> makes most sense as the selector. You could go for a single QName but I think you're more likely to have a number of elements to handle this on. Another alternative would be a String namespace and a Collection<String> for the elements in that namespace.

      I'm going to need one of these in the ukf-mda project fairly soon, so this is probably going to end up as a placeholder for pulling that back into the core code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ian@iay.org.uk Ian Young
              Reporter:
              ian@iay.org.uk Ian Young
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: