XSLT <xsl:apply-templates> एलीमेंट
- पिछला पृष्ठ XSLT <choose>
- अगला पृष्ठ XSLT क्लायंट में
<xsl:apply-templates> एलीमेंट एक टैम्पलेट को वर्तमान एलीमेंट या वर्तमान एलीमेंट के सबएलीमेंटों पर लगा सकता है。
<xsl:apply-templates> एलीमेंट
<xsl:apply-templates> एलीमेंट एक टैम्पलेट को वर्तमान एलीमेंट या वर्तमान एलीमेंट के सबएलीमेंटों पर लगा सकता है。
यदि हम <xsl:apply-templates> एलीमेंट में एक select विशेषता जोड़ें, तो इस विशेषता के मात्र सम्बंधित सबएलीमेंटों को संसाधित किया जाएगा। हम इसका उपयोग select विशेषता के द्वारा सबएलीमेंटों को संसाधित करने की क्रमिक गति निर्धारित करने के लिए कर सकते हैं。
कृपया नीचे दिए गए XSL शैली पट्टी को देखें:
<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <h2>My CD Collection</h2> <xsl:apply-templates/> </body> </html> </xsl:template> <xsl:template match="cd"> <p> <xsl:apply-templates select="title"/> <xsl:apply-templates select="artist"/> </p> </xsl:template> <xsl:template match="title"> शीर्षक: <span style="color:#ff0000"> <xsl:value-of select="."/></span> <br /> </xsl:template> <xsl:template match="artist"> आर्टिस्ट: <span style="color:#00ff00"> <xsl:value-of select="."/></span> <br /> </xsl:template> </xsl:stylesheet>
- पिछला पृष्ठ XSLT <choose>
- अगला पृष्ठ XSLT क्लायंट में