title: Is there any way to run XSLT and generate PDF online using Apache fop?
body: <p>I want to generate PDF online like <a href="https://xsltfiddle.liberty-development.net" rel="nofollow noreferrer">xslt tranformation</a></p>
  
  <p><strong>INPUT XML:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;students&gt;
      &lt;student&gt;
          &lt;name&gt;Amrendra Kumar&lt;/name&gt;
          &lt;class&gt;BCA&lt;/class&gt;
      &lt;/student&gt;
      &lt;student&gt;
          &lt;name&gt;Sanjeev Kumar&lt;/name&gt;
          &lt;class&gt;MCA&lt;/class&gt;
      &lt;/student&gt;
  &lt;/students&gt;
  </code></pre>
  
  <p><strong>XSLT to generate PDF:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:fo="http://www.w3.org/1999/XSL/Format"
      exclude-result-prefixes="xs"
      version="2.0"&gt;
  
      &lt;xsl:template match="/"&gt;
          &lt;fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"&gt;
              &lt;fo:layout-master-set&gt;
                  &lt;fo:simple-page-master master-name="a"&gt;
                      &lt;fo:region-body margin="1in"/&gt;
                  &lt;/fo:simple-page-master&gt;
              &lt;/fo:layout-master-set&gt;
              &lt;fo:page-sequence master-reference="a"&gt;
                  &lt;fo:flow flow-name="xsl-region-body"&gt;
                      &lt;fo:block&gt;
                          &lt;fo:table border="1pt"&gt;
                              &lt;fo:table-column column-number="1" column-width="180pt"/&gt;
                              &lt;fo:table-column column-number="2" column-width="300pt"/&gt;
                              &lt;fo:table-header&gt;
                                  &lt;fo:table-row padding-top="0pt" padding-bottom="0pt"&gt;
                                      &lt;fo:table-cell&gt;
                                          &lt;fo:block font-family="TimesNewRoman" font-size="10pt"  space-before="4pt" text-align="left"&gt;
                                              &lt;fo:inline font-weight="bold" font-size="12pt"&gt;Name&lt;/fo:inline&gt;
                                          &lt;/fo:block&gt;
                                      &lt;/fo:table-cell&gt;
                                      &lt;fo:table-cell&gt;
                                          &lt;fo:block font-family="TimesNewRoman" font-size="10pt"  space-before="4pt" text-align="left"&gt;
                                              &lt;fo:inline font-weight="bold" font-size="12pt"&gt;Class&lt;/fo:inline&gt;
                                          &lt;/fo:block&gt;
                                      &lt;/fo:table-cell&gt;
                                  &lt;/fo:table-row&gt;
                              &lt;/fo:table-header&gt;
                              &lt;fo:table-body start-indent="0pt" end-indent="0pt"&gt;
                                  &lt;xsl:for-each select="students/student"&gt;
                                      &lt;fo:table-row padding-top="0pt" padding-bottom="0pt"&gt;
                                          &lt;fo:table-cell&gt;
                                              &lt;fo:block font-family="TimesNewRoman" font-size="10pt"  space-before="4pt" text-align="left"&gt;
                                                  &lt;fo:inline font-size="12pt"&gt;
                                                      &lt;xsl:value-of select="name"/&gt;
                                                  &lt;/fo:inline&gt;
                                              &lt;/fo:block&gt;
                                          &lt;/fo:table-cell&gt;
                                          &lt;fo:table-cell&gt;
                                              &lt;fo:block font-family="TimesNewRoman" font-size="10pt"  space-before="4pt" text-align="left"&gt;
                                                  &lt;fo:inline font-size="12pt"&gt;
                                                      &lt;xsl:value-of select="class"/&gt;
                                                  &lt;/fo:inline&gt;
                                              &lt;/fo:block&gt;
                                          &lt;/fo:table-cell&gt;
                                      &lt;/fo:table-row&gt;
                                  &lt;/xsl:for-each&gt;
                              &lt;/fo:table-body&gt;
                          &lt;/fo:table&gt;
                      &lt;/fo:block&gt;
                  &lt;/fo:flow&gt;
              &lt;/fo:page-sequence&gt;
          &lt;/fo:root&gt;
      &lt;/xsl:template&gt;
  
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p><strong>Output:</strong> need to generate PDF online</p>