{"id":10384,"date":"2022-09-23T14:08:10","date_gmt":"2022-09-23T08:38:10","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/"},"modified":"2022-09-23T14:08:10","modified_gmt":"2022-09-23T08:38:10","slug":"solved-xml-to-html-table-using-xsl","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/","title":{"rendered":"[Solved] XML to HTML table using XSL"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-26576302\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"26576302\" data-parentid=\"26572705\" data-score=\"1\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p>Just as a different approach and also handling the colours for the same bus_types.<br \/><a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/www.xsltcake.com\/slices\/vPlYOx\">Demo<\/a><\/p>\n<pre><code>&lt;?xml version=\"1.0\"?&gt;\n&lt;xsl:stylesheet\nxmlns:xsl=\"http:\/\/www.w3.org\/1999\/XSL\/Transform\"  version=\"1.0\"&gt;\n&lt;xsl:output method=\"html\"\/&gt;\n&lt;xsl:template match=\"https:\/\/stackoverflow.com\/\"&gt;\n&lt;table&gt;\n    &lt;tr&gt;\n        &lt;td colspan=\"9\"&gt;ACME BUS SERVICE&lt;\/td&gt;\n    &lt;\/tr&gt;\n    &lt;tr&gt;\n        &lt;td colspan=\"9\"&gt;\n            Month: &lt;xsl:value-of select=\"\/\/Month\"\/&gt;\n        &lt;\/td&gt;\n    &lt;\/tr&gt;\n    &lt;tr&gt;\n        &lt;td&gt;Season&lt;\/td&gt;\n        &lt;td&gt;Location&lt;\/td&gt;\n        &lt;td&gt;Bus Name&lt;\/td&gt;\n        &lt;td colspan=\"2\"&gt;RED&lt;\/td&gt;\n        &lt;td colspan=\"2\"&gt;GREEN&lt;\/td&gt;\n        &lt;td colspan=\"2\"&gt;BLUE&lt;\/td&gt;\n    &lt;\/tr&gt;\n    &lt;tr&gt;\n        &lt;td&gt;&lt;\/td&gt;\n        &lt;td&gt;&lt;\/td&gt;\n        &lt;td&gt;&lt;\/td&gt;\n        &lt;td&gt;Bus Type&lt;\/td&gt;\n        &lt;td&gt;Bus Count&lt;\/td&gt;\n        &lt;td&gt;Bus Type&lt;\/td&gt;\n        &lt;td&gt;Bus Count&lt;\/td&gt;\n        &lt;td&gt;Bus Type&lt;\/td&gt;\n        &lt;td&gt;Bus Count&lt;\/td&gt;\n    &lt;\/tr&gt;\n    &lt;xsl:for-each select=\"\/\/row[Location[not(preceding::Location\/. = .)]]\" &gt;\n        &lt;xsl:variable name=\"currentLocation\" select=\".\/Location\"\/&gt;\n        &lt;tr&gt;\n            &lt;xsl:attribute name=\"class\"&gt;\n              &lt;xsl:value-of select=\"$currentLocation\"\/&gt;\n             &lt;\/xsl:attribute&gt;\n            &lt;td&gt;\n                &lt;xsl:if test=\"position()=1\"&gt;Winter&lt;\/xsl:if&gt;\n            &lt;\/td&gt;\n            &lt;td&gt;\n                &lt;xsl:value-of select=\"$currentLocation\"\/&gt;\n            &lt;\/td&gt;\n            &lt;td&gt;\n                &lt;xsl:value-of select=\".\/bus_name\"\/&gt;\n            &lt;\/td&gt;\n            &lt;td&gt;\n                &lt;xsl:if test=\"count(\/\/row[Location= $currentLocation]\n                                         [bus_type = \/\/row[Location= $currentLocation]\n                                         [bus_colour=\"red\"]\/bus_type]) &gt; 1\"&gt;\n                    &lt;xsl:attribute name=\"class\"&gt;color&lt;\/xsl:attribute&gt;\n                &lt;\/xsl:if&gt;\n                &lt;xsl:value-of select=\"\/\/row[Location= $currentLocation]\n                                           [bus_colour=\"red\"]\/bus_type\"\/&gt;\n            &lt;\/td&gt;\n            &lt;td&gt;\n                &lt;xsl:value-of select=\"\/\/row[Location= $currentLocation]\n                                           [bus_colour=\"red\"]\/bus_count\"\/&gt;\n            &lt;\/td&gt;\n            &lt;td&gt;\n                &lt;xsl:if test=\"count(\/\/row[Location= $currentLocation]\n                                         [bus_type = \/\/row[Location=$currentLocation]  \n                                         [bus_colour=\"green\"]\/bus_type]) &gt; 1\"&gt;\n                    &lt;xsl:attribute name=\"class\"&gt;color&lt;\/xsl:attribute&gt;\n                &lt;\/xsl:if&gt;\n                &lt;xsl:value-of select=\"\/\/row[Location= $currentLocation]\n                                           [bus_colour=\"green\"]\/bus_type\"\/&gt;\n            &lt;\/td&gt;\n            &lt;td&gt;\n                &lt;xsl:value-of select=\"\/\/row[Location= $currentLocation]\n                                           [bus_colour=\"green\"]\/bus_count\"\/&gt;\n            &lt;\/td&gt;\n            &lt;td&gt;\n                &lt;xsl:if test=\"count(\/\/row[Location= $currentLocation]\n                                         [bus_type = \/\/row[Location=$currentLocation]  \n                                         [bus_colour=\"blue\"]\/bus_type]) &gt; 1\"&gt;\n                    &lt;xsl:attribute name=\"class\"&gt;color&lt;\/xsl:attribute&gt;\n                &lt;\/xsl:if&gt;\n                &lt;xsl:value-of select=\"\/\/row[Location= $currentLocation]\n                                           [bus_colour=\"blue\"]\/bus_type\"\/&gt;\n            &lt;\/td&gt;\n            &lt;td&gt;\n                &lt;xsl:value-of select=\"\/\/row[Location= $currentLocation]\n                                           [bus_colour=\"blue\"]\/bus_count\"\/&gt;\n            &lt;\/td&gt;\n        &lt;\/tr&gt;\n    &lt;\/xsl:for-each&gt;\n&lt;\/table&gt;\n&lt;\/xsl:template&gt;\n&lt;\/xsl:stylesheet&gt;\n<\/code><\/pre>\n<p>For every location, the location is set as classname to the <code>&lt;tr&gt;<\/code>, e.g. <code>&lt;tr class=\"kansas\"&gt;<\/code>. Every td with a bus type that is used more than once at a location gets the class=&#8221;color&#8221;. So to display the table with different colors, you can just add CSS like e.g. <code>.kansas .color { background-color: blue; }<\/code>. In case you want to display the same color based on the bus_type, just adjust the classname &#8220;color&#8221; in the xslt to the current bus_type.  <\/p>\n<p>Note: In the linked example I&#8217;ve only added one row for Texas to show that the XSLT displays multiple locations, only sets the season for the first one, and will also work in case not all colors are provided for a location. And the output is not valid HTML (no html-, head-, body-tags etc provided). As you mentioned you&#8217;d like to get HTML ouput, you probably already have an XSLT generating valid HTML where you can adjust\/include the part you need for the table.<\/p>\n<p><strong>Update<\/strong> for the question in the comments: To set the class name for a <code>&lt;tr&gt;<\/code> to the name of the bus_type (in case a bus_type is used more than once at a location) instead of the location:  <\/p>\n<p>Change this in above XSLT:<\/p>\n<pre><code>&lt;tr&gt;\n&lt;xsl:attribute name=\"class\"&gt;\n   &lt;xsl:value-of select=\"$currentLocation\"\/&gt;\n&lt;\/xsl:attribute&gt;\n<\/code><\/pre>\n<p>into<\/p>\n<pre><code>&lt;tr&gt;\n&lt;xsl:if test=\"count(\/\/row[Location=$currentLocation]) &gt;  \n              count(\/\/row[Location=$currentLocation]\/\n                      bus_type[not(. = preceding::bus_type)])\"&gt;  \n    &lt;xsl:attribute name=\"class\"&gt;\n       &lt;xsl:value-of select=\"\/\/row[Location=$currentLocation]\/\n                               bus_type[ . = preceding::bus_type]\"\/&gt;\n    &lt;\/xsl:attribute&gt;\n&lt;\/xsl:if&gt;\n<\/code><\/pre>\n<p>Updated <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/www.xsltcake.com\/slices\/ZBU10A\">Demo 2<\/a> for this.  <\/p>\n<p>Additional notes and questions: One adjustment to the OP XML was to change the lowercase &#8220;volvo&#8221; to &#8220;Volvo&#8221;. In case the original export from DB really mixes upper- and lowercase names, this can be handled in the XSLT to lowercase all bus_names (to get the unique values) and uppercase the first letter for the value in the <code>&lt;td&gt;<\/code>. Also it would be good to know if you use XSLT 2.0 or XSLT 1.0 as XSLT 2.0 provides functionality to simplify some tasks &#8211; e.g. 2.0 provides a <code>lower-case()<\/code> function where in 1.0 the same can be achieved using <code>translate()<\/code> &#8211; as reference for this as you mentioned you&#8217;re new to XSL: How can I convert a string to upper- or lower-case with XSLT?<br \/>\nFurther question is &#8211; as the XML example is only a part of the DB export &#8211; if there will be only one row for each location or if it is possible that there are various rows, e.g. kansas bus1, kansas bus2 etc.  <\/p>\n<p><strong>Update 2<\/strong> for the second question in the comments: I can add an (almost) line by line explanation and will drop a comment when done. I assume it&#8217;s not necessary to cover the HTML part but only the XSLT. In the meantime, as you mentioned you&#8217;re new to XSLT, maybe the following can be of use:<br \/>\nfor <code>&lt;xsl:template match=\"https:\/\/stackoverflow.com\/\"&gt;<\/code> &#8211; https:\/\/stackoverflow.com\/questions\/3127108\/xsl-xsltemplate-match<br \/>\n<br \/>\nfor XPath axes &#8211; <a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/www.xmlplease.com\/axis\">http:\/\/www.xmlplease.com\/axis<\/a><br \/>\nfor some basics, e.g. &#8211; In what order do templates in an XSLT document execute, and do they match on the source XML or the buffered output?  <\/p>\n<p>Note that it should be avoided at SO to have extended comments &#8211; when there are too many comments below a post, an automated message will be displayed that suggests to move to chat. Because you need a reputation of 20 to chat (https:\/\/stackoverflow.com\/help\/privileges), this won&#8217;t be possible at the moment.<\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">9<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved XML to HTML table using XSL <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Just as a different approach and also handling the colours for the same bus_types.Demo &lt;?xml version=&#8221;1.0&#8243;?&gt; &lt;xsl:stylesheet xmlns:xsl=&#8221;http:\/\/www.w3.org\/1999\/XSL\/Transform&#8221; version=&#8221;1.0&#8243;&gt; &lt;xsl:output method=&#8221;html&#8221;\/&gt; &lt;xsl:template match=&#8221;https:\/\/stackoverflow.com\/&#8221;&gt; &lt;table&gt; &lt;tr&gt; &lt;td colspan=&#8221;9&#8243;&gt;ACME BUS SERVICE&lt;\/td&gt; &lt;\/tr&gt; &lt;tr&gt; &lt;td colspan=&#8221;9&#8243;&gt; Month: &lt;xsl:value-of select=&#8221;\/\/Month&#8221;\/&gt; &lt;\/td&gt; &lt;\/tr&gt; &lt;tr&gt; &lt;td&gt;Season&lt;\/td&gt; &lt;td&gt;Location&lt;\/td&gt; &lt;td&gt;Bus Name&lt;\/td&gt; &lt;td colspan=&#8221;2&#8243;&gt;RED&lt;\/td&gt; &lt;td colspan=&#8221;2&#8243;&gt;GREEN&lt;\/td&gt; &lt;td colspan=&#8221;2&#8243;&gt;BLUE&lt;\/td&gt; &lt;\/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;\/td&gt; &lt;td&gt;&lt;\/td&gt; &lt;td&gt;&lt;\/td&gt; &#8230; <a title=\"[Solved] XML to HTML table using XSL\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/\" aria-label=\"More on [Solved] XML to HTML table using XSL\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[1018,1023],"class_list":["post-10384","post","type-post","status-publish","format-standard","hentry","category-solved","tag-html-table","tag-xslt"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[Solved] XML to HTML table using XSL - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] XML to HTML table using XSL - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] Just as a different approach and also handling the colours for the same bus_types.Demo &lt;?xml version=&quot;1.0&quot;?&gt; &lt;xsl:stylesheet xmlns:xsl=&quot;http:\/\/www.w3.org\/1999\/XSL\/Transform&quot; version=&quot;1.0&quot;&gt; &lt;xsl:output method=&quot;html&quot;\/&gt; &lt;xsl:template match=&quot;https:\/\/stackoverflow.com\/&quot;&gt; &lt;table&gt; &lt;tr&gt; &lt;td colspan=&quot;9&quot;&gt;ACME BUS SERVICE&lt;\/td&gt; &lt;\/tr&gt; &lt;tr&gt; &lt;td colspan=&quot;9&quot;&gt; Month: &lt;xsl:value-of select=&quot;\/\/Month&quot;\/&gt; &lt;\/td&gt; &lt;\/tr&gt; &lt;tr&gt; &lt;td&gt;Season&lt;\/td&gt; &lt;td&gt;Location&lt;\/td&gt; &lt;td&gt;Bus Name&lt;\/td&gt; &lt;td colspan=&quot;2&quot;&gt;RED&lt;\/td&gt; &lt;td colspan=&quot;2&quot;&gt;GREEN&lt;\/td&gt; &lt;td colspan=&quot;2&quot;&gt;BLUE&lt;\/td&gt; &lt;\/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;\/td&gt; &lt;td&gt;&lt;\/td&gt; &lt;td&gt;&lt;\/td&gt; ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-23T08:38:10+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-xml-to-html-table-using-xsl\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-xml-to-html-table-using-xsl\\\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#\\\/schema\\\/person\\\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] XML to HTML table using XSL\",\"datePublished\":\"2022-09-23T08:38:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-xml-to-html-table-using-xsl\\\/\"},\"wordCount\":560,\"publisher\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#organization\"},\"keywords\":[\"html-table\",\"xslt\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-xml-to-html-table-using-xsl\\\/\",\"url\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-xml-to-html-table-using-xsl\\\/\",\"name\":\"[Solved] XML to HTML table using XSL - JassWeb\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#website\"},\"datePublished\":\"2022-09-23T08:38:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-xml-to-html-table-using-xsl\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-xml-to-html-table-using-xsl\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/solved-xml-to-html-table-using-xsl\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] XML to HTML table using XSL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#website\",\"url\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/jassweb.com\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/jass-website-logo-1.png\",\"contentUrl\":\"https:\\\/\\\/jassweb.com\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/#\\\/schema\\\/person\\\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/wp-content\\\/litespeed\\\/avatar\\\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400\",\"url\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/wp-content\\\/litespeed\\\/avatar\\\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400\",\"contentUrl\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/wp-content\\\/litespeed\\\/avatar\\\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\\\/\\\/jassweb.com\"],\"url\":\"https:\\\/\\\/jassweb.com\\\/solved\\\/author\\\/jaspritsinghghumangmail-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] XML to HTML table using XSL - JassWeb","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] XML to HTML table using XSL - JassWeb","og_description":"[ad_1] Just as a different approach and also handling the colours for the same bus_types.Demo &lt;?xml version=\"1.0\"?&gt; &lt;xsl:stylesheet xmlns:xsl=\"http:\/\/www.w3.org\/1999\/XSL\/Transform\" version=\"1.0\"&gt; &lt;xsl:output method=\"html\"\/&gt; &lt;xsl:template match=\"https:\/\/stackoverflow.com\/\"&gt; &lt;table&gt; &lt;tr&gt; &lt;td colspan=\"9\"&gt;ACME BUS SERVICE&lt;\/td&gt; &lt;\/tr&gt; &lt;tr&gt; &lt;td colspan=\"9\"&gt; Month: &lt;xsl:value-of select=\"\/\/Month\"\/&gt; &lt;\/td&gt; &lt;\/tr&gt; &lt;tr&gt; &lt;td&gt;Season&lt;\/td&gt; &lt;td&gt;Location&lt;\/td&gt; &lt;td&gt;Bus Name&lt;\/td&gt; &lt;td colspan=\"2\"&gt;RED&lt;\/td&gt; &lt;td colspan=\"2\"&gt;GREEN&lt;\/td&gt; &lt;td colspan=\"2\"&gt;BLUE&lt;\/td&gt; &lt;\/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;\/td&gt; &lt;td&gt;&lt;\/td&gt; &lt;td&gt;&lt;\/td&gt; ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/","og_site_name":"JassWeb","article_published_time":"2022-09-23T08:38:10+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] XML to HTML table using XSL","datePublished":"2022-09-23T08:38:10+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/"},"wordCount":560,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["html-table","xslt"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/","url":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/","name":"[Solved] XML to HTML table using XSL - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-09-23T08:38:10+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-xml-to-html-table-using-xsl\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] XML to HTML table using XSL"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1777008400","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/10384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=10384"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/10384\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=10384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=10384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=10384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}