Logo F2FInterview

XML Interview Questions

Q   |   QA

Cascading style sheets (CSS) work by assigning a set of display properties to an HTML element. CSS determines the visual appearance of a page, but doesn’t alter the structure of the source document.

XSLT, on the other hand, is known as a template-based language that lets you map a certain pattern in the source document with output written in XML, HTML, or plain text. With XSLT, you can transform the structure of an XML document into a different XML document. For example, you can change the order of an XML document, add or delete elements, perform conditional tests, or iterate through collections of elements.

XSLT and CSS are not incompatible standards. One useful technique in creating Web pages in XML is to use XSLT to transform XML into structures such as lists or tables, then apply CSS to the result to control how these structures appear in the appropriate medium. You can even create CSS from XSLT.

The XML document has its structure and element characteristics defined in the additional XSD, XRD or DTD file. The validation process refers to the checking of the XML entities and structure across the specified standard. If an element in XML named <table> is defined in the XSD as one which has two child-elements named <row> and <column>, and we have the XML file which creates the <table> element without the specifying the <row> element as child, then this is reported as a validation error. The same happens even if there are conflicts of type of the elements.

The webservices are meant for communication between to independent systems. Thus there has to be a standard way in which the data from one computer is sent to the other computer securely. In such a situation each data passed from one computer is serialized and packed into XML document as different elements with corresponding attributes. This is then de-serialized or de-packetised from the other computer according to the specific standard and eventually the message is obtained from the other computer.

XSL started out as a standard for specifying stylesheets just like CSS. But soon it grew to be widely used as XML translation language. Adding specific styles and formating attributes to the XML attributes made it more useful for generating the HTML files from the data obtained from XML files. The XSL still is updated continuously as a standard. But the translation language based on XSL, the XSLT has become more of a transformation tool for the XML data documents.

The DTDs generally do not use namespaces. It is technically possible to use name spaces. However, the logical possibility is not present because of 3 main reasons.

  • Universal names that are used in the DTDs for attribute and property definitions cannot be included as part of the namespaces.
  • The namespaces and aliases that are used within documents may conflict as we are dealing with both XML and DTD documents.
  • The validation process will not be successful with universal names used as part of definitions.

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: