PHP Classes

File: myXML/sample.xsl

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of Tereshchenko Andrey  >  myXML  >  myXML/sample.xsl  >  Download  
File: myXML/sample.xsl
Role: Auxiliary data
Content type: text/plain
Description: XSL example
Class: myXML
DOM/XPath/XSLT implemented in php.
Author: By
Last change: -
Date: 11 years ago
Size: 1,797 bytes


Class file image Download
<?xml version="1.0" encoding="Windows-1251"?>
<xsl:stylesheet version="1.0"

  <xsl:template match="/">
	      <title>myXML example</title>
	    <body style="margin: 10%; font-family: Courier New;">
	      <center><h1>myXML example</h1></center>
        <xsl:apply-templates />
  <xsl:template match="books">
      Example of using xsl:comment element.
    <TABLE style="width: 100%">
      <xsl:for-each select="book">
		        <xsl:when test="position() mod 3 = 0">
			        <xsl:attribute name="style">background-color: #FAF0E6</xsl:attribute>
			      <xsl:when test="position() mod 3 = 1">
			        <xsl:attribute name="style">background-color: #B0C4DE</xsl:attribute>
			        <xsl:attribute name="style">background-color: #98FB98</xsl:attribute>
          <TD><xsl:value-of select="@id"/></TD>
          <xsl:apply-templates />
  <xsl:include href="include.xsl"/>
  <xsl:template match="author">
    <TD style="width: 30%">
      <xsl:apply-templates />
  <xsl:template match="price|date">
      <xsl:apply-templates />
  <xsl:template match="node()">
      <xsl:apply-templates />