This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Creating an xml doc from another xml doc via xsl


I know it is possible, but I've yet to see any examples on how to create an
xml document from an xml document and a stylesheet.  For instance, I have
this xml from a database:

<resultset>
   <result>
        <name> Matt </name>
        <age>    23 </age>
        <course> cos-399 </course>
    </result>
    <result>
        <name> Joe </name>
        <age>    22 </age>
        <course> cos-399 </course>
    </result>
</resultset>

and I want to transform it to be

<courses>
    <course title="cos-399">
        <student>
            <name> Matt </name>
            <age>    23 </age>
        </student>
        <student>
            <name> Joe </name>
            <age>    22 </age>
        </student>
    </course>
</courses>


Can anyone point out some exmaples?  Or explain how to do this?

-matt


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]