Once XSL-FO document is generated, it is passed to a FO processor.
FO Processor converts the document into something that is readible, printable or both.
Most common output is PDF, PS, RTF.
FO Processors?
XEP, XSLFormatter, XINC and FOP
Example: XSL-FO and Processor XS Processor The possible output formats depends of the features of the XS processor. For example, Apache FOP supports only PDF
Generating FO documents
XSL-FO Documents are not meant to be implemented by the programmer.
XSL-FO Documents are generated
Well Who / What generates XSL FO Documents?
It's result of an XSLT – transformation
Main Idea of XSLT: XML -> XHTML XSLT Processor The XSLT Processor can be client-side (browser) or server-side (php, java..)
Main Idea of XSLT: XML -> FO XSLT Processor Now the books.xml is transformed into XSL FO language...
Example: XSL-FO and Processor XS Processor And if you have an fo-document, you can transform it to pdf (for example)
XSL-FO Process in Whole XS Processor XSLT Processor
Relationships with the Languages Extensible Stylesheet Language XSL Transformations XSL Formatting Objects XML Path Language uses
XPath
Before learning the basics of XSLT, let's look at XPath
XPath is a non-XML language that is used with XSLT.
XPath is used also in other languages, like XPointer
XPath is a language for selecting elements, or nodes, from an XML – document
Selecting Nodes?
<?xml version="1.0"?>
<A>
<B>
<C></C>
</B>
</A>
<!-- Let's select C -->
/A/B/C
XPath
Selecting Nodes (W3schools) Expression Description nodename Selects all child nodes of the named node / Selects from the root node // Selects nodes in the document from the current node that match the selection no matter where they are . Selects the current node .. Selects the parent of the current node @ Selects attributes
Examples (W3schools) Expression Description /bookstore Selects the root element bookstore bookstore/book Selects all book elements that are children of bookstore //book Selects all book elements no matter where they are in the document bookstore//book Selects all book elements that are descendant of the bookstore element, no matter where they are under the bookstore element //@lang Selects all attributes that are named lang
0 comments
Post a comment