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 125842 - Sample schema generation doesn't work for purchaseOrder schema
Summary: Sample schema generation doesn't work for purchaseOrder schema
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-23 13:51 UTC by Mikhail Matveev
Modified: 2008-02-08 18:43 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 Mikhail Matveev 2008-01-23 13:51:35 UTC
1. Create newPurchaseOrder schema.
2. Create XML document constrained by this schema, select purchaseOrder as the root element and accept all other defaults.
Result: an empty file is generated (only header exists).
For newLoanApplication schema, content is generated.
Comment 1 Samaresh Panda 2008-01-23 15:58:36 UTC
I have tested this with various schemas but have not got into an empty document. Misha, is this consistent in all
platforms? Where did you see this issue and what JDK are you using?
Comment 2 Mikhail Matveev 2008-01-23 16:42:05 UTC
I checked build 200801220251 on WinXP, Linux and Solaris and got same results in each case.
JDK 1.6.0_02 and 1.6.0-b105

Below is content of generated file. 


<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : newXMLDocument2.xml
    Created on : 23 January 2008, 16:46
    Author     : Misha
    Description:
        Purpose of the document follows.
-->

<ns11:comment  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
   xmlns:ns11='http://xml.netbeans.org/examples/PurchaseOrder'
   xsi:schemaLocation='http://xml.netbeans.org/examples/PurchaseOrder newPurchaseOrder.xsd'>

</ns11:comment>
Comment 3 tonybeckham 2008-01-23 17:08:26 UTC
Reproduced with same results n Mac.

Product Version: NetBeans IDE Dev (Build 200801220251)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-119
System: Mac OS X version 10.5.1 running on i386; MacRoman; en_US (nb)
Comment 4 Samaresh Panda 2008-01-23 18:46:34 UTC
Looks like the wizard picks comment as the root element, even tho user selects po as the root element. There is no issue
with the generation part as such.
Comment 5 Samaresh Panda 2008-01-23 23:06:02 UTC
Fix integrated.
/cvs/xml/src/org/netbeans/modules/xml/wizard/XMLContentPanel.java,v  <--  XMLContentPanel.java
new revision: 1.5; previous revision: 1.4
Comment 6 Mikhail Matveev 2008-01-29 14:24:46 UTC
Still reproducible (WinXP) both for the last trunk build and the last M1 build.
Comment 7 Mikhail Matveev 2008-01-29 16:03:38 UTC
Sorry, I was wrong. It's fixed in trunk, and not fixed for M1 branch. If this is OK, please mark the issue as fixed.
Comment 8 Samaresh Panda 2008-01-29 21:42:59 UTC
Please double check before reopening. The issue was filed after M1 freeze (01/21), so the fix can't possibly be in M1.
Please verify with some new build.
Comment 9 tonybeckham 2008-02-08 18:43:04 UTC
Fix Verified, selecting purchaseOrder as root element works.

Product Version: NetBeans IDE Dev (Build 200802080008)
Java: 1.6.0_04; Java HotSpot(TM) Client VM 10.0-b19
System: Linux version 2.6.22-14-generic running on i386; UTF-8; en_US (nb)