Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1098

[Patch] logicsheet-util.xsl causes XSP Java class not to be compilable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.8
    • None
    • Blocks: (Undefined)
    • None
    • Operating System: other
      Platform: Other
    • 27871

    Description

      Hi,
      actually, I am addressing two issues found in logicsheet-util.xsl (that is
      usualy used in xsp logicsheets):

      1. Empty parameter 'default' is not tested correctly, because when used as
      <xsl:call-template name="get-string-parameter">
        <xsl:with-param name="name">fooparam</xsl:with-param>
        <xsl:with-param name="required">false</xsl:with-param>
        <xsl:with-param name="default"><xsp-request:get-parameter
      name="foo"/></xsl:with-param>
      </xsl:call-template>

      then the test
        xsl:if string-length($default) = 0
      obviously returns true but it should not.

      2. template get-nested-string produces invalid string literals because it
      doesn't always translate LF to single space as it should when converting
      <xsp:text/> to Java string.
      For example,
      <mylgs:mytag name="command">
        <mylgs:param name="value">
          <xsp:expr>request.getParameter("foo")</xsp:expr>
        </mylgs:param>
      </mylgs:mytag>

      produces expression simmilar to:

      ""
      + "
        "
      + request.getParameter("foo")

      I am providing patch for these changes and they both changes should be backward
      compatible.

      Attachments

        Activity

          People

            Unassigned Unassigned
            durdina@asset.sk Michal Durdina
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: