I have the following xml structure:
<pago10:Pagos Version="1.0">
<pago10:Pago FechaPago="2017-09-09T12:00:00" FormaDePagoP="03" MonedaP="MXN" Monto="14000.00" NumOperacion="012180004457813372" RfcEmisorCtaOrd="BBA830831LJ2" NomBancoOrdExt="Banco patito" CtaOrdenante="0445781337" RfcEmisorCtaBen="BMN930209927" CtaBeneficiario="0560877">
<pago10:DoctoRelacionado IdDocumento="8A2D55A5-XXXX-4B28-AC8C-6E72EFBCFA61" Serie="A" Folio="1132" MonedaDR="MXN" MetodoDePagoDR="PUE" ImpSaldoAnt="14000" ImpPagado="14000" ImpSaldoInsoluto="0" />
</pago10:Pago>
<pago10:Pago FechaPago="2017-09-09T12:00:00" FormaDePagoP="04" MonedaP="MXN" Monto="14000.00" NumOperacion="012180004457813372" RfcEmisorCtaOrd="BBA830831LJ2" NomBancoOrdExt="Banco patito" CtaOrdenante="0445781337" RfcEmisorCtaBen="BMN930209927" CtaBeneficiario="0560877">
<pago10:DoctoRelacionado IdDocumento="8A2D55A5-XXXX-4B28-AC8C-6E72EFBCFA62" Serie="A" Folio="1132" MonedaDR="MXN" MetodoDePagoDR="PUE" ImpSaldoAnt="14000" ImpPagado="14000" ImpSaldoInsoluto="0" />
<pago10:DoctoRelacionado IdDocumento="8A2D55A5-XXXX-4B28-AC8C-6E72EFBCFA63" Serie="A" Folio="1132" MonedaDR="MXN" MetodoDePagoDR="PUE" ImpSaldoAnt="14000" ImpPagado="14000" ImpSaldoInsoluto="0" />
</pago10:Pago>
</pago10:Pagos>
and I paint a table with all DoctoRelacionado
tags:
IdDocumento*** Serie *** Folio ** etc
8A........FA61 ** A ** 1123 ** ...
8A........FA62 ** A ** 1132 ** ...
8A........FA63 ** A ** 1132 ** ...
Asterisks would be like the division of columns.
The problem is that I need to add a column with an attribute of the node pago
that is the parent of DoctoRelacionado
, in specific with FormaDePagoP
so that the table looks like this:
IdDocumento*** Serie *** Folio ** FormaDePagoP
8A........FA61 ** A ** 1123 ** 03
8A........FA62 ** A ** 1132 ** 04
8A........FA63 ** A ** 1132 ** 04
How could I do this with xpath
or with xslt
? I'm restricted to xslt 1.0
. and I can support Altova stylevision
.