Wednesday, June 27, 2007

XSLT

XSLT
******
http://www.w3.org/TR/xslt
http://www.biglist.com/lists/xsl-list/archives/200305/msg01187.html

http://www.biglist.com/lists/xsl-list/archives/200104/msg00963.html

********

XSLT is a language for transforming the structure of an XML document.

A transformation expressed in XSLT describes rules for transforming a source tree into a result tree. The transformation is achieved by associating patterns with templates. A pattern is matched against elements in the source tree. A template is instantiated to create part of the result tree. The result tree is separate from the source tree. The structure of the result tree can be completely different from the structure of the source tree. In constructing the result tree, elements from the source tree can be filtered and reordered, and arbitrary structure can be added.

A template is instantiated for a particular source element to create part of the result tree. A template can contain elements that specify literal result element structure. A template can also contain elements from the XSLT namespace that are instructions for creating result tree fragments.

Couln't go funther from here i my research was ended up by the change in requirement.
Still i would say its pretty good one.

Monday, June 25, 2007

DOM tutorial

http://www.developerlife.com/domintro/default.htm

Why Is XML Important?

Why Is XML Important?

There are a number of reasons for XML's surging acceptance. This section lists a few of the most prominent.

Plain Text

Because XML is not a binary format, you can create and edit files using anything from a standard text editor to a visual development environment. That makes it easy to debug your programs, and it makes XML useful for storing small amounts of data. At the other end of the spectrum, an XML front end to a database makes it possible to efficiently store large amounts of XML data as well. So XML provides scalability for anything from small configuration files to a company wide data repository.

Data Identification

XML tells you what kind of data you have, not how to display it. Because the markup tags identify the information and break the data into parts, an email program can process it, a search program can look for messages sent to particular people, and an address book can extract the address information from the rest of the message. In short, because the different parts of the information have been identified, they can be used in different ways by different applications.

Stylability

When display is important, the stylesheet standard, XSL, lets you dictate how to portray the data. For example, consider this XML:

you@yourAddress.com  

The stylesheet for this data can say

  1. Start a new line.
  2. Display "To:" in bold, followed by a space
  3. Display the destination data.

This set of instructions produces:

To: you@yourAddress  

Of course, you could have done the same thing in HTML, but you wouldn't be able to process the data with search programs and address-extraction programs and the like. More importantly, because XML is inherently style-free, you can use a completely different stylesheet to produce output in Postscript, TEX, PDF, or some new format that hasn't even been invented. That flexibility amounts to what one author described as "future proofing" your information. The XML documents you author today can be used in future document-delivery systems that haven't even been imagined.

Inline Reusability

One of the nicer aspects of XML documents is that they can be composed from separate entities. You can do that with HTML, but only by linking to other documents. Unlike HTML, XML entities can be included "inline" in a document. The included sections look like a normal part of the document: you can search the whole document at one time or download it in one piece. That lets you modularize your documents without resorting to links. You can single-source a section so that an edit to it is reflected everywhere the section is used, and yet a document composed from such pieces looks for all the world like a one-piece document.

Linkability

Thanks to HTML, the ability to define links between documents is now regarded as a necessity. Appendix B discusses the link-specification initiative. This initiative lets you define two-way links, multiple-target links, expanding links (where clicking a link causes the targeted information to appear inline), and links between two existing documents that are defined in a third.

Easily Processed

As mentioned earlier, regular and consistent notation makes it easier to build a program to process XML data. For example, in HTML a

tag can be delimited by
, another
,
, or . That makes for some difficult programming. But in XML, the
tag must always have a
terminator, or it must be an empty tag such as
. That restriction is a critical part of the constraints that make an XML document well formed. (Otherwise, the XML parser won't be able to read the data.) And because XML is a vendor-neutral standard, you can choose among several XML parsers, any one of which takes the work out of processing XML data.

Hierarchical

Finally, XML documents benefit from their hierarchical structure. Hierarchical document structures are, in general, faster to access because you can drill down to the part you need, as if you were stepping through a table of contents. They are also easier to rearrange, because each piece is delimited. In a document, for example, you could move a heading to a new location and drag everything under it along with the heading, instead of having to page down to make a selection, cut, and then paste the selection into a new location.

Thursday, June 21, 2007

XStream fight.

Morning started with searching the difference between XStream and other Parsers like DOM.

The motive was clear "find out which parser is better". But i was in nowhere looking out what is XStream and wat's DOM. It took 2 hours to understand and start working with XStream.
You can have look at it by

http://xstream.codehaus.org/tutorial.html

Than it was time to find out about DOM.

Well i must say i couldn't find any example to start with it. I got to hear that the kind of xml i'm gonna parse is gonna be easy with XStream. Even by Project Leader told me that. But i'm really looking some stuff with DOM parser.

Tuesday, June 19, 2007

Why to put the Web server in front of Tomcat at all?

http://people.apache.org/~mturk/docs/article/ftwai.html#cooliris

A. First thing to ease the load from the Tomcat is to use the Web server for serving static content like images, etc.

B. Second thing is creating an DMZ (demilitarized zone). Putting Web server on a computer host inserted as a "neutral zone" between a company's private network and the internet or some other outside public network gives the applications hosted on Tomcat capability to access company private data, while securing the access to other private resources.

C. The need for the custom authentication for example.

1st Day @ Java

Hmm. Finally i'm stepping in blogging. Hope it turns out good for me.

Knowledge is good but Sharing the knowledge is even better.