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

What is XML Schema (XSD) in Hindi

XML with Application in Hindi

XSL 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

XSLT in Hindi

RGPV University / DIPLOMA_CSE / Web Technology

XSLT in Hindi

What is XSLT?

XSLT का पूरा नाम है Extensible Stylesheet Language Transformations। यह एक transformational language है जिसका उपयोग XML डाटा को किसी अन्य XML, HTML या plain text format में बदलने के लिए किया जाता है। जब हम XML डाटा को यूज़र फ्रेंडली फॉर्मेट में दिखाना चाहते हैं, तब हम XSLT का उपयोग करते हैं। यह XSL (Extensible Stylesheet Language) का एक महत्वपूर्ण हिस्सा है।

Why use XSLT?

  • XSLT का उपयोग XML डाटा को आसानी से HTML web page में बदलने के लिए किया जाता है।
  • यह डाटा को एक structure से दूसरे structure में बदलने की flexibility देता है।
  • यह presentation और content को अलग-अलग रखने में मदद करता है।

XSLT Architecture in Hindi

Components of XSLT Architecture

XSLT Architecture मुख्यतः तीन components से मिलकर बना होता है:

  • XML Document: Source डाटा जो Transform किया जाना है।
  • XSLT Stylesheet: Rules और Templates का संग्रह जो यह बताते हैं कि XML को कैसे रूपांतरित करना है।
  • XSLT Processor: यह XML Document और Stylesheet दोनों को पढ़ता है और Output generate करता है।

Working of XSLT Architecture

जब हम किसी XML document को transform करना चाहते हैं, तो उसे एक XSLT stylesheet के साथ combine किया जाता है। फिर XSLT Processor उसे execute करता है और एक नया Output generate करता है, जो HTML, XML या text हो सकता है।

XSLT Syntax and Structure in Hindi

Basic Structure of XSLT

XSLT एक XML document होता है, इसलिए इसकी syntax भी XML जैसी होती है। इसका basic structure इस प्रकार होता है:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <html>
      <body>
        <h2>My Output</h2>
        <xsl:apply-templates/>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

Important Syntax Rules

  • हर XSLT document में <xsl:stylesheet> या <xsl:transform> root element होता है।
  • xmlns:xsl attribute से namespace define किया जाता है।
  • <xsl:template> से हम matching rule define करते हैं।
  • <xsl:value-of> किसी XML element का value प्राप्त करने के लिए उपयोग होता है।
  • <xsl:for-each> loop की तरह काम करता है।

XSLT Elements and Attributes in Hindi

Commonly Used Elements

Element Function
<xsl:template> Transformation rules define करने के लिए
<xsl:value-of> XML node का value प्राप्त करने के लिए
<xsl:for-each> Loop चलाने के लिए
<xsl:if> Condition check करने के लिए
<xsl:choose> Multiple conditions check करने के लिए (if-else की तरह)

Important Attributes

  • match: यह बताता है कि template किस element पर apply होगा।
  • select: यह बताता है कि कौन-सा XML node चुना जाए।

Advantages of XSLT in Hindi

Main Advantages

  • Presentation logic और business logic को अलग करता है।
  • एक ही XML document को अलग-अलग तरीके से प्रस्तुत किया जा सकता है।
  • XSLT के जरिए HTML, PDF, Text इत्यादि formats में output बनाया जा सकता है।
  • यह W3C standard है और सभी प्रमुख browsers और parsers द्वारा supported है।
  • Reusable और maintainable templates create किए जा सकते हैं।

FAQs

XSLT एक transformational language है जिसका उपयोग XML डाटा को HTML, XML या plain text में बदलने के लिए किया जाता है। यह XSL का हिस्सा है और इसका मुख्य उद्देश्य डाटा को किसी अन्य presentation format में बदलना है।
वास्तविक जीवन में XSLT का उपयोग banking reports, e-commerce websites, automated document generation, और XML based systems को HTML में बदलने के लिए किया जाता है। यह front-end presentation के लिए उपयोगी होता है।
XSLT Architecture में तीन मुख्य घटक होते हैं: XML Document, XSLT Stylesheet, और XSLT Processor। XML डाटा को transform करने के लिए ये तीनों एक साथ काम करते हैं।
<xsl:template> टैग transformation rules को define करता है। यह XML के किसी विशेष node के लिए output को format करने का तरीका बताता है।
हाँ, XSLT में loop के लिए <xsl:for-each> element का उपयोग किया जाता है। इससे हम XML के हर repeating element को iterate कर सकते हैं।
XSLT एक standard W3C language है जो structured और reusable होती है। यह presentation को content से अलग रखता है और cross-platform support प्रदान करता है, जिससे maintenance और scalability आसान होती है।

Please Give Us Feedback