XML
  Home arrow XML arrow Page 4 - An Introduction to XSLT
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

An Introduction to XSLT
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 12
    2004-09-20

    Table of Contents:
  • An Introduction to XSLT
  • Create Elements to Apply the Transformations
  • Another Template
  • Discussion of the Output
  • Page Masters
  • Block Level Elements

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    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.

    More XML Articles
    More By Dan Wellman


       · What is it with XML authors that can't use basic HTML correctly?Mixed case HTML...
       · excellent point, i know what you mean by this valid stuff...i see it from many...
       · Hi,Yes Dev ur right. It happens when u program it without going through its...
     

    XML ARTICLES

    - 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
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek