C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » XML »

What is XSD in xml


Posted Date: 21 Jul 2008      Posted By: sharmila      Member Level: Silver     Points: 1   Responses: 5



hai everyone,


I want to know what is xsd and how to use in our xml document...i have read in w3schools...but i couldnt understand.tell me clearly


thank u





Responses

Author: madhavi    21 Jul 2008Member Level: SilverRating: 2 out of 52 out of 5     Points: 3

xsd file ( xml shema) means in this we declare the structure of
the xml file

by using this shema we write the xml file it gives the intelisence



Author: shanmukha kumari    21 Jul 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 6

An XML Schema describes the structure of an XML document.

The XML Schema language is also referred to as XML Schema Definition (XSD).
One of the greatest strength of XML Schemas is the support for data types.

With support for data types:

It is easier to describe allowable document content
It is easier to validate the correctness of data
It is easier to work with data from a database
It is easier to define data facets (restrictions on data)
It is easier to define data patterns (data formats)
It is easier to convert data between different data types

XML Schemas use XML Syntax
Another great strength about XML Schemas is that they are written in XML.

Some benefits of that XML Schemas are written in XML:

You don't have to learn a new language
You can use your XML editor to edit your Schema files
You can use your XML parser to parse your Schema files
You can manipulate your Schema with the XML DOM
You can transform your Schema with XSLT

XML Schemas Secure Data Communication
When sending data from a sender to a receiver, it is essential that both parts have the same "expectations" about the content.

With XML Schemas, the sender can describe the data in a way that the receiver will understand.

A date like: "03-11-2004" will, in some countries, be interpreted as 3.November and in other countries as 11.March.

However, an XML element with a data type like this:

<date type="date">2004-03-11</date>

ensures a mutual understanding of the content, because the XML data type "date" requires the format "YYYY-MM-DD".

XML Schemas are Extensible
XML Schemas are extensible, because they are written in XML.

With an extensible Schema definition you can:

Reuse your Schema in other Schemas
Create your own data types derived from the standard types
Reference multiple schemas in the same document


Well-Formed is not Enough
A well-formed XML document is a document that conforms to the XML syntax rules, like:

it must begin with the XML declaration
it must have one unique root element
start-tags must have matching end-tags
elements are case sensitive
all elements must be closed
all elements must be properly nested
all attribute values must be quoted
entities must be used for special characters
Even if documents are well-formed they can still contain errors, and those errors can have serious consequences.

Think of the following situation: you order 5 gross of laser printers, instead of 5 laser printers. With XML Schemas, most of these errors can be caught by your validating software.



Author: mahalakshmi    21 Jul 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 6

hi,

XML Schema Definition (XSD) language is the current standard schema language for all XML documents and data.
The XML Schema definition language (XSD) enables you to define the structure and data types for XML documents. An XML Schema defines the elements, attributes, and data types that conform to the World Wide Web Consortium (W3C) XML Schema Part 1: Structures Recommendation for the XML Schema Definition Language. The W3C XML Schema Part 2: Datatypes Recommendation is the recommendation for defining data types used in XML schemas. The XML Schema Reference (XSD) is based on the W3C 2001 Recommendation specifications for Datatypes and for Structures.
An XML Schema is composed of the top-level schema element.


There is the following list of essential XSD Schema Elements:

# <XSD Schema>
# <Attribute>
# <Element>
# <ComplexType>
# <SimpleType>
# <Sequence>



# <Choice>
# <All>
# <Restriction>
# <Union>
# <List>
# <Facet>
# <Any>



# <AnyAttribute>
# <group>
# <AttributeGroup>
# <Annotation>
# <Documentation>
# <AppInfo>

reference:
http://en.wikipedia.org/wiki/XML_Schema_%28W3C%29
http://msdn.microsoft.com/en-us/library/x6c1kb0s(VS.71).aspx



Author: Ratheesh    21 Jul 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 1

XML Schema is a language for describing the structure and constraining the contents of XML documents. Stylus Studio® 2008 XML Release 2 supports XML Schema editing, conversion, validation, documentation generation and much more. Select from the list below to learn more about Stylus Studio® 2008 XML Release 2's advanced support for XML Schema development

refer....
http://www.stylusstudio.com/xml_schema.html



Author: Sabu C Alex    31 Jul 2008Member Level: GoldRating: 2 out of 52 out of 5     Points: 6

XML Schema, published as a W3C recommendation in May 2001, is one of several XML schema languages. It was the first separate schema language for XML to achieve Recommendation status by the W3C. Like all XML schema languages, XML Schema can be used to express a schema: a set of rules to which an XML document must conform in order to be considered 'valid' according to that schema. However, unlike most other schema languages, XML Schema was also designed with the intent that determination of a document's validity would produce a collection of information adhering to specific data types. Such a post-validation infoset can be useful in the development of XML document processing software, but the schema language's dependence on specific data types has provoked criticism.

An XML Schema instance is an XML Schema Definition (XSD) and typically has the filename extension ".xsd". The language itself is sometimes informally referenced as XSD. It has been suggested that WXS (for W3C XML Schema) is a more appropriate initialism[1] though this acronym has not been in a widespread use and W3C working group rejected it. XSD is also an initialism for XML Schema Datatypes, the datatype portion of XML Schema.



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : xslt
Previous : How to remove namespace attribute from a xml file ?
Return to Discussion Forum
Post New Message
Category: XML

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use