This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 68837 - XHTML files should be treated as HTML
Summary: XHTML files should be treated as HTML
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 69025 72558 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-16 17:56 UTC by Petr Jiricka
Modified: 2009-05-18 10:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2005-11-16 17:56:10 UTC
From John Jullion-Ceccarelli:

"Just noticed that HTML files with the XHTML DTD are showing up as XML
nodes instead of HTML nodes in the IDE. Should they be treated as  HTML
nodes instead? I was pretty surprised to see them as HTML, had just
copied and pasted most of them and didn't know that they were XHTML,
definitely most of the docs that are listed on testwww are not  correctly
structured as XHTML docs. Think that users might be similarly confused."

In particular, the following features are missing:

- Code completion specific for HTML
- Palette with HTML code clips
Comment 1 Petr Pisl 2005-11-16 18:12:24 UTC
Some things are hardcoded and maybe we will not have time to fix it in nb50
timeframe.
Comment 2 Jiri Kopsa 2005-11-19 15:09:58 UTC
However, XML features should be retained.
Comment 3 Marek Fukala 2005-11-21 12:08:58 UTC
*** Issue 69025 has been marked as a duplicate of this issue. ***
Comment 4 Marek Fukala 2005-11-21 12:17:40 UTC
I am affraid that the not working CC is caused by Issue #58297. If the DOCTYPE
is correctly defined the CC should work similar to the HTML one. I am also
affraid that preserving the XML features will be hard to achaive once we switch
the XHTML to HTMLDataObject.
Comment 5 Petr Jiricka 2006-07-31 13:12:47 UTC
I am also afraid that preserving all XML features will be very hard. But given
the choice between HTML features and XML features, HTML are much more important. 
It sounds like the fix for this should be very easy - just a change in the MIME
types. Let's reevaluate for 5.5.

Also, issue 72558 looks very similar to this - possibly a duplicate?

> not working CC is caused by Issue #58297.
Are you sure? That one looks completely unrelated (installer).
Comment 6 Marek Fukala 2006-07-31 14:58:13 UTC
*** Issue 72558 has been marked as a duplicate of this issue. ***
Comment 7 Marek Fukala 2006-07-31 15:03:46 UTC
The "easy fix" with just changing the mime resolver is not that trivial. Once I
do that the HTML DO is used for xhtml files but the CC is still not working -
see issue 58291. Easy workaround for 58291 would be to use the HTML 4.01 DTD
even for the XHTML files which would cause some inconsistences, but the overall
impression would be better.
Comment 8 Marek Fukala 2006-07-31 15:56:59 UTC
fixed:
---------------
<MIME-resolver>
    <file>
        <ext name="xml"/>
        <resolver mime="application/xhtml+xml">
            <xml-rule>
                <element name="html" ns="http://www.w3.org/1999/xhtml"/>
            </xml-rule>
        </resolver>
    </file>
    <file>
        <ext name="html"/>
        <ext name="htm"/>
        <ext name="shtml"/>
        <ext name="xhtml"/>
        <resolver mime="text/html"/>
    </file>
</MIME-resolver>
---------------

Checking in resolver.xml;
/cvs/html/src/org/netbeans/modules/html/resolver.xml,v  <--  resolver.xml
new revision: 1.1.26.2; previous revision: 1.1.26.1
done
Comment 9 Marek Fukala 2006-07-31 16:02:34 UTC
issue 58291 fixed as well so the CC in xhtmls works.
Comment 10 Jindrich Sedek 2006-08-09 14:34:25 UTC
Verified NetBeans 5.5Dev 200608090000