Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - XML / XSLT map field names [Thread Next] Re: XML / XSLT map field namesTo: NULL Date: 12/4/2007 1:58:00 PM rbrowning1958 wrote: > New to XML and wonder whether I need to learn it to implement > following - can it do this? > > I need to accept data exported from relational databases and stored in > XML. Problem I have is the field names exported will not be the field > names I need for the import so I need to map these field names > somehow. Is this something XSLT can handle easily, and if so can > someone reccommend a good resource to learn this? It is easy, start with the identity transformation template <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template> then add templates that transform your elements as needed e.g. if you want to map 'record' elements to 'item' elements you add <xsl:temlate match="record"> <item> <xsl:apply-templates select="@* | node()"/> </item> </xsl:template> -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
