Home arrow XML arrow Page 6 - Understanding XSLT transformations: Your Own `XML Transformation Utility`

Understanding XSLT transformations: Your Own `XML Transformation Utility`

This article mainly concentrates on the basics of transforming XML documents, along with developing your own utility to transform XML to XSLT using Visual Studio 2005.

Author Info:
By: Jagadish Chaterjee
Rating: 5 stars5 stars5 stars5 stars5 stars / 7
December 28, 2005
  1. · Understanding XSLT transformations: Your Own `XML Transformation Utility`
  2. · Understanding the XML and XSLT
  3. · “XML transformation utility,” is it really necessary?
  4. · Developing your own XML transformation utility
  5. · Understanding the XML transformation utility
  6. · Testing further with different types of XML

print this article

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"?>
            <Hello>Hello, World!</Hello>

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"?>
            Hello, World1!
            <Hello>Hello, World2!</Hello>
            <Hello>Hello, World3!</Hello>

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


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.

blog comments powered by Disqus

- 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 

Developer Shed Affiliates


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