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 144244 - "generate sample xml" with recursive element enters in loop
Summary: "generate sample xml" with recursive element enters in loop
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:
: 144860 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-18 11:54 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-08-18 11:54:48 UTC
Trying to "generate sample xml" from an XSD (xml schema) with one recursive element, Netbeans enters into an infinite 
loop. This is the xsd source:
<?xml version="1.0" encoding="UTF-8"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://xml.netbeans.org/schema/RecursiveSchema"
            xmlns:tns="http://xml.netbeans.org/schema/RecursiveSchema"
            elementFormDefault="qualified">
    <xsd:complexType name="product_type">
        <xsd:sequence>
            <xsd:element name="part" type="tns:part_type"></xsd:element>
            <xsd:element name="product" type="tns:product_type"></xsd:element>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string"/>
    </xsd:complexType>
    <xsd:complexType name="part_type">
        <xsd:sequence/>
        <xsd:attribute name="name" type="xsd:string"/>
    </xsd:complexType>
    <xsd:element name="product" type="tns:product_type"/>
</xsd:schema>

This generates:
<ns0:product  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
   xmlns:ns0='http://xml.netbeans.org/schema/RecursiveSchema'
   xsi:schemaLocation='http://xml.netbeans.org/schema/RecursiveSchema RecursiveSchema.xsd'>
        <ns0:part name=""></ns0:part>
                <ns0:part name=""></ns0:part>
                        <ns0:part name=""></ns0:part>
                                <ns0:part name=""></ns0:part>
                                        <ns0:part name=""></ns0:part>
                                                <ns0:part name=""></ns0:part>
                                                        <ns0:part name=""></ns0:part>
  AND NEVER ENDS. Thank you.
Comment 1 Samaresh Panda 2008-08-18 15:12:46 UTC
Sonali, please extend from one of the visitors that break cycles.
Comment 2 Samaresh Panda 2008-08-22 14:37:15 UTC
*** Issue 144860 has been marked as a duplicate of this issue. ***
Comment 3 Martin Balin 2016-07-07 09:57:12 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