Home » Developer & Programmer » JDeveloper, Java & XML » XSD type reference (Jdeveloper 12c, Windows 7 64-bit)
XSD type reference [message #644244] Sun, 01 November 2015 18:56 Go to next message
mzaidi
Messages: 3
Registered: November 2015
Junior Member
Hello,
I'm trying to use a complexType as a reference to another complexType,but Jdev doesn't seem to be able to find the reference to the complexType even though its on the same document. Here's an example of what I'm talking about:

<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="www.example.com"
xmlns="http://www.w3.org/2001/XMLSchema">

<complexType name="AddressInfo">
<sequence>
<element type="string" name="FirstName"/>
<element type="string" name="LastName"/>
<element type="string" name="Street"/>
<element type="string" name="City"/>
<element type="string" name="State"/>
<element type="short" name="ZipCode"/>
<element type="long" name="PhoneNumber"/>
</sequence>
</complexType>
<complexType name="Billing">
<sequence>
<element name="PaymentCardName" type="string"/>
<element name="PaymentCardNumber" type="long"/>
<element name="ExpirationDate" type="short" />
<element name="BillingAddress" type="AddressInfo" />
</sequence>
</complexType>
Jdev will tell me that the reference to the type="AddressInfo" can't be located even though it's in the document. I also tried labeling the each one as an element complexType and that didn't work either. I'm new to building big chained XSDs, so I would really appreciate any help.

[Updated on: Sun, 01 November 2015 23:41]

Report message to a moderator

Re: XSD type reference [message #644273 is a reply to message #644244] Mon, 02 November 2015 08:10 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
can you open XML above using any standard Browser?
Re: XSD type reference [message #644281 is a reply to message #644273] Mon, 02 November 2015 09:16 Go to previous messageGo to next message
mzaidi
Messages: 3
Registered: November 2015
Junior Member
Yes I can open the XML in a standard browser, but do browsers verify that everything in use is correct, or if there is an error?
Re: XSD type reference [message #644283 is a reply to message #644281] Mon, 02 November 2015 09:21 Go to previous message
mzaidi
Messages: 3
Registered: November 2015
Junior Member
Okay I opened it in a browser and it seemed to come up perfectly, and to make sure its working correctly I changed something obvious to have an error and the whole XSD in the browser turned grey, when I corrected the error the XSD in the browser is still grey instead of being in it's color-coated form. I'm not sure what I'm not doing correctly here.
Previous Topic: XML Parsing Help
Next Topic: sql query help to fetch sub string from xml
Goto Forum:
  


Current Time: Thu Mar 28 20:17:30 CDT 2024