0

I have this XML

<WarehouseStatus xmlns="http://thsintegration.int.kn/warehousestatus/3_0" xsi:schemaLocation="http://thsintegration.int.kn/warehousestatus/3_0 schema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DepotCode>KN-USMIA11</DepotCode>
<HAWBNumber>3000486512</HAWBNumber>
<WarehouseStatus>Y</WarehouseStatus>
</WarehouseStatus>

I am trying to rebuild it with an XSL (so initially I am just trying to essentially rebuild it exactly, though later I will add more logic - hence not using a "copy all" function)

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns="http://thsintegration.int.kn/warehousestatus/3_0" xsi:schemaLocation="http://thsintegration.int.kn/warehousestatus/3_0 schema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
  <xsl:template match="/">
    <WarehouseStatus >
<DepotCode>
                <xsl:value-of select="WarehouseStatus/DepotCode"/>
</DepotCode>
    </WarehouseStatus>
  </xsl:template>
</xsl:stylesheet>

But it won't return the actual value (using an online XSLT test tool)

Result:

<?xml version="1.0" encoding="UTF-8"?><WarehouseStatus xmlns="http://thsintegration.int.kn/warehousestatus/3_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

0 Answers0