I have a xml generated from SharePoint and I need to extract some data and generate a simplifed xml
This is my original (simplified) source file
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="http://itkm.gamesacorp.com/applications/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<id>f8a19240-e319-454a-b4a6-fab8e3470c8d</id>
<title />
<updated>2018-01-17T15:13:15Z</updated>
<entry m:etag=""53"">
<id>Web/Lists(guid'fe244c05-99f9-4b69-8727-46327122b245')/Items(1)</id>
<content type="application/xml">
<m:properties>
<d:Codigo>0002</d:Codigo>
<d:App_x0020_name>GOT</d:App_x0020_name>
</m:properties>
</content>
</entry>
<entry m:etag=""49"">
<id>Web/Lists(guid'fe244c05-99f9-4b69-8727-46327122b245')/Items(3)</id>
<content type="application/xml">
<m:properties>
<d:Codigo>0006</d:Codigo>
<d:App_x0020_name>ALTAIR</d:App_x0020_name>
</m:properties>
</content>
</entry>
</feed>
And this is my xslt
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml" standalone="no" omit-xml-declaration="no"/>
<xsl:template match="feed">
<Applications>
<xsl:for-each select="entry">
<App>
<Code><xsl:value-of select="content/properties/Codigo"/></Code>
<Name><xsl:value-of select="content/properties/App_x0020_name"/></Name>
<Uri><xsl:value-of select="id"/></Uri>
</App>
</xsl:for-each>
</Applications>
</xsl:template>
</xsl:stylesheet>
If I omit namespaces in both xml and xslt, the result is as expected, but I need the xlst working with the namespaces, but I don't what namespaces (and how) include in the xslt
This is the modified xml that works for me, please note that I removed all the references to the namespaces:
<?xml version="1.0" encoding="utf-8"?>
<feed>
<id>f8a19240-e319-454a-b4a6-fab8e3470c8d</id>
<title />
<updated>2018-01-17T15:13:15Z</updated>
<entry etag=""53"">
<id>Web/Lists(guid'fe244c05-99f9-4b69-8727-46327122b245')/Items(1)</id>
<content type="application/xml">
<m:properties>
<Codigo>0002</Codigo>
<App_x0020_name>GOT</App_x0020_name>
</m:properties>
</content>
</entry>
</feed>
How can I do with the xslt to work with namespaces?