?
Solved

XML Schema (XSD File)

Posted on 2009-07-08
5
Medium Priority
?
406 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 24806858
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
ID: 24806869
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 2000 total points
ID: 24806908
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
ID: 24807001
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
ID: 24807106
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

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

770 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