Details

    • Type: Improvement
    • Status: Closed (View workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects versions: 0.7
    • Fix versions: 0.8
    • Components: Module API
    • Labels:
      None

      Description

      Would like to use XPath inside cargo code in order to manipulate configurations, so need to choose an xpath implementation dependency.

      – Original Message –
      Hi there

      I have been doing some more work on support for merging within cargo
      (beyond the existing patches).

      What I'm currently adding is a way of manipulating the files that need
      to be merged beyond the simple 'overwrite or preserve' that is in the
      current patches.

      For example, if you use spring, you commonly have (in web.xml)

      <context-param>
      <param-name>applicationContextConfig</param-name>
      <param-value>context.xml</param-value>
      <context-param>

      If you're merging, you should concatenate the configs together to get
      <context-param>
      <param-name>applicationContextConfig</param-name>
      <param-value>context.xml myOtherContext.xml</param-value>
      <context-param>

      So - what I'm envisioning is a configuration that would say something
      like 'for applicationContextConfig, the output should be

      <context-param>
      <param-name>$left:/param-name</param-name>
      <param-value>$left:/param-value $right:/param-value</param-value>
      </context-param>

      Where $left:/param-value is composed of
      $left: - an instruction to use the left hand item in the merge
      /param-value - an XPath to the value to use

      My current test implementation is just using XPathAPI from the 1.5
      JVM, so obviously I would need to use a different implementation that
      is happy on all systems - something like xalan would need to be added
      as a dependency.

      WDYT?

        Attachments

          Activity

            People

            • Assignee:
              nigelmagnay Nigel Magnay (Inactive)
              Reporter:
              nigelmagnay Nigel Magnay (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: