XML
  Home arrow XML arrow Page 6 - Understanding XSLT transformations: Your O...
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 
Sun Developer Network 
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

Understanding XSLT transformations: Your Own `XML Transformation Utility`
By: Jagadish Chaterjee
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2005-12-28

    Table of Contents:
  • Understanding XSLT transformations: Your Own `XML Transformation Utility`
  • Understanding the XML and XSLT
  • “XML transformation utility,” is it really necessary?
  • Developing your own XML transformation utility
  • Understanding the XML transformation utility
  • Testing further with different types of XML

  • 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


    Understanding XSLT transformations: Your Own `XML Transformation Utility` - Testing further with different types of XML


    (Page 6 of 6 )

    The above samples, which I gave, are quite simple.  Let us further extend the same “Hello World” example with different types of XML. 

    Let us consider the following modifications for the same XML document:

    <?xml version="1.0" encoding="utf-8"?>
    <?xml-stylesheet type="text/xsl" href="Sample1.xsl"?>
    <greeting>
                <Hello>Hello, World!</Hello>
    </greeting>

    If you transform the above XML with same XSL as above, you will still receive the same output (or the same transformation).  You should be clear that “.” (dot) refers to the text present in the current node (of the context) along with all the other nodes nested within the same context.  That is why, even though “Hello World” is nested in another element, we could still get it out.

    For that matter, if you modify the same XML to the following:

    <?xml version="1.0" encoding="utf-8"?>
    <?xml-stylesheet type="text/xsl" href="Sample1.xsl"?>
    <greeting>
                Hello, World1!
                <Hello>Hello, World2!</Hello>
                <Hello>Hello, World3!</Hello>
    </greeting>

    There is no doubt that you get all the three messages in bold.

    Remarks

    Even though I used a simple example for XSLT transformation, XSLT has its own depth.  I shall now and then contribute articles about XSLT.  So, do not forget to check this website frequently.  For all of my future articles on XSLT, you can work with the same tool (or utility) I provided along with this article.

    The utility that we developed now, is primarily a basic utility for beginners to test their XSLT expertise and is not intended for any production usage.  If you have any better ideas for developing the utility, please do not forget to post about them.

    The entire demonstration solution has been developed using Visual Studio 2005 Professional Edition on Windows Server 2003 Standard Edition. Note that I didn’t really test the solution on any of the other versions/editions related to the similar suite of Microsoft products. 

    Any comments, suggestions, ideas, improvements, bugs, errors, feedback etc. are highly appreciated at jag_chat@yahoo.com.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Hello guys..you can try my simple "XML Transformation Utility" here and give me some...
     

    XML ARTICLES

    - 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
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
    Stay green...Green IT