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 184770 - Wrong Error Message: Attribute .. must be declared for element ..
Summary: Wrong Error Message: Attribute .. must be declared for element ..
Status: RESOLVED WONTFIX
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Validation (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-22 19:11 UTC by alibabashack
Modified: 2010-06-11 07:01 UTC (History)
0 users

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 alibabashack 2010-04-22 19:11:40 UTC
Create a module project and insert a new window element using the wizard. Open the layer.xml. Insert a new "attr" node inside one of the generated file nodes and specify a "name" attribute with some value. Insert another attribute that is not allowed in the file node (e.g. "stuff") with some value. 
example:
<filesystem>
    <folder name="Actions">
        <folder name="Window">
            <file name="my-sandbox-TestWindowAction.instance">
                <attr name="foo" stuff="bla"/>
                <attr name="component" methodvalue="my.sandbox.TestWindowTopComponent.findInstance"/>
                <attr name="displayName" bundlevalue="my.sandbox.Bundle#CTL_TestWindowAction"/>
                <attr name="instanceCreate" methodvalue="org.openide.windows.TopComponent.openAction"/>
            </file>
        </folder>
    </folder>
</filesystem>

Validate the layer.xml

The following wrong error will be detected:
Attribute "stuff" must be declared for element type "attr".

The correct message should be e.g. Attribute "stuff" is not allowed in element type "attr".

Should be SIMPLEFIX !?
Comment 1 Vladimir Yaroslavskiy 2010-06-11 07:01:37 UTC
It can't be fixed on NetBeans side, because JDK's parser from  com.sun.org.apache.xerces is used.