i need to generate this xml with all things, namespaces on each node etc
<bdo_fosfec:RegistrosPagosElement xsi:type="bdo_fosfec:RegistrosPagos"
xmlns:bdo_fosfec="http://asocajas.app.com/example"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<registro54 xsi:type="bdo_fosfec:Registro54">
<registro82 xsi:type="bdo_fosfec:Registro82">
<C512>39756656</C512>
<C614>YAXMINNI</C614>
</registro82>
</registro54>
<registro54 xsi:type="bdo_fosfec:Registro54">
<registro82 xsi:type="bdo_fosfec:Registro82">
<C512>79374740</C512>
<C614>VICTOR</C614>
</registro82>
</registro54>
</bdo_fosfec:RegistrosPagosElement>
And i build a this XSLT
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<bdo_fosfec:RegistrosPagosElement xsi:type="bdo_fosfec:RegistrosPagos" xmlns:bdo_fosfec="http://asocajas.app.com/example" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:apply-templates select="registro54"/>
</bdo_fosfec:RegistrosPagosElement>
</xsl:template>
<!--TEMPLATE REGISTRO 54-->
<xsl:template match="registro54">
<registro54 xsi:type="bdo_fosfec:Registro54">
<registro82 xsi:type="bdo_fosfec:Registro82">
<C512><xsl:value-of select="C512"/></C512>
<C614><xsl:value-of select="C614"/></C614>
</registro82>
</registro54>
</xsl:template>
</xsl:stylesheet>
but when i transform myxml with the XSLT the result xml is not as expected
result:
<?xml version="1.0" encoding="utf-8"?>
<bdo_fosfec:RegistrosPagosElement xsi:type="bdo_fosfec:RegistrosPagos" xmlns:bdo_fosfec="http://asocajas.app.com/example" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
myxml
<?xml version="1.0" encoding="utf-8"?>
<bdo_fosfec_x003A_RegistrosPagosElement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<registro54>
<registro82>
<C512>123456789</C512>
<C614>Miguel</C614>
</registro82>
</registro54>
<registro54>
<registro82>
<C512>1234567890</C512>
<C614>Jerónimo</C614>
</registro82>
</registro54>
</bdo_fosfec_x003A_RegistrosPagosElement>
I do not know what I'm doing wrong, I've tried removing the nameSpace xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: type = "bdo_fosfec: RegistersPages" xmlns: bdo_fosfec = "http: //asocajas.hp.com/bdo_fosfec "of the stylesheet but it generates error, I also tried not to use" templates "and the result approaches the desired one but it is not the same that I hope
Thnks