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 141859 - .xsd design tab shows error even though .xsd file is verified successfully
Summary: .xsd design tab shows error even though .xsd file is verified successfully
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P4 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-28 12:21 UTC by faramir2
Modified: 2016-07-07 09:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot taken in "inter" state when undo from "now" to "before" (30.04 KB, image/jpeg)
2008-07-30 13:12 UTC, faramir2
Details

Note You need to log in before you can comment on or make changes to this bug.
Description faramir2 2008-07-28 12:21:13 UTC
I don't know how to reproduce this, but it appears ofter. I'm editing .xsd file in source tab.
Sometimes I change tab to "Design" or "Schema", even when .xsd doesn't validate.
Then I correct .xsd file. WHen I try to change to design tab, its empty with that message:
"<the schema is invalid. Please run the validator from Source view and fix all errors.>"

The xsd file is validating. Schema tab also work. After saving file with another filename, "Design" tab opens without 
error.

Closing and reopening file doesn't work too. I don't see any "refresh" button to refresh memory with that file. 
Restarting NetBeans only works for me.

I'm editing that file without opening any project.
Comment 1 Samaresh Panda 2008-07-28 21:11:35 UTC
Should be easy to reproduce if it appears often. Give it a shot. You may be able to reproduce. Until then I'm going to
mark it as P4.
Comment 2 faramir2 2008-07-30 13:11:15 UTC
It isn't easy.. It looks like randomly doesn't refresh source/validation.

Now I'm editing good (validating) XML file and changed one sequence to three choices and after changing tab to "Design" 
it doesn't show any error, but Validating said:
"ERROR: s4s-elt-invalid-content.1: The content of 'vchange' is invalid.  Element 'choice' is invalid, misplaced, or 
occurs too often."

I see other bug, maybe related to this, but I don't know whether add another issue for it. For now I post it here. 
Screenshot was taken when I do undo (from version "now" to version "before" in "inter").

Here is my part of my XML file:

* before change:
    <complexType name="vchange">
        <annotation>
            <documentation>Main node to store information about changes</documentation>
        </annotation>
        <sequence minOccurs="0">
            <element name="changes" minOccurs="0" maxOccurs="1" type="tns:changes"/>
            <element name="variables" minOccurs="0" type="tns:variables"/>
            <element name="include" type="tns:include" minOccurs="0" maxOccurs="unbounded"/>
        </sequence>
    </complexType>

* inter (for screenshot only):
    <complexType name="vchange">
        <annotation>
            <documentation>Main node to store information about changes</documentation>
        </annotation>
        <choice minOccurs="0">
            <element name="changes" minOccurs="0" maxOccurs="1" type="tns:changes"/>
            <element name="variables" minOccurs="0" type="tns:variables"/>
            <element name="include" type="tns:include" minOccurs="0" maxOccurs="unbounded"/>
        </choice>
    </complexType>

* now:
    <complexType name="vchange">
        <annotation>
            <documentation>Main node to store information about changes</documentation>
        </annotation>
        <choice minOccurs="0">
            <element name="changes" minOccurs="0" maxOccurs="1" type="tns:changes"/>
        </choice>
        <choice minOccurs="0">
            <element name="variables" minOccurs="0" type="tns:variables"/>
        </choice>
        <choice minOccurs="0">
            <element name="include" type="tns:include" minOccurs="0" maxOccurs="unbounded"/>
        </choice>
    </complexType>
Comment 3 faramir2 2008-07-30 13:12:47 UTC
Created attachment 66047 [details]
screenshot taken in "inter" state when undo from "now" to "before"
Comment 4 Martin Balin 2016-07-07 09:56:31 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss