Home arrow XML arrow Page 4 - An Introduction to XSLT
XML

An Introduction to XSLT


XSLT allows you to create formatting structures which interpret and modify the existing XML elements. Learn about the syntax of XSLT elements, how the namespace attribute differs depending on the browser in use, and how to transform original XML elements.

Author Info:
By: Dan Wellman
Rating: 4 stars4 stars4 stars4 stars4 stars / 14
September 20, 2004
TABLE OF CONTENTS:
  1. · An Introduction to XSLT
  2. · Create Elements to Apply the Transformations
  3. · Another Template
  4. · Discussion of the Output
  5. · Page Masters
  6. · Block Level Elements

print this article
SEARCH DEVARTICLES

An Introduction to XSLT - Discussion of the Output
(Page 4 of 6 )

I have to admit at this stage, I've not been 100% truthful; the example we've just worked through does not output an HTML document.  It outputs an XHTML document, which is evident from the / that closes empty tags.  XHTML is based on XML and HTML, and is like a blessed marriage between the two. Because XML syntax is stricter than HTML, and this strictness is part of its strength, this is one of the features that XHTML has taken on. In HTML there are many tags that operate on their own, how often have you ever seen an </IMG> tag for example?  The answer should be 'never'.  Because any opened tags must subsequently be closed in XHTML (as in XML), you need to add a forward slash at the end of an element that has no closing tag.  This is why our line-break tags ended with forward slashes.

What we've looked at in the course of this article is merely a tiny part of XSLT as a whole, there are many, many more aspects and applications of the language and in all honesty, we have but scratched the surface. For example, in addition to matching templates to element patterns, you can also match attributes, ID's and processing instructions.  Additionally, in the same way that we matched the root element with a / as in:

<xsl:template match="/">

You can also use the pipe symbol | to specify or, and the /* symbol to specify any.


blog comments powered by Disqus
XML ARTICLES

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials