XML

XML Stands for eXtensible Markup Language. It is a textual data serialization format with a set of rules for encoding documents. There are many XML-based implementations today that include SOAP (Simple Object Access Protocol), RSS (Really Simple Syndication) etc.

XML Example

<note>Hi</note>

XSD

XSD stands for XML Schema Definition. It describes the elements in an Extensible Markup Language (XML) document. This description is generally used to verify that a XML document adheres to the description of the element in which the content is to be placed.

XSD Example

<xs:element name="shipto">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="name" type="xs:string"/>
      <xs:element name="address" type="xs:string"/>
      <xs:element name="city" type="xs:string"/>
      <xs:element name="country" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element> 

 

XHTML

XHTML stands for eXtensible HyperText Markup Language. It is a stricter and cleaner version of HTML. It is a W3C Recommendation and is defined as an XML application. XHTML is compatible with HTML 4.01.  and all browsers support XHTML.

XML Vs XSD Vs XHTML Vs XSLT Vs XPATH Vs XQuery Vs XPOINTER Vs XLINK

XSLT

XSLT stands for eXtensible Stylesheet Language Transformations. It allows transformation of XML documents into XML,HTML, XHTML or text documents and therefore provides a series of operations and manipulators for it. Some well known XSLT processors are Xalan, Saxon and MS XSLT processor. XSLT is used with XPath as XPath identifies the parts of an XML document that should be transformed,and XSLT says how the transformation should be done

XSLT Example

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <body>
    <h2>Collection</h2>
    <table border="1">
      <tr bgcolor="#9acd32">
        <th>Category</th>
        <th>SubCategory</th>
      </tr>
      <xsl:for-each select="catalog/cd">
        <tr>
          <td><xsl:value-of select="category"/></td>
          <td><xsl:value-of select="subcategory"/></td>
        </tr>
      </xsl:for-each>
    </table>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>

XPath

XPath standards for XML Path language. XPATH is a major element in XSLT. It is used for selection and addressing elements and attributes in an XML document. It is basically a syntax used to describe parts of an XML document. The root node is the XPath node that contains the entire document. The root node also contains comments or processing instructions that are outside the document element. Every element in the original XML document is represented by an XPath element node. At a minimum, an element node is the parent of one attribute node for each attribute in the XML source document. XPath is in fact a subset of XQuery.

XQuery

XQuery stands for XML query. It was designed to query collections of XML data. XQuery supports XPath natively therefore it can do everything that XPath can do. It supplements this with a SQL-like FLWOR(FOR, LET, WHERE, ORDER BY, RETURN) expression.  Its capabilities overlap with XSLT.

XSLT was primarily conceived as a stylesheet language to render XML for the human reader on screen, XQuery was conceived as a database query language.XSLT therefore is better in its handling of narrative documents with more flexible structure, while XQuery is stronger in its data handling.

XQuery Example

for $x in doc("flowers.xml")/flowerstore/flower
where $x/price>30
order by $x/title
return $x/title

XLink

XLink stands for XML Linking language. It provides methods for creating internal and external links within XML documents.  It defines a set of attributes that may be added to elements of other XML namespaces. XLink provides two kinds of hyperlinking viz simple links that connect only two resources and extended links that can link an arbitrary number of resources.

XPointer

XPointer stands for XML Pointer language. The XPointer Framework is defined at http://www.w3.org/TR/xptrframework/. It is closely related to XPath and uses XPath expressions to find points inside parsed entities. It could be used to create a link from one document to an element inside another. It is similar to fragment identifier in HTML but more versatile.