Extensible Stylesheet language XSL basics

  • Published on

  • View

  • Download


XSLExtensible Stylesheet Language1Arvind pande M.E , MCTShttp://arvindpandeblog.blogspot.inwww.facebook.com/digitalpadmhttp://arvindpandeblog.blogspot.in/http://www.facebook.com/digitalpadmXML capturing and storing data it handles data on cross platform it makes data exchange easier it provides data validation facilitiesXSLTransforms data from one format to anotherprovides formatting commands as per requirementIt add new content to xml2HTMLXML(content)XSL(presentation)XSLProcessorEXtensible Style sheet Language 3Transformation Language XSL is a transformation language it transforms a document written in one language (XML)into a document of another language (e.g., HTML)Transformation Engine(XSL Parser)XSLXML HTML4SOURCE OF DATA (DATABASE)APPLICATION PROGRAMXMLXSL FILES XSL FILES XSL FILESMOBILE COMPUTER5XSL Document Structurexsl:stylesheettemplate rule for the documenttemplate rule for a child elementaction on the documentaction on the child element6XSL Document Structure[action][action][action]...7Template Rules[ action ]8 An XSL style sheet consists of one or more set of rules that are called templates. Since an XSL style sheet is always begins with the XML declaration: The next elementDisplaying XML on the web XML documents do not carry information about how to display the data. A generic XML document is rendered as raw XML text by most web browser. In order to style the rendering in a browser with CSS or xsl , the XML document must include a reference to the stylesheet.XSLT XSLT is a language for Transforming XML documents into XHTML documents To other XML documents. XSLT uses XPath to navigate in XML documents XPath is a language for navigating in XML documents. It provides expression a for searching specific parts of XML document.11In the transformation process, XSLT uses XPath to define parts of the source document that should match one or more predefined templates. When a match is found, XSLT will transform the matching part of the source document into the result document.How Does it Work?12The element is used to extract the value of a selected node.The ElementThe element can be used to extract the value of an XML element and add it to the output stream of the transformation:13The ElementThe XSL element can be used to select every XML element of a specified node-set:Filtering the OutputWe can also filter the output from the XML file by adding a criterion to the select attribute in the element.< xsl:for-each select=College/ Student >14The element is used to sort the output.Where to put the Sort InformationTo sort the output, simply add an element inside the element in the XSL file:This element is used to put a conditional test against the content of the XML file.......some output if the expression is true...... The element is used in conjunction with and to express multiple conditional tests.The ElementSyntax... some output ...... some output ....17For Recent Technology , inventions , innovation & To Download slides, programs, tutorials , assignments and moreVisithttp://arvindpandeblog.blogspot.inhttp://www.facebook.com/digitalpadmThank you ! http://arvindpandeblog.blogspot.in/http://www.facebook.com/digitalpadm


View more >