[Home] [By Thread] [By Date] [Recent Entries]


Hi, sorry but I can't figure out the xslt group and I know I can get a quick question here.
 
It's something common so I want to know which is the best well-known approach.
 
Let's say I have:
 
<exported-data>
<department name="accounting">
  <member>
      <name>foo</name>
  </member>
  <member>
       <name>Peter</name>
  </member>
</department>
<department name="other">
....
</exported-data>
 
And I want to create an xslt stylesheet to transform the XML into SQL statements for the tables:
department(id,name)
members(id,name,deptid)
 
I can assume the tables are empty
 
Which is the best approach? obviously the problem is dealing with ids, you have to mantain the id for each member of the
department and "increment" ids as you create new departments/ members.
 
Thanks!
Garland

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member