[thelist] XSL translation

Nick Lester nick at flowbike.com
Mon Mar 1 08:55:47 CST 2004


Hi

I Asked this question a while back but I deleted the answer by mistake!!

I have an XML  doc like below

<?xml version="1.0"?>
<data>
<record Title="Mr" Forename="Nick" Surname="Lester" />
<record Title="Mr" Forename="Joe" Surname="Bloggs" />
</data>

I need an XSLT transformation that turns it into

<data>
  <record Title="Mr">
   <Forename>Nick</Forename>
   <Surname>Lester</Surname>
  </record>
  <record Title="Mr">
   <Forename>Joe</Forename>
   <Surname>Bloggs</Surname>
  </record
</data>


All nodes apart from Title can may be different, that is they cant be
hardcoded into the XSL as new nodes may be addes / removed such as
<Address> <Telephone>   etc...

Thanks ever so much in advance...

Nick





More information about the thelist mailing list