473,382 Members | 1,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Are there known limitations to enforcing facet restrictions in xsd?

Following xsd
*****************************
<?xml version="1.0" encoding="utf-8" ?><xs:schema id="EmployeesSchema" targetNamespace="http://tempuri.org/EmployeesSchema.xsd" elementFormDefault="qualified
xmlns="http://tempuri.org/EmployeesSchema.xsd" xmlns:mstns="http://tempuri.org/EmployeesSchema.xsd
xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:simpleType name="ZipCode"><xs:restriction base="xs:positiveInteger"><xs:pattern value="\d{5}" /></xs:restriction></xs:simpleType><xs:complexType name="Address"><xs:sequence><xs:element name="Name" type="xs:string" /><xs:element name="Street" type="xs:string" /><xs:element name="State" type="xs:string" /><xs:element name="Zip" type="ZipCode" /></xs:sequence></xs:complexType><xs:element name="EmployeeList"><xs:complexType><xs:sequence>< xs:element name="Employee"><xs:complexType><xs:sequence><xs:e lement name="Email" type="xs:string" /><xs:element name="Password" type="xs:string" /><xs:element name="HomeAddress" type="Address" /><xs:element name="OtherAddress" type="Address" /></xs:sequence></xs:complexType></xs:element></xs:sequence></xs:complexType></xs:element></xs:schema

******************

does not enforce the
<xs:pattern value="\d{5}" /

restriction.

There seem to be differences between new and older version of VS .Net on this. And using Visual Studio only to create this xsd, then creating an xml based on the xsd, followed by creating a new xsd based on this xml, does not create identical xsd as would be expected. The restriction piece is gone in the new xsd (using newest demo version of VS .NET)

Adding data to the xml using VS does not enforce the constraint, neither does a simple app with a dataset and datagrid. I have tried various facets with no luck

Rgds
O
Nov 16 '05 #1
0 1019

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Xamle Eng | last post by:
I am looking for a data oriented schema-enforcing XML editor. By schema-enforcing I mean an editor that doesn't just have a button to verify the schema - I want an editor that actively enforces it...
1
by: kosaraju.puneeth | last post by:
hi, I am writing a pattern facet which will recognise Current/voltages Values. example: <xs:pattern value ="?**]?V]|**]?mV]|**]?uV]|**]?nV]"/>
2
by: Shailendra Batham | last post by:
Hello Gurus, I want to put some restrictions on my attribute tag in my XML Schema, anyone out there have any idea how to do that. here is my XML and the XML Schema <?xml version="1.0"...
2
by: Frosty | last post by:
Howto make datagrid enforce rules of xml schema? Created xml schema in the designer. Constraints created there using the following <xs:simpleType name="zipcode"><xs:restriction...
2
by: Bajgon | last post by:
Hello, I have got a DataGrid and a DataTable, which is its DataSource. I can use DataTable.Rows.Find(key_value) method to locate any row in the DataTable, using values of key column. The...
1
by: David Johnson | last post by:
I am using Forms Authentication. What is best practice of enforcing each user to only be permitted to run a single instance of the application. I would like to enforce this even if the...
2
by: Jeff Stewart | last post by:
Does VB.NET provide a mechanism for enforcing exception handling? I've used other languages that can have "throws ..." clauses added to method declarations, but I can't find anything like that for...
1
by: Paul van Brouwershaven | last post by:
Hi All, I'm struggling with the WDSL restrictions in PHP/SOAP for a while know. I would like to create some simple restrictions in my WDSL file. The script are running both on the same server...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.