Texen
  1. Texen
  2. TEXEN-4

Add support for <property> and <propertyset> nested elements to TexenTask.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.6
    • Labels:
      None

      Description

      I would like to be able to use nested <property> and <propertyset> elements as in

      <texen ...>
      <property name="..." value="..."/>
      <propertyset .../>
      </texen>

      and then have the properties available in the Velocity context.

      Note that Ant allows namespaces and dots whereas Velocity does not (i.e. dots have a different meaning). So an Ant property name like 'ns:a.b.c' would become something like ns_a_b_c in Velocity context.

      1. TexenTask.java.diff
        18 kB
        Hilco Wijbenga
      2. texen.xml.diff
        1 kB
        Hilco Wijbenga
      3. texen.tar.bz2
        10 kB
        Hilco Wijbenga
      4. patch.txt
        28 kB
        Hilco Wijbenga

        Issue Links

          Activity

          Hide
          Will Glass-Husain added a comment -

          Given how close we are to feature freeze, I'm going to mark this as unscheduled until I have a chance to review and confirm all pieces are present.

          Show
          Will Glass-Husain added a comment - Given how close we are to feature freeze, I'm going to mark this as unscheduled until I have a chance to review and confirm all pieces are present.
          Hide
          Will Glass-Husain added a comment -

          Hilco - were you going to attach some files?

          Show
          Will Glass-Husain added a comment - Hilco - were you going to attach some files?
          Hide
          Hilco Wijbenga added a comment -

          This is the actual patch; test cases are on their way too.

          Show
          Hilco Wijbenga added a comment - This is the actual patch; test cases are on their way too.
          Hide
          Hilco Wijbenga added a comment -

          The contents of the attached tarball is listed below.

          The patch itself (code & documentation):
          src/java/org/apache/velocity/texen/ant/TexenTask.java.diff
          xdocs/docs/texen.xml.diff

          Test stuff:
          test/texen/compare/nested_elements.txt
          test/texen/templates/nested_elements.vm
          test/texen/templates/Control.vm.diff
          test/texen-classpath/compare/nested_elements.txt
          test/texen-classpath/jar-contents/nested_elements.vm
          test/texen-classpath/jar-contents/Control.vm.diff
          test/texen-classpath/test.jar
          src/test/org/apache/velocity/test/TexenTestCase.java.diff
          src/test/org/apache/velocity/test/TexenClasspathTestCase.java.diff
          build/testcases.xml.diff

          Show
          Hilco Wijbenga added a comment - The contents of the attached tarball is listed below. The patch itself (code & documentation): src/java/org/apache/velocity/texen/ant/TexenTask.java.diff xdocs/docs/texen.xml.diff Test stuff: test/texen/compare/nested_elements.txt test/texen/templates/nested_elements.vm test/texen/templates/Control.vm.diff test/texen-classpath/compare/nested_elements.txt test/texen-classpath/jar-contents/nested_elements.vm test/texen-classpath/jar-contents/Control.vm.diff test/texen-classpath/test.jar src/test/org/apache/velocity/test/TexenTestCase.java.diff src/test/org/apache/velocity/test/TexenClasspathTestCase.java.diff build/testcases.xml.diff
          Hide
          Will Glass-Husain added a comment -

          Sounds very promising.

          Sorry to be obnoxious about this, but...

          Could you submit this as one diff? It's really easy. Just go to the root velocity directory and type

          svn diff . > patch.txt

          It's much much easier to apply. It also captures all new files automatically.

          Thanks again for contributing.

          Show
          Will Glass-Husain added a comment - Sounds very promising. Sorry to be obnoxious about this, but... Could you submit this as one diff? It's really easy. Just go to the root velocity directory and type svn diff . > patch.txt It's much much easier to apply. It also captures all new files automatically. Thanks again for contributing.
          Hide
          Hilco Wijbenga added a comment -

          I didn't realise diff could be used like this. Very nice! The attached file is exactly what you suggested: 'svn diff .' in the velocity directory.

          I had to remove test/texen-classpath/test.jar (since it's binary) so please rerun test/texen-classpath/mkjar.sh before checking in!

          Show
          Hilco Wijbenga added a comment - I didn't realise diff could be used like this. Very nice! The attached file is exactly what you suggested: 'svn diff .' in the velocity directory. I had to remove test/texen-classpath/test.jar (since it's binary) so please rerun test/texen-classpath/mkjar.sh before checking in!
          Hide
          Will Glass-Husain added a comment -

          what is test.jar? It's very unusual to store a jar file in source control?

          Show
          Will Glass-Husain added a comment - what is test.jar? It's very unusual to store a jar file in source control?
          Hide
          Will Glass-Husain added a comment -

          never mind, I get it. Maybe we could have the ant script generate this.

          Show
          Will Glass-Husain added a comment - never mind, I get it. Maybe we could have the ant script generate this.
          Hide
          Will Glass-Husain added a comment -

          marking this for 1.5

          Show
          Will Glass-Husain added a comment - marking this for 1.5
          Hide
          Henning Schmiedehausen added a comment -

          Missed the 1.5 boat.

          Show
          Henning Schmiedehausen added a comment - Missed the 1.5 boat.
          Hide
          Barrie Treloar added a comment -

          Adding to the context is similar to specifying a new contextProperties as per TEXEN-11

          Show
          Barrie Treloar added a comment - Adding to the context is similar to specifying a new contextProperties as per TEXEN-11

            People

            • Assignee:
              Unassigned
              Reporter:
              Hilco Wijbenga
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development