Solved

XML Schema (XSD File)

Posted on 2009-07-08
5
403 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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

705 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