Importing ODK XML file to MS Access using XLST transformation

I'm trying to import ODK survey submission.xml files to MS Access using
XLST transformation. See my post here on StackOverflow :
http://goo.gl/5UN5Uh.

Anyone who have tried this before with success? I can't get this XLST to
insert an 'instanceID' at each element node 'skd':

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output indent="yes" encoding="utf-8"/>
<xsl:strip-space elements="*"/>

<xsl:template match="/">

<xsl:apply-templates select="@*|node()"/>

</xsl:template>

<xsl:template match="@|node()">
xsl:copy
<xsl:apply-templates select="@
|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="//skd">
xsl:copy
<xsl:apply-templates select="@*|node()"/>

<xsl:apply-templates select="node()"/>
</xsl:copy>

</xsl:template>

</xsl:stylesheet>

I've checket the XPATH at http://www.freeformatter.com/xpath-tester.html
and it seems to be OK.

Any suggestions what I'm doing wrong here?

//Sid

I just got an answer to my question via stackoverflow. To import your
submission.xml files to MS Access the XSL-files should look something like
this:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:odk="http://opendatakit.org/submissions"
exclude-result-prefixes="odk">
<xsl:output indent="yes" encoding="utf-8"/>
<xsl:strip-space elements="*"/>

<xsl:template match="/">

<xsl:apply-templates select="@*|node()"/>

</xsl:template>

<xsl:template match="@|node()">
xsl:copy
<xsl:apply-templates select="@
|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="odk:skd">
xsl:copy
<xsl:apply-templates select="@*"/>

<xsl:value-of
select="/odk:SoLa_Tu_Insp_2016-03-13/@instanceID"/>

<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>

You have to use namespaces when referring to nodes in the ODK
submission.xml file.

Now I'm happily importing all of my ODK surveys into MS Access directly.

Den söndag 10 april 2016 kl. 14:56:44 UTC+2 skrev Sid Patel:

··· > > I'm trying to import ODK survey submission.xml files to MS Access using > XLST transformation. See my post here on StackOverflow : > http://goo.gl/5UN5Uh. > > Anyone who have tried this before with success? I can't get this XLST to > insert an 'instanceID' at each element node 'skd': > > >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> I've checket the XPATH at http://www.freeformatter.com/xpath-tester.html >> and it seems to be OK. > > > Any suggestions what I'm doing wrong here? > > //Sid >