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 92794 - Schema from tutorial is not valid
Summary: Schema from tutorial is not valid
Status: CLOSED INVALID
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@xml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-18 17:27 UTC by Mikhail Matveev
Modified: 2007-02-01 14:55 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 2007-01-18 17:27:49 UTC
1. Create new schema.
2. Switch to Source view.
3. Replace content to following (see below, taken from tutorial
http://www.netbeans.org/kb/55/xmltools-analyzeschema.html).
4. Switch to Schema view.
5. Validate schema.
Result: errors come.

D:/Documents and Settings/Misha/JavaApplication6/src/newLoanHistory.xsd:10,12
src-resolve: Cannot resolve the name 'la:LoanType' to a(n) 'type definition'
component.

D:/Documents and Settings/Misha/JavaApplication6/src/newLoanApplication.xsd:2,0
src-import.3.1: The namespace attribute,
'http://xml.netbeans.org/examples/LoanApplication', of an <import> element
information item must be identical to the targetNamespace attribute,
'http://xml.netbeans.org/examples/targetNS', of the imported document.


Schema source:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://xml.netbeans.org/examples/targetNS"
            xmlns:tns="http://xml.netbeans.org/examples/targetNS"
            xmlns:la="http://xml.netbeans.org/examples/LoanApplication"
            elementFormDefault="qualified">
    <xsd:import namespace="http://xml.netbeans.org/examples/LoanApplication"
schemaLocation="newLoanApplication.xsd"/>
    <xsd:complexType name="PriorLoan">
        <xsd:sequence>
            <xsd:element name="Type" type="la:LoanType"></xsd:element>
            <xsd:element name="State" type="la:StateType"></xsd:element>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="History" type="tns:PriorLoan"></xsd:element>
</xsd:schema>
Comment 1 htt 2007-01-18 18:51:13 UTC
A majority of the steps in the tutorials are meant to be done in certain order.
 One of the prerequisites in "XML Schema Tools: Analyzing XML Schemas" is
"Opening a Sample XML Schema," in which sample LoanApplication schema is
added/created.  Once this is in place, the described steps will work correctly.
Comment 2 htt 2007-01-22 18:18:53 UTC
See previous comment...