Uploaded image for project: 'Velocity Tools'
  1. Velocity Tools
  2. VELTOOLS-160

XmlTool: possibility to add NamespaceContext for XPath (find method)

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 3.0
    • Component/s: GenericTools
    • Labels:

      Description

      I inject in the Velocity context xmlf1 as an XmlTool instance corresponding with some user-defined input file. This allows the user to build the Velocity template using constructs like $xmlf1.OrderId and so on.
      This works great if the input xml does not contain namespaces.
      Otherwise, he has to write
      $xmlf1.find('//*[local-name()="OrderId"]/text()') which is much more complex.
      Can I pass-through some NamespaceContext instance to the XmlTool instance that I make available, so that a plain $xmlf1.OrderId also works ?

        Attachments

          Activity

            People

            • Assignee:
              cbrisson Claude Brisson
              Reporter:
              steven.vanvlierberghe steven van vlierberghe
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: