Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 19th, 2013  |  syntax: None  |  size: 4.40 KB  |  views: 31  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <?xml-stylesheet type="text/xsl" href="teststyle.xsl"?>
  3. <country xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  4. <au>
  5.     <open><li><a href="/contest/test/goto.php?id=0" target="_blank"></open>
  6.     <description>Win a Macbook!</description>
  7.     <close></a></li></close>
  8. </au>
  9. <au>
  10.     <open><li><a href="/contest/test/goto.php?id=1" target="_blank"></open>
  11.     <description>Win a trip to Las Vegas!</description>
  12.     <close></a></li></close>
  13. </au>
  14. </country>
  15.        
  16. <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="test.xml" -->
  17. <!DOCTYPE xsl:stylesheet  [
  18. <!ENTITY nbsp   "&#160;">
  19. <!ENTITY copy   "&#169;">
  20. <!ENTITY reg    "&#174;">
  21. <!ENTITY trade  "&#8482;">
  22. <!ENTITY mdash  "&#8212;">
  23. <!ENTITY ldquo  "&#8220;">
  24. <!ENTITY rdquo  "&#8221;">
  25. <!ENTITY pound  "&#163;">
  26. <!ENTITY yen    "&#165;">
  27. <!ENTITY euro   "&#8364;">
  28. ]>
  29. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  30. <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0     Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  31. <xsl:template match="/">
  32.  
  33. <html xmlns="http://www.w3.org/1999/xhtml">
  34. <head>
  35. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  36. <title>Untitled Document</title>
  37. </head>
  38.  
  39. <body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE">
  40.     <xsl:for-each select="country/au">
  41.         <div style="background-color:teal;color:white;padding:4px">
  42.         <ol>
  43.             <span style="font-weight:bold"><xsl:value-of select="country/au/open" /><xsl:value-of select="country/au/description"/><xsl:value-of select="country/au/close"/></span>
  44.         </ol>
  45.     </div>
  46. </xsl:for-each>
  47. </body>
  48. </html>
  49.  
  50. </xsl:template>
  51. </xsl:stylesheet>
  52.        
  53. <xsl:value-of select="country/au/open" />
  54.        
  55. <xsl:value-of select="open" />
  56.        
  57. <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="test.xml" -->
  58. <!DOCTYPE xsl:stylesheet  [
  59. <!ENTITY nbsp   "&#160;">
  60. <!ENTITY copy   "&#169;">
  61. <!ENTITY reg    "&#174;">
  62. <!ENTITY trade  "&#8482;">
  63. <!ENTITY mdash  "&#8212;">
  64. <!ENTITY ldquo  "&#8220;">
  65. <!ENTITY rdquo  "&#8221;">
  66. <!ENTITY pound  "&#163;">
  67. <!ENTITY yen    "&#165;">
  68. <!ENTITY euro   "&#8364;">
  69. ]>
  70. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  71. <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0     Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  72. <xsl:template match="/">
  73.  
  74. <html xmlns="http://www.w3.org/1999/xhtml">
  75. <head>
  76. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  77. <title>Untitled Document</title>
  78. </head>
  79.  
  80. <body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE">
  81.     <xsl:for-each select="country/au">
  82.         <div style="background-color:teal;color:white;padding:4px">
  83.             <ol>
  84.                 <span style="font-weight:bold"><xsl:value-of select="open" disable-output-escaping="yes" /><xsl:value-of select="description"/><xsl:value-of select="close" disable-output-escaping="yes"/></span>
  85.             </ol>
  86.         </div>
  87.     </xsl:for-each>
  88. </body>
  89. </html>
  90.  
  91. </xsl:template>
  92. </xsl:stylesheet>
  93.        
  94. <?xml version="1.0" encoding="utf-8"?>
  95. <?xml-stylesheet type="text/xsl" href="teststyle.xsl"?>
  96. <country xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  97. <au>
  98.     <url>/contest/test/goto.php?id=0</url>
  99.     <target>_blank</target>
  100.     <description>Win a Macbook!</description>
  101. </au>
  102. <au>
  103.     <url>/contest/test/goto.php?id=1</url>
  104.     <target>_blank</target>
  105.     <description>Win a trip to Las Vegas!</description>
  106. </au>
  107. </country>
  108.        
  109. <?xml version="1.0" encoding="utf-8"?><!-- DWXMLSource="test.xml" -->
  110. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  111. <xsl:output method="html" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0     Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
  112. <xsl:template match="/">
  113.  
  114. <html xmlns="http://www.w3.org/1999/xhtml">
  115. <head>
  116. <title>Untitled Document</title>
  117. </head>
  118.  
  119. <body style="font-family:Arial;font-size:12pt;background-color:#EEEEEE">
  120.     <xsl:for-each select="country/au">
  121.         <div style="background-color:teal;color:white;padding:4px">
  122.             <ol style="font-weight:bold">
  123.                 <a href="{url}" target="{target}"><xsl:value-of select="description"/></a>
  124.             </ol>
  125.         </div>
  126.     </xsl:for-each>
  127. </body>
  128. </html>
  129.  
  130. </xsl:template>
  131. </xsl:stylesheet>
clone this paste RAW Paste Data