XalanJ2
  1. XalanJ2
  2. XALANJ-1774

Problem with reference to namespace prefix in AVT in XSLTC

    Details

    • Type: Bug Bug
    • Status: In Progress
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.6
    • Fix Version/s: None
    • Component/s: XSLTC
    • Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.)
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      In some circumstances, XSLT permits attribute value templates to yield QName
      values. If the QName has a prefix, the prefix must have a namespace URI bound
      to it in the scope of the instruction on which the AVT appears. XSLTC
      currently produces the following error, because it does not maintain prefix
      information at run-time.

      ERROR: 'Namespace for prefix 'someprefix' has not been declared.'

      See the namespace140 conformance test.

      1. patch.j1774.txt
        30 kB
        Henry Zongaro

        Activity

        Hide
        Henry Zongaro added a comment -

        I believe the following instructions and functions are affected:

        xsl:element
        xsl:attribute
        key()
        format-number()
        system-property()
        element-available()
        function-available()

        Show
        Henry Zongaro added a comment - I believe the following instructions and functions are affected: xsl:element xsl:attribute key() format-number() system-property() element-available() function-available()
        Hide
        Henry Zongaro added a comment -

        Attaching patch that resolves the problem for xsl:element.

        Show
        Henry Zongaro added a comment - Attaching patch that resolves the problem for xsl:element.
        Hide
        Christine Li added a comment -

        The patch looks good to me. It correctly resolves the problem for xsl:element.

        Show
        Christine Li added a comment - The patch looks good to me. It correctly resolves the problem for xsl:element.
        Hide
        Henry Zongaro added a comment -

        Applied patch [1] to Subversion source repository.

        Note that my original comment in the bug report referred to the namespace140 test case. However, subsequent changes to XSLTC allowed namespace140 without actually resolving the problem described in this issue in general. The axes120 test case, in particular, continued to fail because of this bug, but passes with this patch applied.

        [1] http://issues.apache.org/jira/secure/attachment/12340618/patch.j1774.txt

        Show
        Henry Zongaro added a comment - Applied patch [1] to Subversion source repository. Note that my original comment in the bug report referred to the namespace140 test case. However, subsequent changes to XSLTC allowed namespace140 without actually resolving the problem described in this issue in general. The axes120 test case, in particular, continued to fail because of this bug, but passes with this patch applied. [1] http://issues.apache.org/jira/secure/attachment/12340618/patch.j1774.txt

          People

          • Assignee:
            Henry Zongaro
            Reporter:
            Henry Zongaro
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development