Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-699

XHTML namespace declaration in template with layout causes java.lang.IllegalStateException: This markup writer does not have a current element.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 5.1.0.5
    • 5.1.0.5
    • tapestry-core
    • None

    Description

      Repro steps:
      1. Create a new tapestry webapp using the archetype (v 5.1.0.5)
      2. Add the XHTML xmlns declaration to Index.tml
      <html t:type="layout" title="webAppA Index"
      t:sidebarTitle="Current Time"
      >> xmlns="http://www.w3.org/1999/xhtml"
      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
      xmlns="tapestry:parameter">

      Causes this error:
      Render queue error in DefineNamespace[ http://www.w3.org/1999/xhtml]: This markup writer does not have a current element. The current element is established with the first call to element() and is maintained across subsequent calls.
      java.lang.IllegalStateException: This markup writer does not have a current element. The current element is established with the first call to element() and is maintained across subsequent calls.

      Declaring the default namespace for an XML document is the "right" thing to do - it defines the namespace for all the non-prefixed XML in the body. Unfortunately this currently isn't possible.

      Changing the markup to:
      <t:layout title="webAppA Index"
      t:sidebarTitle="Current Time"
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
      xmlns="tapestry:parameter">
      results in the same error.

      Attachments

        1. webAppA.zip
          48 kB
          John Crim

        Activity

          People

            Unassigned Unassigned
            john-medio John Crim
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: