Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to create our own boolean type in XSD?

Posted on 2014-04-17
3
Medium Priority
?
301 Views
Last Modified: 2014-04-17
Hi,

One of my XML element <TaxDocumentationRequired> should have either 'Y' or 'N'.

I did as below - but still it did not work for me.
It says "Type 'http://www.w3.org/2001/XMLSchema:myBoolean' " is not declared.

<xs:element type="xs:myBoolean" name="TaxDocumentationRequired"/>

<xs:simpleType name="myBoolean">
      <xs:restriction base="xs:string">
            <xs:enumeration value="Y"/>
            <xs:enumeration value="N"/>
      </xs:restriction>
</xs:simpleType>

Can anyone help please?
0
Comment
Question by:GouthamAnand
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 2000 total points
ID: 40006945
you can't declare types in the xs schema namespace,
it needs to be in the targetNamespace

<xs:element type="myBoolean" name="TaxDocumentationRequired"/>

should work
0
 

Author Closing Comment

by:GouthamAnand
ID: 40006957
Thanks a lot.
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 40007076
welcome
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

972 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