AMAZON

Showing posts with label learn. Show all posts
Showing posts with label learn. Show all posts

Monday, September 17, 2012

XML interview question for DCU, Data entry operator job

Describe the role that XSL can play when dynamically generating HTML pages from a relational database.

Even if candidates have never participated in a project involving this type of architecture, they should recognize it as one of the common uses of XML. Querying a database and then formatting the result set so that it can be validated as an XML document allows developers to translate the data into an HTML table using XSLT rules. Consequently, the format of the resulting HTML table can be modified without changing the database query or application code since the document rendering logic is isolated to the XSLT rules.

Give a few examples of types of applications that can benefit from using XML.

There are literally thousands of applications that can benefit from XML technologies. The ball of this question is not to have the candidate rattle off a laundry list of projects that they have worked on, but, rather, to allow the candidate to explain the rationale for choosing XML by citing a few real world examples. For instance, one appropriate answer is that XML allows content management systems to store documents independently of their format, which thereby reduces data redundancy. Another answer relates to B2B exchanges or supply chain management systems. In these instances, XML provides a mechanism for multiple companies to exchange data according to an agreed upon set of rules. A third common response involves wireless applications that require WML to render data on hand held devices.



What is DOM and how does it relate to XML?

The Document Object Model (DOM) is an interface specification maintained by the W3C DOM Workgroup that defines an application independent mechanism to access, parse, or update XML data. In simple terms it is a hierarchical model that allows developers to manipulate XML documents easily Any developer that has worked extensively with XML should be able to discuss the concept and use of DOM objects freely. Additionally, it is not unreasonable to expect advanced candidates to thoroughly understand its internal workings and be able to explain how DOM differs from an event-based interface like SAX.






What is SOAP and how does it relate to XML?

The Simple Object Access Protocol (SOAP) uses XML to define a protocol for the exchange of information in distributed computing environments. SOAP consists of three components: an envelope, a set of encoding rules, and a convention for representing remote procedure calls. Unless experience with SOAP is a direct requirement for the open position, knowing the specifics of the protocol, or how it can be used in conjunction with HTTP, is not as important as identifying it as a natural application of XML.
 Can you walk us through the steps necessary to parse XML documents?

Superficially, this is a fairly basic question. However, the ball is not to determine whether candidates understand the concept of a parser but rather have them walk through the process of parsing XML documents step-by-step. Determining whether a non-validating or validating parser is needed, choosing the appropriate parser, and handling errors are all important aspects to this process that should be included in the candidate's response.


Give some examples of XML DTDs or schemas that you have worked with.

Although XML does not require data to be validated against a DTD, many of the benefits of using the technology are derived from being able to validate XML documents against business or technical architecture rules. Polling for the list of DTDs that developers have worked with provides insight to their general exposure to the technology. The ideal candidate will have knowledge of several of the commonly used DTDs such as FpML, DocBook, HRML, and RDF, as well as experience designing a custom DTD for a particular project where no standard existed.


Using XSLT, how would you extract a specific attribute from an element in an XML document?

Successful candidates should recognize this as one of the most basic applications of XSLT. If they are not able to construct a reply similar to the example below, they should at least be able to identify the components necessary for this operation: xsl:template to match the appropriate XML element, xsl:value-of to select the attribute value, and the optional xsl:apply-templates to continue processing the document.

Extract Attributes from XML Data

Example 1.
Attribute Value:
<xsl:value-of select="@attribute"/>


When constructing an XML DTD, how do you create an external entity reference in an attribute value?

Every interview session should have at least one trick question. Although possible when using SGML, XML DTDs don't support defining external entity references in attribute values. It's more important for the candidate to respond to this question in a logical way than than the candidate know the somewhat obscure answer.


How would you build a search engine for large volumes of XML data?

