xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1416015 - /xmlgraphics/site/trunk/content/fop/quickstartguide.mdtext
Date Sat, 01 Dec 2012 16:21:09 GMT
Author: clay
Date: Sat Dec  1 16:21:08 2012
New Revision: 1416015

URL: http://svn.apache.org/viewvc?rev=1416015&view=rev
Log:
fixing code

Modified:
    xmlgraphics/site/trunk/content/fop/quickstartguide.mdtext

Modified: xmlgraphics/site/trunk/content/fop/quickstartguide.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/quickstartguide.mdtext?rev=1416015&r1=1416014&r2=1416015&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/quickstartguide.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/quickstartguide.mdtext Sat Dec  1 16:21:08 2012
@@ -49,29 +49,30 @@ This section walks you through a "Hello 
 1. Now, take your favorite XML editor and create a small XML file like the following. Replace
"Frank" with your own first name to make it a bit more personal and save it as `name.xml`
:<br></br><name>Frank</name>
 
 1. To produce a PDF file from this XML file, we need an XSLT stylesheet that converts the
XML to XSL-FO. This is the first step in the processing chain. The second step will be done
by FOP when it reads the generated XSL-FO document and formats it to a PDF document. You can
copy the following minimal XSLT stylesheet, which takes your first name and produces a "Hello
World!"-style document (save it as `name2fo.xsl` ):<br></br><?xml version="1.0"
encoding="utf-8"?>
-<xsl:stylesheet version="1.0"
-      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-      xmlns:fo="http://www.w3.org/1999/XSL/Format">
-  <xsl:output method="xml" indent="yes"/>
-  <xsl:template match="/">
-    <fo:root>
-      <fo:layout-master-set>
-        <fo:simple-page-master master-name="A4-portrait"
-              page-height="29.7cm" page-width="21.0cm" margin="2cm">
-          <fo:region-body/>
-        </fo:simple-page-master>
-      </fo:layout-master-set>
-      <fo:page-sequence master-reference="A4-portrait">
-        <fo:flow flow-name="xsl-region-body">
-          <fo:block>
-            Hello, <xsl:value-of select="name"/>!
-          </fo:block>
-        </fo:flow>
-      </fo:page-sequence>
-    </fo:root>
-  </xsl:template>
-</xsl:stylesheet>
+
+        <xsl:stylesheet version="1.0"
+              xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+              xmlns:fo="http://www.w3.org/1999/XSL/Format">
+          <xsl:output method="xml" indent="yes"/>
+          <xsl:template match="/">
+            <fo:root>
+              <fo:layout-master-set>
+                <fo:simple-page-master master-name="A4-portrait"
+                      page-height="29.7cm" page-width="21.0cm" margin="2cm">
+                  <fo:region-body/>
+                </fo:simple-page-master>
+              </fo:layout-master-set>
+              <fo:page-sequence master-reference="A4-portrait">
+                <fo:flow flow-name="xsl-region-body">
+                  <fo:block>
+                    Hello, <xsl:value-of select="name"/>!
+                  </fo:block>
+                </fo:flow>
+              </fo:page-sequence>
+            </fo:root>
+          </xsl:template>
+        </xsl:stylesheet>
 
 1. Finally, let's put the previous two steps together: Go back to the command prompt and
enter the following command:<br></br>Windows: `fop -xml name.xml -xsl name2fo.xsl
-pdf name.pdf` <br></br>Unix: `./fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf`
<br></br>
 
-1. You've produced your first PDF with Apache FOP! Please open `name.pdf` in your favorite
PDF viewer.
+1. You've produced your first PDF with Apache FOP! Please open `name.pdf` in your favorite
PDF viewer.
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message