Jump to content
Sign in to follow this  
Guest chinni_K

Difference between XSLT FO and XSLT

Recommended Posts

Guest chinni_K

Hello,I have a presentation about XML, XSLT and XSD. I amwondering what if they ask me what is the difference between XSLT and XSL FOand XPath is, or why we should use the one over the other...I didn't know how to respond.I know that XSLT, a language for transforming XML documents XSL or XSL-FO, a language for formatting XML documents But when to use XSL FO and also what does we mean by formatting XML doumentsPlease reply me urgently.May be my question may find you like a KG standard but need your help in thisThanks in advance

Share this post


Link to post
Share on other sites

Huh. Now what do you know. I'm also making a presentation on XML & XSLT for school. They told us to choose a topic ourselves, so what better could I write about then this :).The best thing to do is probably to explain the XSLT process in detail and then go to XSL(-FO).In XSLT, an XML file is taken by an appication, called an "XSLT processor" as input. Using the XSLT elements, this XML document is turned into another XML based document (be it XHTML, SVG, RSS, WML, another custom XML, etc.), or plain text output. The next application (most oftenly: the browser) takes that code as input and visualises it to the user.(When you tell that to the class, be sure to say it slowly, with jestures and drawings if needed.)An XSL-FO document is not passed to a browser however (not yet anyway, scince none support it). Instead, another application, called a "FO processor" takes this input and turns it into another visualisable document and/or shows it to the user at that moment.Now, where is the difference between the two you ask? Let's follow the process:In XSLT:

XML	\XSLT - -> XSLT processor ---  XHTML/SVG/RSS/text/whatever-------->| BROWSER or another appication |

And in XSL-FO:

XSL-FO ----> FO processor --- PDF/PostScript/??? ---> | A proper viewer or application |

Now look closely. What's missing? YES! XSL-FO didn't took an XML as input. Instead, it's a form of output a visualising application can project directly. However, most of today's viewers won't read XSL-FO documents on the fly. Instead, they would rely on another application (the FO processor) to turn it into a form they can read. Think of it as "markup to document" language.Taking the above note and shemes, you can easily understand how those two languages can work together, taking a common XML as a data source:

XML	\XSLT - -> XSLT processor ---  XSL-FO --------> FO Processor ----- PDF/PostScript/???--->| A proper viewer or application |

And scince you can have more then one XSLT, you can make one for each version of a type of XML. For example one for converting yourXML-to-FO, another for yourXML-to-XHTML, etc.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...