XSL, XPath, XSLT

Friday, April 16, 2010

Q: What is XSL?

A: XSL stands for eXtensible Stylesheet Language. It is XML-based stylesheet language. XSL describes how the XML document should be displayed.

 

Q: What are the XSL Parts?

A: It has 3 parts:

                1. XSLT - a language for transforming XML documents

                2. XPath - a language for navigating in XML documents

                3. XSL-FO - a language for formatting XML documents

 

Q: What is XSLT?

A: XSLT stands for XSL Transformations.  XSLT is a language for transforming XML documents into XHTML documents or to other XML documents. With XSLT you can add/remove elements and attributes to or from the output file. You can also rearrange and sort elements, perform tests and make decisions about which elements to hide and display, and a lot more.

 

Q: What is the difference between <xsl:stylesheet> and <xsl:transform>?

A: <xsl:stylesheet> and <xsl:transform> are completely synonymous and either can be used.

 

Q: What is template in the XSLT?

A: An XSL style sheet consists of one or more set of rules that are called templates. A template contains rules to apply when a specified node is matched.

 

Q: Is XSL stylesheet  an XML document?

A: Yes. XSL style sheet is an XML document. Therefore it always begins with the XML declaration: <?xml version="1.0" encoding="ISO-8859-1"?>.

 

Q: What is XPath?

A:  XPath, the XML Path Language, is a query language for selecting nodes from an XML document. In addition, XPath may be used to compute values (e.g., strings, numbers, or Boolean values) from the content of an XML document. It uses path expressions to navigate in XML documents and it contains a library of standard functions.

 

Q: How many types of nodes are there in XPath?

A: In XPath, there are seven kinds of nodes:

1.       element,

2.       attribute

3.       text

4.       namespace

5.       processing-instruction

6.       comment

7.       document nodes

 

Q: What is atomic value in XPath?

A: Atomic values are nodes with no children or parent. E.g. Items in an XML file are atomic values.

 

Q: How many versions of XPath are there?

A: There are currently two versions in use.

                XPath 1.0 became a Recommendation on 16 November 1999 and is widely implemented and used, either on its own (called via an API from languages such as Java, C# or JavaScript), or embedded in languages such as XSLT or XForms.

XPath 2.0 is the current version of the language; it became a Recommendation on 23 January 2007. A number of implementations exist but are not as widely used as XPath 1.0. The XPath 2.0 language specification is much larger than XPath 1.0 and changes some of the fundamental concepts of the language such as the type system; the language specification is described in a separate article.

0 comments:

Post a Comment

Chitika

About This Blog

Followers

Blog Archive

  © Blogger template The Professional Template II by Ourblogtemplates.com 2009

Back to TOP