Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: Facelets/VDL
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      696
    • Status Whiteboard:
      Hide

      size_large importance_large

      Show
      size_large importance_large

      Description

      The XML declaration is added to the Facelets template to make the tooling happy,
      but Facelets allows this markup to pass straight through the browser. The
      problem is that there are certain browsers which choke (or behave differently)
      when the XML declaration is included in the rendered response.

      The XML declaration really has no business being in the rendered output, so the
      best approach is to have Facelets suppress this markup. But if there are
      developers who prefer it, perhaps because they are using Facelets to generate an
      XML feed, then there should be a setting somewhere that allows them to control
      the terminus of the declaration (either suppressed or passed through). This is
      no different than the "omitXmlDeclaration" setting on most XML printers,
      including XSLT.

      What's odd is that Facelets does not pass through the DTD declaration, which is
      arguably even more of a problem. However, there is an easy workaround. Simply
      include a DTD-generating tag.

        Activity

        mojavelinux created issue -
        Hide
        mojavelinux added a comment -

        Target milestone.

        Show
        mojavelinux added a comment - Target milestone.
        Hide
        mojavelinux added a comment -

        Also, the same problem exists for CDATA.

        We (quoting Andy Schwartz) run into similar problems with CDATA sections. For
        example, the following code uses the Trinidad trh:script component to insert a
        script into the page:

        <trh:script>
        <![CDATA[
        if (0 < 1) alert("Woohoo! Zero is less than one!");
        ]]>
        </trh:script>

        The CDATA section is meant to apply to the Facelets page itself - not to the
        generated content. That is, the CDATA section provides a way to tell the
        Facelets parser not to parse the specified character data. This is not intended
        to be used as an instruction to the browser (just to Facelets XML parser).
        However, Facelets passes the CDATA through to the browser. As a result, in the
        case where we render HTML content, we end up with bogus CDATA sections inside of
        our generated HTML document, which causes the browsers to get confused.

        Show
        mojavelinux added a comment - Also, the same problem exists for CDATA. We (quoting Andy Schwartz) run into similar problems with CDATA sections. For example, the following code uses the Trinidad trh:script component to insert a script into the page: <trh:script> <![CDATA[ if (0 < 1) alert("Woohoo! Zero is less than one!"); ]]> </trh:script> The CDATA section is meant to apply to the Facelets page itself - not to the generated content. That is, the CDATA section provides a way to tell the Facelets parser not to parse the specified character data. This is not intended to be used as an instruction to the browser (just to Facelets XML parser). However, Facelets passes the CDATA through to the browser. As a result, in the case where we render HTML content, we end up with bogus CDATA sections inside of our generated HTML document, which causes the browsers to get confused.
        Hide
        driscoll added a comment -

        Unforunately, unlike the xml declaration (which you'll almost always want to
        leave off, thanks MS), CDATA is something that you'll often want to include in
        your page.

        In fact, CDATA is something that users may want to include in the page sent to
        the browser in the same page as a CDATA block that they don't want to send to
        the browser. Ick.

        In the specific case mentioned, the Trinidad script component, it should be
        possible for the component to detect and properly process the included text -
        that's what Mojarra does for script tags, in fact.

        So, I'd love to see a different example, if anyone has one.

        Show
        driscoll added a comment - Unforunately, unlike the xml declaration (which you'll almost always want to leave off, thanks MS), CDATA is something that you'll often want to include in your page. In fact, CDATA is something that users may want to include in the page sent to the browser in the same page as a CDATA block that they don't want to send to the browser. Ick. In the specific case mentioned, the Trinidad script component, it should be possible for the component to detect and properly process the included text - that's what Mojarra does for script tags, in fact. So, I'd love to see a different example, if anyone has one.
        Hide
        mojavelinux added a comment -

        Update target milestone to 2.0 Rev a

        Show
        mojavelinux added a comment - Update target milestone to 2.0 Rev a
        Hide
        Ed Burns added a comment -

        cat2

        Show
        Ed Burns added a comment - cat2
        Hide
        Ed Burns added a comment -

        Move to 2.1

        Show
        Ed Burns added a comment - Move to 2.1
        Hide
        Ed Burns added a comment -

        edburns

        Show
        Ed Burns added a comment - edburns
        Hide
        Ed Burns added a comment -

        triage

        Show
        Ed Burns added a comment - triage
        Hide
        Ed Burns added a comment -

        GlassFish 3.1 M6 at the latest.

        Show
        Ed Burns added a comment - GlassFish 3.1 M6 at the latest.
        Hide
        Ed Burns added a comment -

        Move these to M5

        Show
        Ed Burns added a comment - Move these to M5
        Hide
        Ed Burns added a comment -

        Move to M4. Add ADF keyword because it's related to issue 697.

        Show
        Ed Burns added a comment - Move to M4. Add ADF keyword because it's related to issue 697.
        Hide
        Ed Burns added a comment -

        Created an attachment (id=262)
        Fix for this bug, first iteration.

        Show
        Ed Burns added a comment - Created an attachment (id=262) Fix for this bug, first iteration.
        Hide
        Ed Burns added a comment -

        Fix checked in. r8517

        Show
        Ed Burns added a comment - Fix checked in. r8517
        Hide
        Hanspeter Duennenberger added a comment -

        r=dueni

        Show
        Hanspeter Duennenberger added a comment - r=dueni
        Hide
        Ed Burns added a comment -

        add changelog_2_1 keyword

        Show
        Ed Burns added a comment - add changelog_2_1 keyword
        Hide
        Ed Burns added a comment -

        Ensure changelog_2_1 is in keywords list

        Show
        Ed Burns added a comment - Ensure changelog_2_1 is in keywords list
        Hide
        Ed Burns added a comment -

        This needs to be removed from the spec in favor of what we have in <facelets-processing>

        Show
        Ed Burns added a comment - This needs to be removed from the spec in favor of what we have in <facelets-processing>
        Hide
        Ed Burns added a comment -

        Roger.

        Show
        Ed Burns added a comment - Roger.
        Hide
        Ed Burns added a comment -

        Committed revision 8701.
        Rolled this out in favor of what we did on issue 490.

        Show
        Ed Burns added a comment - Committed revision 8701. Rolled this out in favor of what we did on issue 490.
        Hide
        Ed Burns added a comment -

        Resolved in issue 490.

        Show
        Ed Burns added a comment - Resolved in issue 490.
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 696 20301
        Ed Burns made changes -
        Fix Version/s 2.1 [ 10393 ]
        Fix Version/s 2.1_gf31_m4 [ 10399 ]
        Hide
        Manfred Riem added a comment -

        Closing resolved issue out

        Show
        Manfred Riem added a comment - Closing resolved issue out
        Manfred Riem made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            rogerk
            Reporter:
            mojavelinux
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: