XSLT Interview Question & Answer

  • What is XSLT?
  • XSLT stands for EXtensible Stylesheet LanguageTransformation. It is used to transform XML documents into other formats (like transforming XML into HTML). For more information:http://javarefresh/markupScript/XSLTQuickLook.php
  • What are the advantages of using XSLT?
  • Easy way to merge XML data into presentation because it applies user defined transformations to an XML document.
  • Output in many form such as HTML, XML, or any other structured document.
  • XSLT provides XPath to locate elements/attribute within an XML document. So it is more convenient way to traverse an XML document rather than a traditional way, by using scripting language.
  • XSLT is template based. So it is more flexible to changes in documents than low level DOM and SAX.
  • makes the application UI script clean and easier to maintain.
  • XPath pattern which is very powerful in terms of performance to process the XML document.
  • XSLT can be used as a validation language as it uses tree-pattern-matching approach.
  • What are the main parts of XSL document?
  • XSLT: It is a language for transforming XML documents into various other types of documents.
    XPath: It is a language for navigating in XML documents.
    XQuery: It is a language for querying XML documents.
  • How is XSLT related to XSL?
  • XSLT stands for eXtensible Stylesheet Language Transformations. It is a language used to convert XML documents to XHTML or other XML documents. XSLT is nothing but transforming XSL's.
  • Explain the working of XSLT?
  • What are different XSLT, XPath, and XQuery Functions?
  • Accessor, Error and Trace, Numeric, String, AnyURI, Boolean, Duration/Date/Time, QName, Node, Sequence, Context
    Tip: Functions are often called with the fn: prefix, such as fn:string(). sHowever, since fn: is the default prefix of the namespace, the function names do not need to be prefixed when called.
  • How To Generate Dynamic Html Pages From Relational Database Using Xslt?
  • Data stored in relational database could be converted into XML and by using XSLT transformed into HTML pages. Database stored procedure can be used for first part and having all the logic of rendering HTML using XSLT. You don't need to change your query now and then if you need to change structure of HTML pages.
  • Can You Use The Xslt To Convert Html Into Vxml?
  • Yes, we can definitely use the XSLT to convert the html into VXML.
  • Explain the role of XPATH?
  • XPATH is used to scan the XML document for navigation of elements and attributes. It contains a library of standard functions string ad numeric values. For navigation, XPATH makes use of path expressions to select nodes or sets of nodes in a XML document.