Tapestry 5
  1. Tapestry 5
  2. TAP5-370

Error from DocumentLinker about missing <html> tag, even for XML document w/o JavaScript

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.0.16
    • Fix Version/s: 5.1.0.0, 5.0.17
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Haven't verified this yet, but the scenario is:

      A page that generates an XML response, with no root <html> element.

      An error anyway about the missing <html>.

      My current theory is that Tapestry is injecting CSS and causing the error.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        1m 40s 1 Howard M. Lewis Ship 19/Nov/08 17:06
        In Progress In Progress Closed Closed
        2h 57m 1 Howard M. Lewis Ship 19/Nov/08 20:03
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.1.0.0 [ 12313428 ]
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.0.17 [ 12313530 ]
        Resolution Fixed [ 1 ]
        Mark Shead made changes -
        Comment [ Here is the error I'm getting:
        The root element of the rendered document was <smbxml>, not <html>. A root element of <html> is needed when linking JavaScript and stylesheet resources.

        Here is the page that is causing the issue for me:

        package net.xeric.client.lywa.pages;

        import java.util.List;

        import net.xeric.client.lywa.model.TaskBlueprint;
        import net.xeric.client.lywa.model.TaskSequence;

        import org.apache.tapestry5.annotations.Meta;
        import org.apache.tapestry5.annotations.Persist;
        import org.apache.tapestry5.annotations.Property;
        @Meta("tapestry.response-content-type=text/xml")
        public class EventXML {
        @Persist
        @Property
        private TaskSequence aSequence;
        @Persist
        private List<TaskSequence> sequenceList;
        @Persist
        @Property
        private TaskBlueprint aTask;

        public String getDueDate() {
        //snip
        }

        public List<TaskSequence> getSequenceList() {
        return sequenceList;
        }

        public void setSequenceList(List<TaskSequence> sequenceList) {
        this.sequenceList = sequenceList;
        }

        }

        TML page:
        <?xml version="1.0" encoding="UTF-8" ?>
        <!DOCTYPE smbxml SYSTEM "http://www.netledger.com/xml/dtd/smb_4_11.dtd">
        <smbxml xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
        <t:loop source="sequenceList" value="aSequence">
          <t:loop source="aSequence.tasks" value="aTask">
            <request><add><task>
                <title>${aTask.messageText} for ${aSequence.customerName}</title>
                <assignedRef><name>${aTask.assignedRef}</name></assignedRef>
                <startDate>${dueDate}</startDate>
                <dueDate>${dueDate}</dueDate>
                <statusRef><name>Not Started</name></statusRef>
                <accessLevel>Public</accessLevel>
                <taskOwnerRef><name>${aTask.taskOwnerRef}</name></taskOwnerRef>
                <sendEmail>FALSE</sendEmail>
                <messageText>${aTask.messageText} for ${aSequence.customerName}</messageText>
                <customFieldValues><customFieldValue name="Event">${aSequence.eventRef}</customFieldValue></customFieldValues>
                <companyList><companyLine><companyRef><name>${aSequence.customerRef}</name></companyRef></companyLine></companyList>
            </task></add></request>
            </t:loop>
        </t:loop>
        </smbxml>

        ]
        Howard M. Lewis Ship made changes -
        Summary Error from DocumentLinker about missing <html>tag, even for XML document w/o JavaScript Error from DocumentLinker about missing <html> tag, even for XML document w/o JavaScript
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development