The way candidates answer this question may provide insight into their view of XML data. For those who view XML primarily as a way to denote structure for text files, a common answer is to build a full-text search and handle the data similarly to the way Internet portals handle HTML pages. Others consider XML as a standard way of transferring structured data between disparate systems. These candidates often describe some scheme of importing XML into a relational or object database and relying on the database's engine for searching. Lastly, candidates that have worked with vendors specializing in this area often say that the best way the handle this situation is to use a third party software package optimized for XML data.

What are the html codes used for html website, blog, learn it basics


How to make Lines (horizontal rules)


Making a horizontal rule is probably the easiest thing to write in HTML. This is the command for a horizontal rule:
<hr>

 

How to make text in different Colours

Changing the color of text is also very simple. Here is the command:
<font face="" size=9 color="">
Here is where you write your text.

The size you can change if you want it bigger or smaller. In between the ""s you put the code of whichever colour you wish to use. Follow this Link to see a list of some color codes.
 


How to make text in different sizes

There are two ways to make text in different sizes. The first way is explained above in How to make text different Colours. That way is a little more complicated. The way I'll show you here can make the text in 7 different sizes. Here is the script:
<h1>

This size

 


<h2>

This size

 


<h3> is size

<h4>

This size


<h5>
This size

<h6>
This size
 

When you put text between the <h#> tags then you change the size. h1 is the biggest and h7 is the smallest.


How to make image backgrounds

This is a little more complicated but its still fairly simple. At the top of your HTML document there should be a section that looks like this:
<body bgcolor="" text="" link="" vlink=""> Inbetween all the ""s there will be color codes.
To make your background into a pattern or a picture you first need to have a pattern or picture uploaded into your directory or know the URL of a good background.
Change the command - <body bgcolor=""
To the command - <body background=" the URL of a background file "
For example, the command at the top of your page might look like this: 
<body background="http://www.what.com/what.gif" text="#000000" link="#000000" vlink="#000000">

This would make your background into what.gif (this is just an example it won't actually work). It would make the writing, the links, and the visited links all black.


How to make a Link to Another Page

Making links is VERY easy. Here is the command:
<a href=" the URL of the link ">
For example, to make a link on your page to here it would look like this:
<a href="http://www.geocities.com/sunsetstrip/alley/5615/> 

This will make a link but you won't be able to see it or use it, to make it work you have to put some text in between the command and the command. You have to include the tag at the end of every link or the rest of your page will be the link!


How to make a link to another page in the same directory

Making a link to a page in the same directory as your intitial page is VERY VERY easy. Here is the script to do it.
<a href=" address of page ">  

For Example, here is how I made a link from this page to the page that shows you colors:
<a href="color.htm">

 

How to make an Image on your Page

OK, this is also an extremely simple command. It's basically a link but a little different. Here is the script:
<img src=" URL of the image ">


 

How to make Images Into Links

Making images into Links is as easy as combining the two commands:
<a href=" URL of the link "> <img src=" whatever.gif "> </a>
You have to make sure that the actual Link reference comes before the image. Also the link closing tag has to come last.

 

How to control the size of your Images


To do this all you have to do is add this into your image command:
width=whatever height=whatever
For example, here it is all together:
<img src="whatever.gif" width=50 height=50> 


 

How to make text appear beside an image

Have you ever noticed that when you type beside an image the text only starts at the bottom of the pic and you end up with a big empty space? Well, this little addition to the image command will solve that problem:
align=right or align=left 
For example, here it is all together:
<img src="whatever.gif" height=50 width=50 align=right>

You don't need to have the height and width in there. This command will do this:
Hey.. this text is at the top and not the bottom. How convenient eh?

 

How to make "freestyle" text

Making "freestyle"(in other words, text "as is") text is as easy as making it bold or italic. Here is the script:
<pre>
Here you put your writing.
</pre>
This way you can do whatever you want, write song lyrics without them turning into a paragraph, write words in list form, etc.

 

How to make a link that opens a new browser Window

This is as easy as adding a command at the end of the link command. Here is the command:
target=body
For example, here it is all together:
<a href=" URL of place " target=body>

This will open a new window when you make a link, especially useful when making links in chats.