Re: [xsl] tutorial xml to xml using xslt

Subject: Re: [xsl] tutorial xml to xml using xslt
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Tue, 20 Feb 2001 15:39:05 -0800
There is an excellent book on XSLT by Michael Kay on Wrox press called
Professional XSLT or something like that.  If you need to get up to speed
fast, this book is the best way (THE best book out there on the subject).
Michael Kay is also the writer of Saxon (a very popular XSL processor). The
book will show you how to do pretty much anything with XSLT (which is alot).
Also there is a very active XSL list at:

What you want is very similar to outputting HTML so the tutorials you have
found will work. Just change the xsl:output to xml rather than html.  Or you
could just output text and put in all the necessary info that way. (I have
made a simple example below that outputs to text)

Alternatively you might be interested in a utility on alphaworks:
that will convert one xml document to another using the two documents DTDs.
I don't remember the name, sorry.

The example
xml document:

  <title> the title</title>
  <para> a para para para para para</para>
an xsl:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
<xsl:output method="text"/>

<xsl:template match="article">

<xsl:template match="title">

<xsl:template match="para">

the output:

   <foo.title>the title</foo.title>
   <foo.para>a para para para para para</foo.para>

----- Original Message -----
From: "Tom Belich" <TBelich@xxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, February 20, 2001 2:46 PM
Subject: [xsl] tutorial xml to xml using xslt

> Does anyone know of a good tutorial for transforming xml to another xml
> document using xslt?  All the ones I've seen describe xml to html
> transformations.  I need to transform an experiment xml file into an xml
> file that I can add to my database.
>  XSL-List info and archive:

 XSL-List info and archive:

Current Thread