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 239315

Summary: XML editor doesn't detect error in well formedness
Product: xml Reporter: ionuion <ionuion>
Component: Text-EditAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P1    
Version: 8.0   
Hardware: PC   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description ionuion 2013-12-10 14:03:39 UTC
Environment:
Product Version: NetBeans IDE Dev (Build 201312100002)
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b59
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b117
System: Mac OS X version 10.8.5 running on x86_64; UTF-8; en_US (nb)

1. Open a Java project.
2. Add a new XML Document (anywhere).
3. Paste the following content:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">

   
    <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
        <property name="basename" value="messages"/>
    </bean> 

    <bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/>

    <bean name="/springapp/hello.htm" class="springapp.web.InventoryController"/>
        <property name="productManager" ref="productManager"/>
    </bean> 

    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"></property>
        <property name="prefix" value="/WEB-INF/jsp/"></property>
        <property name="suffix" value=".jsp"></property>        
    </bean>            
</beans>


Expected result:
error detected at line 20.

Actual result:
The parser doesn't notify user of anything.
Comment 1 Svata Dedic 2013-12-16 08:25:23 UTC
It's sad, but the feature is not available. The bad news is that a standard XML parsing and validation would bail out on the 1st error (either syntax or schema conformance) and it's very hard to recover and continue in order to provide reasonable error indicators through the file.

A simple XML parsing/validation scan should be relatively easy, though.

[not specific to macos X]