Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-17872

XHTML files parsed as HTML instead as XML

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • 4.3.x, 4.18.0.Final
    • 4.2.0.CR1
    • upstream
    • None

      Files with an XHTML extension which are not HTML documents (don't have any doctype) seem to be treated by JBDS as HTML files, not as XML files, despite being valid and correctly referencing namespaces.

      Specifically, this appears to happen when the root element uses the default namespace. It doesn't happen when the namespace of the root element is named.

      • The file src/main/webapp/table.xhtml triggers a lot of HTML problems, has root element in default namespace:
        <document xmlns:ui="http://java.sun.com/jsf/facelets" 
                  xmlns:f="http://java.sun.com/jsf/core"
                  xmlns="http://jboss.org/schema/seam/pdf">
        
            <image alignment="right" wrap="true" value="/jboss.jpg" /> 
            <font size="24"><paragraph spacingAfter="50">Table Test</paragraph></font>  
        ...
        </document>
        
        Unknown tag (document).
        table.xhtml
        /itext-web/src/main/webapp
        line 1
        HTML Problem
        
      • src/main/webapp/whyseam.xhtml doesn't trigger HTML problems, has root element in a named namespace:
        <p:document xmlns:ui="http://java.sun.com/jsf/facelets"
                    xmlns:f="http://java.sun.com/jsf/core"
                    xmlns:p="http://jboss.org/schema/seam/pdf"
                    title="Why Seam"
                    keywords="mykeyword"
                    subject="seam"
                    author="Seam Team"
                    creator="Seam PDF example app">
        
            <f:facet name="header">
                <p:font size="12">
                    <p:footer borderWidthTop="1" borderColorTop="blue" borderWidthBottom="0" alignment="center">Why Seam? [<p:pageNumber />]</p:footer>
                </p:font>
            </f:facet>
        ... 
        </p:document>
        

            jmaury@redhat.com Jeff MAURY
            rsmeral Ron Šmeral (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: