Solved

XML Schema (XSD File)

Posted on 2009-07-08
5
396 Views
Last Modified: 2012-05-07
I am writing my first XSD schema file for validating incoming orders for product and/or literature.  My error seems to be related to identifying a sub-grouping of order items - I want one sub-group for Products and one sub-group for Collateral (literature).  I thought I was following an example but somewhere I'm not referencing the ComplexType ("t:ProductDetails" and "t:CollateralDetails").  Can anyone see what I'm doing incorrectly?  The error I'm receiving first is:
"t:ProductDetails" must refer to an existing simple or complex type.

The XSD file is attached.  
0
Comment
Question by:VDanner
  • 3
  • 2
5 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
Comment Utility
maybe you should attach the schema

- you might not have defined the simple or complex types as named types on a global level
- or there might be a namespace issue in that the "t:" prefixed namespace is not the default one
0
 

Author Comment

by:VDanner
Comment Utility
I didn't realize I could not add files of extension "xsd".  Attached is the xsd file in Textpad format.
LSOrderSchema.txt
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
Comment Utility
namespace issue.
t:OrderDetails is in the sqlserver namespace.
So, you will have to import that schema to make th efull schema valid
0
 

Author Comment

by:VDanner
Comment Utility
Thanks, I don't think I fully understand the whole namespace issue as yet, as I wanted all this to be a single schema.  
0
 
LVL 60

Expert Comment

by:Geert Bormans
Comment Utility
well, the question is then, do you really need OrderDetails to be of this type
simply make it
<xs:element name="OrderDetails" type="xs:string"/>
or if it is a complex type, copy the definition of that complex type in your own schema
and use it like this
<xs:element name="OrderDetails" type="OrderDetails"/>
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now