ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing ExpertRating - Online Certification and Employment Testing

ExpertRating Home
ExpertRating Benefits
Recommend ExpertRating
Suggest More Tests
Privacy Policy
FAQ
Login
 
XML Tutorial - Index
XML Tutorial - Introduction to XML
XML Tutorial - How XML interact with data?
XML Tutorial - How to write first XML document
XML Tutorial - What are XML Elements and Attributes?
XML Tutorial - What is XML Schema and DTD?
XML Tutorial - Which Browser support XML?
XML Tutorial - XML and Styles
XML Tutorial - Embedding XML in HTML
XML Tutorial - Working with XML Parser
XML Tutorial - Working with CDATA
     

 
Online Personal Trainer Certification
Personal Trainer Certification (Spanish)
Six Sigma Certification
Find a Personal Trainer
Project Management Certification
Six Sigma Certification
Six Sigma Black Belt Certification
Master Black Belt Certification
Six Sigma Green Belt Certification
Life Coach Certification
Lean Management Certification
Lean Six Sigma Certification
First Aid Certification
CPR Certification
Yoga Certification
Aerobics Certification
Pilates Certification
Business Analyst Certification
SEO Certification
Online Business Writing Course & Certification
Makeup Artist Certification
Baby Sitting Course & Certification
Time Management Certification
Health Club Management Certification
Medical Coding Certification
Medical Billing Certification
Business Analysis Course
Master Trainer Certification
Total Quality Management Certification
Kaizen Certification
Creative Writing Certification
Event Management Certification
Test Search by Job Title
Administrative Assistant Certification
Virtual Assistant Certification
  All Online Courses
   

   
   
   
   
   
   

   
  Home > Courses, Tutorials & eBooks > XML Tutorial >XML and Styles
 

XML Tutorial - XML and Styles

 
Page 2 of 3
 

Using XML with XSL

XML markup documents (usually) include formatting information. The information in an XML document may not be in the desired form to present it. Therefore there must be something in addition to the XML document that provides information on how to present or otherwise process the XML.               

Converting XML to HTML for display is probably the most common application of transformation today. Once you transform the XML data into HTML format, you can display it on any browser. There are two phases to the transformation process.

The first phase is a structural transformation, in which the data is converted from the structure of the incoming XML document to the structure of the desired output.

The second phase is a formatting transformation in which the new structure is changed to the required format (e.g., HTML, PDF, DB2, Oracle, etc.).

XSL

Originally, XSL's developers envisioned that XSL would be developed into a platform and media-independent formatting language composed of two parts, a formatting language and a transformation language. The formatting language was to be a set of XML elements that would describe the various parts of page media, such as tables, headers, and footnotes. These descriptive elements would be the "formatting objects". The transformation language was intended to convert an XML document into a result tree, consisting of the XSL formatting objects. The original XSL concept actually evolved into the following three XML-related languages :

XSL

The XML vocabulary for specifying formatting objectives and other semantics.

XSL Transformation (XSLT)

The language for transforming XML documents.

XML Path Language (XPath)

An expression language used to access or refer to parts of an XML document.

  • The XSL-related languages

  • XSL is a language for expressing style sheets.

  • XSL stylesheet is a file that describes how to display an XML document of a given type.

  • XSL shares the functionality and is compatible with CSS2, the latest version of CSS, although it uses a different syntax.

  • XSL adds advanced styling features, expressed by an XML document type, that define two sets of elements: formatting objects and attributes.

  • An XSL engine takes an XML document and an XSL stylesheet, and produces rendering of the document.

XPath

XML Path Language 1.0 is a language for addressing parts of an XML document

XPath is a language for finding the information in an XML document.

Using XPath, you can specify the locations of document, and then process the information using XSLT.

XSLT

XSLT is designed for transforming one XML document into another and uses its own kind of stylesheet to do so.

XSLT stylesheets actually change the structure and type of an XML document, for example, it automatically generate tables of contents, cross-references, indexes, etc.

XSLT stylesheets can also transform an XML document into another XML document, one using a different XML vocabulary from the original.

The XSLT stylesheet declares what output should be produced when a pattern in the XML document is matched.

For example, below is the source XML document :

                                    The CONTACTS XML Document :

    <?xml version = "1.0" encoding = "UTF-8"?>
    <?DOCTYPE CONTACTS SYSTEM "contacts.dtd">
    <?xml-stylesheet type-"text/xs1" href-"contacts.xslt"?>
    <CONTACTS>
                            <SALES>
                                           <NAME> Tim </NAME>
                                           <ADDRESS> House no. 23 </ADDRESS>
                                           <PHONE> 01800113456 </PHONE>
                            </SALES>
                            <SALES>
                                          <NAME> Smith </NAME>
                                          <ADDRESS> House no. 67 </ADDRESS>
                                          <PHONE> 01800789234 </PHONE>
                            </SALES>
                            <SALES>
                                          <NAME> John </NAME>
                                          <ADDRESS>House no. 55 </ADDRESS>
                                          <PHONE>01800678334 </PHONE>
                            </SALES>
    </CONTACTS>
     

 


 
     
Home  |  About Us  |  Privacy Policy  |  Site Map  |  FAQs  |  Contact Us
 
© ExpertRating 2015. All Rights Reserved.