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 147831 - "Generate Sample Xml" creates unrequested qualifications
Summary: "Generate Sample Xml" creates unrequested qualifications
Status: RESOLVED WONTFIX
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-22 08:47 UTC by juan_neufeld
Modified: 2016-07-07 09:57 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 juan_neufeld 2008-09-22 08:47:52 UTC
If I "Generate Sample Xml", it always generates an unrequested qualifier (ns0). I will use the example provided by SUN 
in the article "Namespaces in XML Schemas, Part 1: An Introduction, Chris Webster and Marina Sum, Updated: October 30, 
2006".
Here is the "po.XSD":

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

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	 xmlns="http://www.w3.org/2001/XMLSchema/po.xsd"
	 targetNamespace="http://www.w3.org/2001/XMLSchema/po.xsd">
             
<xsd:element name="purchaseOrder" type="PurchaseOrderType"/>

 <xsd:element name="comment" type="xsd:string"/>

 <xsd:complexType name="PurchaseOrderType">
   <xsd:sequence>
     <xsd:element name="shipTo" type="xsd:string"/>
     <xsd:element name="billTo" type="xsd:string"/>
     <xsd:element ref="comment" minOccurs="0"/>
   </xsd:sequence>
   <xsd:attribute name="orderDate" type="xsd:date"/>
  </xsd:complexType>
 </xsd:schema>

This is the generated SAMPLE XML (po.xml). Please note the  "nso":

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

<!--
    Document   : po.xml
    Created on : 22 de septiembre de 2008, 04:23
    Author     : Hans
    Description:
        Purpose of the document follows.
-->

<ns0:purchaseOrder  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
   xmlns:ns0='http://www.w3.org/2001/XMLSchema/po.xsd'
   xsi:schemaLocation='http://www.w3.org/2001/XMLSchema/po.xsd po.xsd'>
        <ns0:shipTo></ns0:shipTo>
        <ns0:billTo></ns0:billTo>

</ns0:purchaseOrder>

Thank you.
Comment 1 Samaresh Panda 2008-09-22 17:59:50 UTC
Agreed. OTOH, some users may want to qualify. So I guess the best solution is to ask the user and this requires a change
in UI, which can't be done for 6.5. We'll fix it after 6.5.
Comment 2 Samaresh Panda 2008-11-17 23:42:15 UTC
Valid one, we should fix it for 7.0.
Comment 3 Martin Balin 2016-07-07 09:57:05 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