Related Topics

what is Protocols in Hindi

What is a Program in Hindi

What is a Secure Connection in Hindi

Introduction to WWW in Hindi

What are Development Tools in Hindi

What is a Web Browser in Hindi

What is a Server in Hindi

What is a UNIX Web Server in Hindi

What is Logging Users in Hindi

What is Dynamic IP Web Design in Hindi

Web Site Design Principles in Hindi

Site Planning in Hindi

Website Navigation in Hindi

what is Web Systems Architecture in Hindi

Architecture of Web-Based Systems in Hindi

Client-Server Architecture in Hindi

What is Caching in Hindi

: Proxies in Hindi

What is an Index in Hindi

What is a Load Balancer in Hindi

What is a Queue in Hindi

Web Application Architecture in Hindi

JavaScript in Hindi

Client-Side Scripting in Hindi

Introduction to Simple JavaScript in Hindi

: JavaScript Variables in Hindi

What is a Function in JavaScript in Hindi

What are Conditions in JavaScript in Hindi

What are Loops in JavaScript in Hindi

What is Repetition (Looping) in JavaScript? in Hindi

What is an Object in JavaScript in Hindi

JavaScript Own Objects in Hindi

DOM in Hindi

What is a Web Browser Environment in Hindi

Forms in JavaScript in Hindi

DHTML in Hindi

What are Events in DHTML in Hindi

Browser Control in JavaScript in Hindi

AJAX in Hindi

AJAX-based Web Application in Hindi

Alternatives to AJAX in Hindi

XML in Hindi

Uses of XML in Hindi

Simple XML in Hindi

XML Key Components in Hindi

What is DTD (Document Type Definition) in Hindi

XML with Application in Hindi

XSL in Hindi

XSLT in Hindi

Web Service in hindi

PHP in Hindi

Server-Side Scripting in Hindi

PHP Arrays in Hindi

PHP Functions in Hindi

PHP Forms in Hindi

Advanced PHP Databases in Hindi

Introduction to Basic Commands in PHP in Hindi

Server Connection in PHP in Hindi

Database Creation in PHP in Hindi

Understanding Database Selection in PHP in Hindi

PHPMyAdmin in Hindi

Database Bugs in Hindi

PHP Database Query in Hindi

Related Subjects

What is XML Schema (XSD) in Hindi

RGPV University / DIPLOMA_CSE / Web Technology

What is XML Schema (XSD) in Hindi

Definition of XML Schema (XSD)

XML Schema जिसे XSD (XML Schema Definition) कहा जाता है, एक ऐसा तरीका है जिससे हम किसी XML डॉक्यूमेंट की structure को define कर सकते हैं। इसका उपयोग यह सुनिश्चित करने के लिए किया जाता है कि XML डॉक्यूमेंट valid है और उसमें मौजूद elements और attributes का format पहले से तय नियमों के अनुसार ही है।

XML Schema की आवश्यकता क्यों होती है?

  • XML में data को describe किया जाता है, लेकिन किसी भी data की validity सुनिश्चित करने के लिए rules की आवश्यकता होती है।
  • XML Schema की मदद से हम यह तय कर सकते हैं कि XML डॉक्यूमेंट में कौन-कौन से elements होंगे, उनके data types क्या होंगे, और उनकी hierarchy कैसी होगी।
  • यह XML की data integrity और data validation में मदद करता है।

XML Schema और DTD में अंतर

  • XSD XML पर आधारित होता है जबकि DTD SGML पर आधारित होता है।
  • XSD में data types को define किया जा सकता है जबकि DTD में नहीं।
  • XSD में namespaces का सपोर्ट होता है, जो DTD में नहीं होता।
  • XSD अधिक readable और maintainable होता है क्योंकि यह XML की तरह ही दिखता है।

Features of XML Schema in Hindi

मुख्य विशेषताएँ (Key Features)

  • Data Type Support: XSD में built-in data types और custom data types दोनों को define किया जा सकता है।
  • Namespace Support: XML Schema namespaces को सपोर्ट करता है जिससे element naming conflicts नहीं होते।
  • Strong Typing: हर element और attribute के लिए type define किया जा सकता है।
  • Inheritance: Complex types को extend और restrict किया जा सकता है।
  • Structured Validation: XSD के द्वारा complex nested structures को validate किया जा सकता है।

Data Types in XML Schema in Hindi

Built-in Data Types

XML Schema में दो प्रकार के data types होते हैं:

  • Simple Types: जो केवल values को hold करते हैं, जैसे कि string, boolean, date, आदि।
  • Complex Types: जो elements और attributes का combination होते हैं।

Commonly Used Simple Data Types

Data Type Description (in Hindi)
string किसी भी टेक्स्ट के लिए
boolean true या false वैल्यू के लिए
decimal दशमलव संख्याओं के लिए
date तारीख के लिए (YYYY-MM-DD)
integer पूर्णांक के लिए

Custom Data Types

हम <xs:simpleType> और <xs:restriction> का उपयोग करके customized data types बना सकते हैं।

<xs:simpleType name="ageType">
  <xs:restriction base="xs:integer">
    <xs:minInclusive value="1"/>
    <xs:maxInclusive value="100"/>
  </xs:restriction>
</xs:simpleType>

Example of DTD and XML Schema in Hindi

DTD का उदाहरण

<!DOCTYPE student [
  <!ELEMENT student (name, age)>
  <!ELEMENT name (#PCDATA)>
  <!ELEMENT age (#PCDATA)>
]>

XML Schema (XSD) का उदाहरण

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="student">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="name" type="xs:string"/>
        <xs:element name="age" type="xs:integer"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

XML File Validating with XSD

<student xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="student.xsd">
  <name>Rahul</name>
  <age>22</age>
</student>

FAQs

DTD पुराने प्रकार की validation है जिसमें data types को specify नहीं किया जा सकता जबकि XML Schema में आप complex structures और data types दोनों define कर सकते हैं। XML Schema XML पर आधारित होता है और namespaces को सपोर्ट करता है, जबकि DTD SGML पर आधारित होता है।
XML Schema ज्यादा flexible, readable और powerful होता है। यह namespaces, data types, restrictions और inheritance को सपोर्ट करता है जो कि DTD में संभव नहीं है। इसके अलावा XML Schema खुद भी एक XML document होता है जिससे इसका structure और validation बेहतर होता है।
XML Schema में दो मुख्य प्रकार के data types होते हैं: Simple Types (जैसे string, integer, date) और Complex Types (जो elements और attributes का combination होते हैं)। Simple Types values को hold करते हैं जबकि Complex Types structure को define करते हैं।
Custom data type को <xs:simpleType> और <xs:restriction> टैग्स की मदद से define किया जाता है। इसमें आप किसी base type पर restrictions apply करके नया type बना सकते हैं जैसे value की minimum या maximum सीमा।
XML Schema का मुख्य उद्देश्य XML document की validity check करना होता है। यह सुनिश्चित करता है कि document का structure, data type, और hierarchy पूर्व निर्धारित नियमों के अनुसार है। यह data consistency और accuracy बनाए रखने में मदद करता है।
हां, XML Schema को XML डॉक्यूमेंट के साथ reference करके उसकी validity check की जा सकती है। इसके लिए XML डॉक्यूमेंट में xsi:noNamespaceSchemaLocation attribute का उपयोग किया जाता है और उसमे schema file का path दिया जाता है।

Please Give Us Feedback