I have the following xsml file
<?xml version="1.0" encoding="UTF-8"?>
<gas-xml xmlns="http://gas-xml.de/3.2/gas-xml">
<body>
<data>
<voplist object-id="someID" period="hour" values-per-period="1" >
<vopset quantity="Vbus">
<vop i="0" state="">0</vop>
<vop i="1" state="">0</vop>
<vop i="2" state="">0</vop>
</vopset>
</voplist>
</data>
</body>
</gas-xml>
I try to transform it to another xml file with this code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<body>
<timeseries dateformat="yyyy-MM-dd'T'HH:mm:ssZ" freq="Hourly" valuealign="left">
<xsl:for-each select="/body/data/voplist/vopset/vop">
<value>
<xsl:attribute name="time">
<xsl:value-of select="@i"/>
</xsl:attribute>
</value>
</xsl:for-each>
</timeseries>
</body>
</xsl:template>
</xsl:stylesheet>
But somehow the Namespace <gas-xml xmlns="http://gas-xml.de/3.2/gas-xml">
doesn't let for-each to read through the xml file because when i delete the part xmlns="http://gas-xml.de/3.2/gas-xml
from the namespace it works fine. I have used the Method with extensions but the system I am working with doesn't allow extensions. So I am looking for an another solution rather than using extensions.