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 210577 - Generate DOM Tree scanner creates wrong code
Summary: Generate DOM Tree scanner creates wrong code
Status: REOPENED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-02 20:36 UTC by javydreamercsw
Modified: 2015-04-22 12:31 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
xsd file (31.15 KB, text/xsd+xml)
2012-04-02 20:39 UTC, javydreamercsw
Details
Valid xml file to parse (4.13 KB, text/xml)
2012-04-02 20:39 UTC, javydreamercsw
Details
dtd file (2.54 KB, text/x-dtd)
2012-04-02 20:39 UTC, javydreamercsw
Details
Generated scanner (28.20 KB, text/x-java)
2012-04-02 20:39 UTC, javydreamercsw
Details
Main method (1.64 KB, text/x-java)
2012-04-02 20:39 UTC, javydreamercsw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description javydreamercsw 2012-04-02 20:36:05 UTC
Product Version = NetBeans IDE Dev (Build 201203280401)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.7.0_03
Runtime = Java HotSpot(TM) Client VM 22.1-b02

I had an xsd file from which I generated the dtd (using the wizard). Then I generated the DOM Tree scanner from the dtd (using the wizard) but passing a file thruogh the scanner doesn't work (no matching).

See attachments for more details.
Comment 1 javydreamercsw 2012-04-02 20:39:40 UTC
Created attachment 117694 [details]
xsd file
Comment 2 javydreamercsw 2012-04-02 20:39:41 UTC
Created attachment 117695 [details]
Valid xml file to parse
Comment 3 javydreamercsw 2012-04-02 20:39:43 UTC
Created attachment 117696 [details]
dtd file
Comment 4 javydreamercsw 2012-04-02 20:39:44 UTC
Created attachment 117697 [details]
Generated scanner
Comment 5 javydreamercsw 2012-04-02 20:39:46 UTC
Created attachment 117698 [details]
Main method
Comment 6 Svata Dedic 2015-04-22 12:23:55 UTC
Fixed in jet-main#401bdf3e8364
Comment 7 Svata Dedic 2015-04-22 12:27:12 UTC
sorry :) wrong bug.
Comment 8 Svata Dedic 2015-04-22 12:31:36 UTC
I think there was a slight misunderstanding. The "Generate DTD" executed on a XML document generates a DTD which the document conforms to - just guesses what the DTD could be according to the document structure.

In your case, if you generated DTD out of XSD schema, you got actually a DTD for XML schemas. Then the generated scanner actually accepted the XSD syntax, not your XML documents (described by the original XML schemas).

So far so good; but it's a valid and needed (P1) enhancement to generate DOM/SAX scanner out of XSD description.