Web design with XML and XSL
Running Head : Web design with XML and XSL Web design with XML and XSL 22nd July 2007 Abstract This is concerned with web design with XML and XSL . Extensible Stylesheet language (XSL ) is a transformation language in the sense that it provides finer rules to convert an XML document to another XML document We have discussed the transformation rules for converting XML to XML using XSL Introduction Concerting one XML to another XML takes into account a series of transformations steps which successfully does the job As

XSL is under development , another name XSLT inherits all its features and is recommended by W3C
Step : 1
Every XML document is a tree , data structure , composed of connected nodes beginning with a top node called the root (XML Bible . It further branches into other trees and ends with leaf nodes . It is considered as nodes in general
An XSLT processor , responsible for the transformation , models an XML document into a tree that includes seven kinds of nodes
Root
Elements
Text
Attributes
Namespaces
Processing information
Comments
Step 2
The XSLT transforms one XML tree , taken as an input to another XML tree the final output . It is also termed as tree building part , meaning
The operators are used for selecting nodes from a tree
Then it res the nodes and
Finally outputs the nodes
The operation part of the transformation is as follows
It contains template rules for conversion , usually contained in the xsl :template element . For example , to apply to the root node of the input tree
p
p
br It first needs fix a pattern specifying the nodes it matches the match attribute holds the pattern of the rule
It needs to instantiate a template to hold the output
Instruction regarding selecting parts of the input tree to be included in the output tree is taken care by one or more XSLT elements
Matching the root element , to be transformed first to the output document (the value ' matches the root element . For example
p
p
p The select attribute is used for replacing text . For example
p
p The value of element is used to compute the value of the node to copy it to the output document . For example
p
p Applying simple template to more than one element . It can be done using wildcard (` . For example
p
p
p Matching children and descendants with ` ' and ` . For example
p
p
p Matching with ID and ` ' symbol . For example
p
p
p
Matching comments . For example
p
br Finally it would output the pattern into the template once it matches the content of the xsl :template is the output element
Step 3 : Another way for conversion
The preprocessing of the XML can be avoided by transferring it to the client with the XSLT which explains the rendering process . It can be done by attaching the XSLT style sheet with the XML document and insert the processing instruction (it must have a type attribute with value `text /xml ' and link to the document pointed to by the style sheet in the prolog after the XML...





