Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.4
    • Component/s: None
    • Labels:
      None

      Description

      DOCTYPEs specified in T5 templates either cause exceptions to be thrown, or are not output into the final HTML, depending on the DOCTYPE used. The DOCTYPES need to be configurable somewhere, preferrably in the template itself, just like T4.

      1. render_doctype.patch
        13 kB
        Robert Zeigler
      2. patch.txt
        33 kB
        Robert Zeigler
      3. patch.txt
        28 kB
        Robert Zeigler
      4. doctype_handling.patch
        22 kB
        Robert Zeigler

        Issue Links

          Activity

          Hide
          Howard M. Lewis Ship added a comment -

          Great patch! Thanks!

          Show
          Howard M. Lewis Ship added a comment - Great patch! Thanks!
          Hide
          Robert Zeigler added a comment -

          Sorry for the confusion... I said "patch, take4", so I probably should have named the file patch_4 or some such. But the right patch is the 28kb attachment entitled "patch.txt" (the 2nd file in the list of patches above). And the new files are in that patch. As much as I would love to have deleted the incorrect patches, I don't have permission to do so.

          Show
          Robert Zeigler added a comment - Sorry for the confusion... I said "patch, take4", so I probably should have named the file patch_4 or some such. But the right patch is the 28kb attachment entitled "patch.txt" (the 2nd file in the list of patches above). And the new files are in that patch. As much as I would love to have deleted the incorrect patches, I don't have permission to do so.
          Hide
          Howard M. Lewis Ship added a comment -

          I'm not seeing the new files inside patch4.

          Show
          Howard M. Lewis Ship added a comment - I'm not seeing the new files inside patch4.
          Hide
          Robert Zeigler added a comment -

          patch, take4. Apologies, the "index" locations in the previous patch was messed up.
          Fixed now.

          Show
          Robert Zeigler added a comment - patch, take4. Apologies, the "index" locations in the previous patch was messed up. Fixed now.
          Hide
          Robert Zeigler added a comment -

          take 3...

          Includes everything patch2 contained, plus the new files (DTD, DTDToken, etc.)

          Show
          Robert Zeigler added a comment - take 3... Includes everything patch2 contained, plus the new files (DTD, DTDToken, etc.)
          Hide
          Robert Zeigler added a comment -

          Did you need a new patch containing just the new files, or a new patch containing everything that last patch contained, + the new files?

          Show
          Robert Zeigler added a comment - Did you need a new patch containing just the new files, or a new patch containing everything that last patch contained, + the new files?
          Hide
          Howard M. Lewis Ship added a comment -

          I really appreciate the effort you are putting into this; the latest patch applied well, but doesn't seem to include the NEW classes, such as DTD and DTDToken. Please create a new patch, or just attach the new files (if that is easier).

          Show
          Howard M. Lewis Ship added a comment - I really appreciate the effort you are putting into this; the latest patch applied well, but doesn't seem to include the NEW classes, such as DTD and DTDToken. Please create a new patch, or just attach the new files (if that is easier).
          Hide
          Robert Zeigler added a comment -

          Fresh patch against current svn contents.

          Show
          Robert Zeigler added a comment - Fresh patch against current svn contents.
          Hide
          Howard M. Lewis Ship added a comment -

          Woops, I fixed TAPESTRY-1353 first and am having trouble applying this patch; I would really appreciate it if you could update the patch against SVN trunk. Thanks!

          Show
          Howard M. Lewis Ship added a comment - Woops, I fixed TAPESTRY-1353 first and am having trouble applying this patch; I would really appreciate it if you could update the patch against SVN trunk. Thanks!
          Hide
          Robert Zeigler added a comment -

          Attaching a patch for handling of doctypes, including tests. Note that this patch incorporates Daniel Gredler's changes
          for TAPESTRY-1353, so by applying this patch, you will be applying that patch, as well, with some minor changes (small changes to his tests so they pass with the addition of an extra template token added by DTD's).

          Show
          Robert Zeigler added a comment - Attaching a patch for handling of doctypes, including tests. Note that this patch incorporates Daniel Gredler's changes for TAPESTRY-1353 , so by applying this patch, you will be applying that patch, as well, with some minor changes (small changes to his tests so they pass with the addition of an extra template token added by DTD's).
          Hide
          Robert Zeigler added a comment -

          Again, I think that internally mapping the html DTD's to their XML counterparts is a viable solution, now that Daniel submitted the local DTD patch...

          I've got things working locally to "pass through" doctypes from templates to the client, following a "first doctype encountered wins" principle.

          I'll submit a patch later.

          Show
          Robert Zeigler added a comment - Again, I think that internally mapping the html DTD's to their XML counterparts is a viable solution, now that Daniel submitted the local DTD patch... I've got things working locally to "pass through" doctypes from templates to the client, following a "first doctype encountered wins" principle. I'll submit a patch later.
          Hide
          Daniel Gredler added a comment -

          As Howard mentions on the wiki http://tapestry.apache.org/tapestry5/tap5devwiki.html#ComponentTemplates, the HTML DTDs aren't valid XML DTDs, causing problems for XML parsers http://www.thescripts.com/forum/thread88141.html.

          The alternative is to use an XHTML DTD. However, many people recommend not using XHTML if you want to remain standards-compliant http://hsivonen.iki.fi/doctype/ http://annevankesteren.nl/2004/06/invalid-html. HTML 4 Strict is definitely the path of least resistance for standards-compliance...

          Of course if you can't use HTML DTDs in the template DOCTYPEs, but users want to use HTML entities (  © > etc) then T5 users might find themselves in the position of having to declare their templates to be XHTML documents, but configuring T5 to serve up HTML documents. Blah.

          Show
          Daniel Gredler added a comment - As Howard mentions on the wiki http://tapestry.apache.org/tapestry5/tap5devwiki.html#ComponentTemplates , the HTML DTDs aren't valid XML DTDs, causing problems for XML parsers http://www.thescripts.com/forum/thread88141.html . The alternative is to use an XHTML DTD. However, many people recommend not using XHTML if you want to remain standards-compliant http://hsivonen.iki.fi/doctype/ http://annevankesteren.nl/2004/06/invalid-html . HTML 4 Strict is definitely the path of least resistance for standards-compliance... Of course if you can't use HTML DTDs in the template DOCTYPEs, but users want to use HTML entities (  © > etc) then T5 users might find themselves in the position of having to declare their templates to be XHTML documents, but configuring T5 to serve up HTML documents. Blah.

            People

            • Assignee:
              Howard M. Lewis Ship
              Reporter:
              Daniel Gredler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development