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.
Product Version = NetBeans IDE Dev (Build 201110200600) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.7.0 Runtime = Java HotSpot(TM) Client VM 21.0-b17 given this page: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <p> <h:outputLabel styleClass="label" for="name" value="#{msg.lblAppellation}:"/> <h:message for="name" id="msgName" styleClass="errorMessage"/> <br/> <h:inputText styleClass="input" id="name" value="#{editRequest.request.name}" required="true" requiredMessage="#{msg.msgValueNeeded}" maxlength="50"> <f:ajax event="blur" render="@this msgName"/> </h:inputText> </p> <p> <h:outputLabel styleClass="label" for="email" value="#{msg.lblMail}:"/> <h:message for="email" id="msgEmail" styleClass="errorMessage"/> <br/> <h:inputText styleClass="input" id="email" value="#{editRequest.request.email}" required="true" requiredMessage="#{msg.msgValueNeeded}" maxlength="50"> <f:ajax event="blur" render="@this msgEmail"/> <f:validator validatorId="EmailValidator"/> </h:inputText> </p> </ui:composition> Pressing {Alt}+{Shift}+{f} will format this page as shown above. But, this page does not contain a <html> tag. Its a pure xml file containing some well formed tags. Thus, I'd like to remove the DOCTYPE information. Doing so and pressing {Alt}+{Shift}+{f} will destroy the formatting, even though the document is still well formed. Thi sis the result of formatting: <?xml version='1.0' encoding='UTF-8' ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <p> <h:outputLabel styleClass="label" for="name" value="#{msg.lblAppellation}:"/> <h:message for="name" id="msgName" styleClass="errorMessage"/> <br/> <h:inputText styleClass="input" id="name" value="#{editRequest.request.name}" required="true" requiredMessage="#{msg.msgValueNeeded}" maxlength="50"> <f:ajax event="blur" render="@this msgName"/> </h:inputText> </p> <p> <h:outputLabel styleClass="label" for="email" value="#{msg.lblMail}:"/> <h:message for="email" id="msgEmail" styleClass="errorMessage"/> <br/> <h:inputText styleClass="input" id="email" value="#{editRequest.request.email}" required="true" requiredMessage="#{msg.msgValueNeeded}" maxlength="50"> <f:ajax event="blur" render="@this msgEmail"/> <f:validator validatorId="EmailValidator"/> </h:inputText> </p> </ui:composition> This is ugly for this _small_ page. Its non-usable for a _normal_ or _big_ page. :(
reproducible - bug. this happens if the doctype cannot be determined and a default is used. As a workaround use the hint at the very first line "change project default to xhtml1.0" for all xhtml files w/o doctype".
fixed in web-main#db3f5338be8a