Advertisement
a9898625

5

Jan 17th, 2021
684
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.61 KB | None | 0 0
  1. <?xml version = "1.0"?>                    
  2. <?xml-stylesheet type="text/css" href="5a.css" ?>
  3.  <RU>
  4.       <b> Books </b><br />
  5.       <e> Electronics </e><br />
  6.       <s> Stationaries </s><br />
  7.       <c> Cloths</c><br />
  8.       <o> other </o><br />
  9.  </RU>
  10.  
  11. 5a.css
  12. b{ display:block; color:blue; font-style:italic;}
  13. e{ display:block;color:green;font-style:italic;}
  14. s{ display:block;color:red;font-style:italic;}
  15. c{ display:block;color:blue;font-style:italic;}
  16. o{ display:block;color:black;font-style:italic;}
  17.  
  18. 5b.xml
  19. <?xml version="1.0"?>
  20. <?xml-stylesheet type="text/xsl" href="5b.xsl" ?>
  21. <RU>
  22.       <b> Books </b>
  23.       <e> Electronics </e>
  24.       <s> Stationaries </s>
  25.       <c> Cloths </c>
  26.       <o> Other </o>
  27.  </RU>
  28.  
  29. 5b.xsl
  30. <?xml version = "1.0"?>
  31.  <xsl:stylesheet version = "1.0"
  32. xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
  33. xmlns="http://www.w3.org/1999/xhtml">
  34. <xsl:template match = "RU">
  35.  <html>
  36. <head>
  37. <title> Style sheet for 5b.xml </title>
  38.  </head>
  39. <body>
  40.  <h2> Shopping </h2>
  41.  <span style = "font-style: italic; color: blue;"> Books:
  42.  </span> <xsl:value-of select = "b" /> <br />
  43.  
  44.  <span style = "font-style: italic; color: blue;"> Electronics:
  45.  </span> <xsl:value-of select = "e" /> <br />
  46.  
  47.  <span style = "font-style: italic; color: blue;"> Stationary:
  48.  </span> <xsl:value-of select = "s" /> <br />
  49.  
  50.  <span style = "font-style: italic; color: blue;"> Clothes:
  51.  </span> <xsl:value-of select = "c" /> <br />
  52.  
  53.  <span style = "font-style: italic; color: blue;"> Others:          
  54.  </span> <xsl:value-of select = "o" /> <br />
  55.  
  56.  </body>
  57. </html>
  58. </xsl:template>
  59. </xsl:stylesheet>
  60.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement