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 184580 - [69cat] XML: Extend "Generate DTD" command to "Generate DTD/Schema"
Summary: [69cat] XML: Extend "Generate DTD" command to "Generate DTD/Schema"
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0.1
Hardware: PC Windows Vista
: P2 normal with 4 votes (vote)
Assignee: issues@xml
: 29178 (view as bug list)
Depends on:
Reported: 2010-04-21 02:04 UTC by gliesian
Modified: 2011-11-04 18:20 UTC (History)
1 user (show)

See Also:
Exception Reporter:

Generate DTD/Schema Image (38.10 KB, image/jpeg)
2010-04-21 02:19 UTC, gliesian

Note You need to log in before you can comment on or make changes to this bug.
Description gliesian 2010-04-21 02:04:19 UTC
Right-clicking an XML file in NetBeans includes the menu option, "Generate DTD..."

In Altova XMLSpy, right-clicking an XML file includes a menu option, "Generate DTD/Schema..."

The attached images shows the dialog that is opened in XMLSpy.

The recommended enhancement is to provide similar functionality as has been done with XMLSpy.

Comment 1 gliesian 2010-04-21 02:19:19 UTC
Created attachment 97761 [details]
Generate DTD/Schema Image
Comment 2 gliesian 2010-05-03 18:22:38 UTC
FYI... Another Option:

IntelliJ IDEA Case Study:

Right-click XML file, Generate XSD Schemas from XML File.
Comment 3 gliesian 2010-05-03 18:23:12 UTC
*** Bug 29178 has been marked as a duplicate of this bug. ***
Comment 4 Sergey Lunegov 2010-05-05 14:38:34 UTC
This is new feature. Not defect.
Comment 5 gliesian 2010-06-04 16:05:17 UTC
Use Cases: W3C XML Schemas can be generated from instance documents with the Relaxer tool.  This tool can be used by NetBeans to perform the conversion.

Reference: "Generating DTDs from XML Instance Documents" from "Java & XML, 3rd Edition (O'Reilly).  Note that the Relaxer link has changed.
Comment 6 gliesian 2010-06-04 16:09:51 UTC
Oops... last section header should have said "Generating XML Schemas from Instance Documents" from page 30 of Java & XML, third edition.

relaxer -xsd [file].xml

DTDs can also be generated with relaxer:

"Generating DTDs from XML Instance Documents", page 25.

relaxer -dtd [file].xml

Note: I'm sure that relaxer isn't the only tool to perform these generations... I just don't know the other tools/APIs at this time.