We help IT Professionals succeed at work.

XML Schema (XSD File)

VDanner
VDanner asked
on
Medium Priority
442 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.  
Comment
Watch Question

Gertone (Geert Bormans)Information Architect
CERTIFIED EXPERT
Top Expert 2006

Commented:
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

Author

Commented:
I didn't realize I could not add files of extension "xsd".  Attached is the xsd file in Textpad format.
LSOrderSchema.txt
Information Architect
CERTIFIED EXPERT
Top Expert 2006
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks, I don't think I fully understand the whole namespace issue as yet, as I wanted all this to be a single schema.  
Gertone (Geert Bormans)Information Architect
CERTIFIED EXPERT
Top Expert 2006

Commented:
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"/>
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.