ASP 101 - Active Server Pages 101 - Web05
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates

ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

 Top ASP 101 Stories Top ASP 101 Stories
Migrating to ASP.NET
Getting Scripts to Run on a Schedule
The Top 10 ASP Links @

Scriptless ASP Pages
Show All Tips >>
ASP 101 RSS Feed ASP 101 Updates

Back Contents Next

Case Study: Data-Driven XSL


As business to business commerce and inter-enterprise communication via XML continues to explode, developers will continually be faced with situations where they must convert XML documents from an incoming structure to the structure they use internally. It is this translation requirement that we will use as the premise for this case study.

For an example situation where you might want to carry out such translations, consider converting an invoice sent by a field office into a format that is used by central office. The central office computer would have an application, or a web page, that could load the incoming invoice, extract only the information required by central office, and present it in a way that is relevant to the staff at central office, that is, with its data labels changed. Such a utility would save much time and trouble sifting through lots of data just to pick out the snippets of useful information.

In this case study we will show how to use ASP to create an XSL file dynamically, and we will data-drive the process using an XML file to define the contents of the XSL file. It is not the intent of this case-study to provide the ultimate translation tool. In fact, this is a simple translation tool that will only map elements to other elements, working within a fixed container/item structure. The mapping process that takes place could be achieved by a simple XSL transformation, which is effectively what we are doing, with the exception that the XSL is being generated on demand.

Meet the Puzzle Pieces

Our example consists of the following pieces:

File name



In-bound XML that needs to be translated


Client-side test page that shows the translation at work


The ASP page that generates the XSL


The definition file for the translation. This is the data that defines the mapping between structures

The pieces are related to each other as shown below:

Back Contents Next
1999 Wrox Press Limited, US and UK.
Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers