XML : XSL transform MS Access 2007 output

I am exporting data from Access on regular basis. So far I used to export it and manually edit some tags to adjust it to Clients needs. Lately I found that that there is posibility to use XSL as a transformation pattern.

I am still beginner when comes to XSL but managed to create something like this:

  <?xml version="1.0" encoding="UTF-8"?>  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">    <xsl:template match="@*|node()">      <xsl:copy>          <xsl:apply-templates select="@*|node()"/>      </xsl:copy>  </xsl:template>    <xsl:template match="dataroot/Kwerenda_x0020_Nota_x0020_Kredytowa">      <xsl:element name="Faktury_od_nas">          <xsl:apply-templates />      </xsl:element>  </xsl:template>    </xsl:stylesheet>    

Generally it works ok but:
1. Normally when I export data it gives me every tag in a new line, now it is divided only by tag I changed.
2. I do not know how to rename dataroot. I tried to copy/paste same code but then I get dataroot everytime Faktury_od_nas appears...

I appreciate any help.

No comments:

Post a Comment