sw_fac 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +26 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/cadena/ComercioExterior11.xslt +181 -0
- data/lib/cadena/Pagos10.xslt +165 -0
- data/lib/cadena/TuristaPasajeroExtranjero.xslt +40 -0
- data/lib/cadena/aerolineas.xslt +50 -0
- data/lib/cadena/cadena33.xslt +349 -0
- data/lib/cadena/certificadodedestruccion.xslt +60 -0
- data/lib/cadena/cfdiregistrofiscal.xslt +19 -0
- data/lib/cadena/cfdv33.xsd +737 -0
- data/lib/cadena/consumodecombustibles.xslt +108 -0
- data/lib/cadena/detallista.xslt +42 -0
- data/lib/cadena/divisas.xslt +13 -0
- data/lib/cadena/donat11.xslt +13 -0
- data/lib/cadena/ecc11.xslt +102 -0
- data/lib/cadena/iedu.xslt +26 -0
- data/lib/cadena/implocal.xslt +39 -0
- data/lib/cadena/ine11.xslt +51 -0
- data/lib/cadena/leyendasFisc.xslt +28 -0
- data/lib/cadena/nomina12.xslt +412 -0
- data/lib/cadena/notariospublicos.xslt +301 -0
- data/lib/cadena/obrasarteantiguedades.xslt +33 -0
- data/lib/cadena/pagoenespecie.xslt +39 -0
- data/lib/cadena/pfic.xslt +13 -0
- data/lib/cadena/renovacionysustitucionvehiculos.xslt +152 -0
- data/lib/cadena/servicioparcialconstruccion.xslt +44 -0
- data/lib/cadena/terceros11.xslt +108 -0
- data/lib/cadena/utilerias.xslt +22 -0
- data/lib/cadena/valesdedespensa.xslt +70 -0
- data/lib/cadena/vehiculousado.xslt +63 -0
- data/lib/cadena/ventavehiculos11.xslt +53 -0
- data/lib/sw_fac/config.rb +69 -0
- data/lib/sw_fac/facturacion.rb +616 -0
- data/lib/sw_fac/tools.rb +105 -0
- data/lib/sw_fac/version.rb +3 -0
- data/lib/sw_fac.rb +18 -0
- data/sw_fac.gemspec +38 -0
- data/test/sw_fac_test.rb +11 -0
- data/test/test_helper.rb +4 -0
- metadata +146 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c9797700bc01699b7630ea278582450fd4a91594
|
4
|
+
data.tar.gz: ca81e9d49186af8bac0cd91a7930b9b9e9cfb899
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e1d1518b868f08a4010c40a34b318d9f2f8f136aa9f1fbc33e3eab8c4e1d1307db5c6e9097a969d72ec44c994a779ce28ccb542a3a75bcf6f24ec9b5e7b93e16
|
7
|
+
data.tar.gz: 682386e5b4611497cc275755cc709c8d745adeae8d59043e38fba04e8f9ca3a77d092a2324b0ad5bdd5d6388aa5c1e555b67c58639c8152ae5094f64c4c1d3d7
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sw_fac (0.1.0)
|
5
|
+
nokogiri (= 1.8.2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
mini_portile2 (2.3.0)
|
11
|
+
minitest (5.11.3)
|
12
|
+
nokogiri (1.8.2)
|
13
|
+
mini_portile2 (~> 2.3.0)
|
14
|
+
rake (10.5.0)
|
15
|
+
|
16
|
+
PLATFORMS
|
17
|
+
ruby
|
18
|
+
|
19
|
+
DEPENDENCIES
|
20
|
+
bundler (~> 1.16)
|
21
|
+
minitest (~> 5.0)
|
22
|
+
rake (~> 10.0)
|
23
|
+
sw_fac!
|
24
|
+
|
25
|
+
BUNDLED WITH
|
26
|
+
1.16.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Angel Padilla
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# SwFac
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/sw_fac`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'sw_fac'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install sw_fac
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/sw_fac.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "sw_fac"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,181 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:cce11="http://www.sat.gob.mx/ComercioExterior11">
|
3
|
+
|
4
|
+
<xsl:template match="cce11:ComercioExterior">
|
5
|
+
<!--Manejador de nodos tipo ComercioExterior-->
|
6
|
+
<xsl:call-template name="Requerido">
|
7
|
+
<xsl:with-param name="valor" select="./@Version" />
|
8
|
+
</xsl:call-template>
|
9
|
+
<xsl:call-template name="Opcional">
|
10
|
+
<xsl:with-param name="valor" select="./@MotivoTraslado" />
|
11
|
+
</xsl:call-template>
|
12
|
+
<xsl:call-template name="Requerido">
|
13
|
+
<xsl:with-param name="valor" select="./@TipoOperacion" />
|
14
|
+
</xsl:call-template>
|
15
|
+
<xsl:call-template name="Opcional">
|
16
|
+
<xsl:with-param name="valor" select="./@ClaveDePedimento" />
|
17
|
+
</xsl:call-template>
|
18
|
+
<xsl:call-template name="Opcional">
|
19
|
+
<xsl:with-param name="valor" select="./@CertificadoOrigen" />
|
20
|
+
</xsl:call-template>
|
21
|
+
<xsl:call-template name="Opcional">
|
22
|
+
<xsl:with-param name="valor" select="./@NumCertificadoOrigen" />
|
23
|
+
</xsl:call-template>
|
24
|
+
<xsl:call-template name="Opcional">
|
25
|
+
<xsl:with-param name="valor" select="./@NumeroExportadorConfiable" />
|
26
|
+
</xsl:call-template>
|
27
|
+
<xsl:call-template name="Opcional">
|
28
|
+
<xsl:with-param name="valor" select="./@Incoterm" />
|
29
|
+
</xsl:call-template>
|
30
|
+
<xsl:call-template name="Opcional">
|
31
|
+
<xsl:with-param name="valor" select="./@Subdivision" />
|
32
|
+
</xsl:call-template>
|
33
|
+
<xsl:call-template name="Opcional">
|
34
|
+
<xsl:with-param name="valor" select="./@Observaciones" />
|
35
|
+
</xsl:call-template>
|
36
|
+
<xsl:call-template name="Opcional">
|
37
|
+
<xsl:with-param name="valor" select="./@TipoCambioUSD" />
|
38
|
+
</xsl:call-template>
|
39
|
+
<xsl:call-template name="Opcional">
|
40
|
+
<xsl:with-param name="valor" select="./@TotalUSD" />
|
41
|
+
</xsl:call-template>
|
42
|
+
|
43
|
+
<!-- Iniciamos el manejo de los elementos hijo en la secuencia -->
|
44
|
+
<xsl:apply-templates select="./cce11:Emisor" />
|
45
|
+
<xsl:for-each select="./cce11:Propietario">
|
46
|
+
<xsl:apply-templates select="."/>
|
47
|
+
</xsl:for-each>
|
48
|
+
<xsl:apply-templates select="./cce11:Receptor" />
|
49
|
+
<xsl:for-each select="./cce11:Destinatario">
|
50
|
+
<xsl:apply-templates select="."/>
|
51
|
+
</xsl:for-each>
|
52
|
+
<xsl:apply-templates select="./cce11:Mercancias" />
|
53
|
+
</xsl:template>
|
54
|
+
|
55
|
+
<xsl:template match="cce11:Emisor">
|
56
|
+
<!-- Iniciamos el tratamiento de los atributos de cce11:Emisor-->
|
57
|
+
<xsl:call-template name="Opcional">
|
58
|
+
<xsl:with-param name="valor" select="./@Curp" />
|
59
|
+
</xsl:call-template>
|
60
|
+
|
61
|
+
<xsl:apply-templates select="./cce11:Domicilio" />
|
62
|
+
|
63
|
+
</xsl:template>
|
64
|
+
|
65
|
+
<xsl:template match="cce11:Propietario">
|
66
|
+
<!-- Tratamiento de los atributos de cce11:Propietario-->
|
67
|
+
|
68
|
+
<xsl:call-template name="Requerido">
|
69
|
+
<xsl:with-param name="valor" select="./@NumRegIdTrib" />
|
70
|
+
</xsl:call-template>
|
71
|
+
<xsl:call-template name="Requerido">
|
72
|
+
<xsl:with-param name="valor" select="./@ResidenciaFiscal" />
|
73
|
+
</xsl:call-template>
|
74
|
+
|
75
|
+
</xsl:template>
|
76
|
+
|
77
|
+
<xsl:template match="cce11:Receptor">
|
78
|
+
<!-- Tratamiento de los atributos de cce11:Receptor-->
|
79
|
+
|
80
|
+
<xsl:call-template name="Opcional">
|
81
|
+
<xsl:with-param name="valor" select="./@NumRegIdTrib" />
|
82
|
+
</xsl:call-template>
|
83
|
+
<xsl:apply-templates select="./cce11:Domicilio" />
|
84
|
+
|
85
|
+
</xsl:template>
|
86
|
+
|
87
|
+
<xsl:template match="cce11:Destinatario">
|
88
|
+
<!-- Tratamiento de los atributos de cce11:Destinatario-->
|
89
|
+
<xsl:call-template name="Opcional">
|
90
|
+
<xsl:with-param name="valor" select="./@NumRegIdTrib" />
|
91
|
+
</xsl:call-template>
|
92
|
+
<xsl:call-template name="Opcional">
|
93
|
+
<xsl:with-param name="valor" select="./@Nombre" />
|
94
|
+
</xsl:call-template>
|
95
|
+
<!-- Manejo de los nodos dependientes -->
|
96
|
+
<xsl:for-each select="./cce11:Domicilio">
|
97
|
+
<xsl:apply-templates select="."/>
|
98
|
+
</xsl:for-each>
|
99
|
+
</xsl:template>
|
100
|
+
|
101
|
+
<xsl:template match="cce11:Mercancias">
|
102
|
+
<!-- Iniciamos el manejo de los nodos dependientes -->
|
103
|
+
<xsl:for-each select="./cce11:Mercancia">
|
104
|
+
<xsl:apply-templates select="."/>
|
105
|
+
</xsl:for-each>
|
106
|
+
</xsl:template>
|
107
|
+
|
108
|
+
<xsl:template match="cce11:Domicilio">
|
109
|
+
<!-- Iniciamos el tratamiento de los atributos de cce11:Domicilio-->
|
110
|
+
<xsl:call-template name="Requerido">
|
111
|
+
<xsl:with-param name="valor" select="./@Calle" />
|
112
|
+
</xsl:call-template>
|
113
|
+
<xsl:call-template name="Opcional">
|
114
|
+
<xsl:with-param name="valor" select="./@NumeroExterior" />
|
115
|
+
</xsl:call-template>
|
116
|
+
<xsl:call-template name="Opcional">
|
117
|
+
<xsl:with-param name="valor" select="./@NumeroInterior" />
|
118
|
+
</xsl:call-template>
|
119
|
+
<xsl:call-template name="Opcional">
|
120
|
+
<xsl:with-param name="valor" select="./@Colonia" />
|
121
|
+
</xsl:call-template>
|
122
|
+
<xsl:call-template name="Opcional">
|
123
|
+
<xsl:with-param name="valor" select="./@Localidad" />
|
124
|
+
</xsl:call-template>
|
125
|
+
<xsl:call-template name="Opcional">
|
126
|
+
<xsl:with-param name="valor" select="./@Referencia" />
|
127
|
+
</xsl:call-template>
|
128
|
+
<xsl:call-template name="Opcional">
|
129
|
+
<xsl:with-param name="valor" select="./@Municipio" />
|
130
|
+
</xsl:call-template>
|
131
|
+
<xsl:call-template name="Requerido">
|
132
|
+
<xsl:with-param name="valor" select="./@Estado" />
|
133
|
+
</xsl:call-template>
|
134
|
+
<xsl:call-template name="Requerido">
|
135
|
+
<xsl:with-param name="valor" select="./@Pais" />
|
136
|
+
</xsl:call-template>
|
137
|
+
<xsl:call-template name="Requerido">
|
138
|
+
<xsl:with-param name="valor" select="./@CodigoPostal" />
|
139
|
+
</xsl:call-template>
|
140
|
+
</xsl:template>
|
141
|
+
|
142
|
+
<xsl:template match="cce11:Mercancia">
|
143
|
+
<xsl:call-template name="Requerido">
|
144
|
+
<xsl:with-param name="valor" select="./@NoIdentificacion" />
|
145
|
+
</xsl:call-template>
|
146
|
+
<xsl:call-template name="Opcional">
|
147
|
+
<xsl:with-param name="valor" select="./@FraccionArancelaria" />
|
148
|
+
</xsl:call-template>
|
149
|
+
<xsl:call-template name="Opcional">
|
150
|
+
<xsl:with-param name="valor" select="./@CantidadAduana" />
|
151
|
+
</xsl:call-template>
|
152
|
+
<xsl:call-template name="Opcional">
|
153
|
+
<xsl:with-param name="valor" select="./@UnidadAduana" />
|
154
|
+
</xsl:call-template>
|
155
|
+
<xsl:call-template name="Opcional">
|
156
|
+
<xsl:with-param name="valor" select="./@ValorUnitarioAduana" />
|
157
|
+
</xsl:call-template>
|
158
|
+
<xsl:call-template name="Requerido">
|
159
|
+
<xsl:with-param name="valor" select="./@ValorDolares" />
|
160
|
+
</xsl:call-template>
|
161
|
+
<xsl:for-each select="./cce11:DescripcionesEspecificas">
|
162
|
+
<xsl:apply-templates select="."/>
|
163
|
+
</xsl:for-each>
|
164
|
+
</xsl:template>
|
165
|
+
|
166
|
+
<xsl:template match="cce11:DescripcionesEspecificas">
|
167
|
+
<xsl:call-template name="Requerido">
|
168
|
+
<xsl:with-param name="valor" select="./@Marca" />
|
169
|
+
</xsl:call-template>
|
170
|
+
<xsl:call-template name="Opcional">
|
171
|
+
<xsl:with-param name="valor" select="./@Modelo" />
|
172
|
+
</xsl:call-template>
|
173
|
+
<xsl:call-template name="Opcional">
|
174
|
+
<xsl:with-param name="valor" select="./@SubModelo" />
|
175
|
+
</xsl:call-template>
|
176
|
+
<xsl:call-template name="Opcional">
|
177
|
+
<xsl:with-param name="valor" select="./@NumeroSerie" />
|
178
|
+
</xsl:call-template>
|
179
|
+
</xsl:template>
|
180
|
+
|
181
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,165 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:pago10="http://www.sat.gob.mx/Pagos">
|
3
|
+
|
4
|
+
<xsl:template match="pago10:Pagos">
|
5
|
+
<!--Manejador de Atributos Pagos-->
|
6
|
+
<xsl:call-template name="Requerido">
|
7
|
+
<xsl:with-param name="valor" select="./@Version" />
|
8
|
+
</xsl:call-template>
|
9
|
+
|
10
|
+
<!-- Iniciamos el manejo de los elementos hijo en la secuencia -->
|
11
|
+
<xsl:for-each select="./pago10:Pago">
|
12
|
+
<xsl:apply-templates select="."/>
|
13
|
+
</xsl:for-each>
|
14
|
+
</xsl:template>
|
15
|
+
|
16
|
+
<xsl:template match="pago10:Pago">
|
17
|
+
<xsl:call-template name="Requerido">
|
18
|
+
<xsl:with-param name="valor" select="./@FechaPago" />
|
19
|
+
</xsl:call-template>
|
20
|
+
<xsl:call-template name="Requerido">
|
21
|
+
<xsl:with-param name="valor" select="./@FormaDePagoP" />
|
22
|
+
</xsl:call-template>
|
23
|
+
<xsl:call-template name="Requerido">
|
24
|
+
<xsl:with-param name="valor" select="./@MonedaP" />
|
25
|
+
</xsl:call-template>
|
26
|
+
<xsl:call-template name="Opcional">
|
27
|
+
<xsl:with-param name="valor" select="./@TipoCambioP" />
|
28
|
+
</xsl:call-template>
|
29
|
+
<xsl:call-template name="Requerido">
|
30
|
+
<xsl:with-param name="valor" select="./@Monto" />
|
31
|
+
</xsl:call-template>
|
32
|
+
<xsl:call-template name="Opcional">
|
33
|
+
<xsl:with-param name="valor" select="./@NumOperacion" />
|
34
|
+
</xsl:call-template>
|
35
|
+
<xsl:call-template name="Opcional">
|
36
|
+
<xsl:with-param name="valor" select="./@RfcEmisorCtaOrd" />
|
37
|
+
</xsl:call-template>
|
38
|
+
<xsl:call-template name="Opcional">
|
39
|
+
<xsl:with-param name="valor" select="./@NomBancoOrdExt" />
|
40
|
+
</xsl:call-template>
|
41
|
+
<xsl:call-template name="Opcional">
|
42
|
+
<xsl:with-param name="valor" select="./@CtaOrdenante" />
|
43
|
+
</xsl:call-template>
|
44
|
+
<xsl:call-template name="Opcional">
|
45
|
+
<xsl:with-param name="valor" select="./@RfcEmisorCtaBen" />
|
46
|
+
</xsl:call-template>
|
47
|
+
<xsl:call-template name="Opcional">
|
48
|
+
<xsl:with-param name="valor" select="./@CtaBeneficiario" />
|
49
|
+
</xsl:call-template>
|
50
|
+
<xsl:call-template name="Opcional">
|
51
|
+
<xsl:with-param name="valor" select="./@TipoCadPago" />
|
52
|
+
</xsl:call-template>
|
53
|
+
<xsl:call-template name="Opcional">
|
54
|
+
<xsl:with-param name="valor" select="./@CertPago" />
|
55
|
+
</xsl:call-template>
|
56
|
+
<xsl:call-template name="Opcional">
|
57
|
+
<xsl:with-param name="valor" select="./@CadPago" />
|
58
|
+
</xsl:call-template>
|
59
|
+
<xsl:call-template name="Opcional">
|
60
|
+
<xsl:with-param name="valor" select="./@SelloPago" />
|
61
|
+
</xsl:call-template>
|
62
|
+
|
63
|
+
<!-- Iniciamos el tratamiento de los atributos de pago10:DocumentoRelacionado-->
|
64
|
+
<xsl:for-each select="./pago10:DoctoRelacionado">
|
65
|
+
<xsl:apply-templates select="."/>
|
66
|
+
</xsl:for-each>
|
67
|
+
<xsl:for-each select="./pago10:Impuestos">
|
68
|
+
<xsl:apply-templates select="."/>
|
69
|
+
</xsl:for-each>
|
70
|
+
</xsl:template>
|
71
|
+
|
72
|
+
<xsl:template match="pago10:DoctoRelacionado">
|
73
|
+
|
74
|
+
<xsl:call-template name="Requerido">
|
75
|
+
<xsl:with-param name="valor" select="./@IdDocumento" />
|
76
|
+
</xsl:call-template>
|
77
|
+
|
78
|
+
<xsl:call-template name="Opcional">
|
79
|
+
<xsl:with-param name="valor" select="./@Serie" />
|
80
|
+
</xsl:call-template>
|
81
|
+
|
82
|
+
<xsl:call-template name="Opcional">
|
83
|
+
<xsl:with-param name="valor" select="./@Folio" />
|
84
|
+
</xsl:call-template>
|
85
|
+
|
86
|
+
<xsl:call-template name="Requerido">
|
87
|
+
<xsl:with-param name="valor" select="./@MonedaDR" />
|
88
|
+
</xsl:call-template>
|
89
|
+
|
90
|
+
<xsl:call-template name="Opcional">
|
91
|
+
<xsl:with-param name="valor" select="./@TipoCambioDR" />
|
92
|
+
</xsl:call-template>
|
93
|
+
|
94
|
+
<xsl:call-template name="Requerido">
|
95
|
+
<xsl:with-param name="valor" select="./@MetodoDePagoDR" />
|
96
|
+
</xsl:call-template>
|
97
|
+
|
98
|
+
<xsl:call-template name="Opcional">
|
99
|
+
<xsl:with-param name="valor" select="./@NumParcialidad" />
|
100
|
+
</xsl:call-template>
|
101
|
+
|
102
|
+
<xsl:call-template name="Opcional">
|
103
|
+
<xsl:with-param name="valor" select="./@ImpSaldoAnt" />
|
104
|
+
</xsl:call-template>
|
105
|
+
|
106
|
+
<xsl:call-template name="Opcional">
|
107
|
+
<xsl:with-param name="valor" select="./@ImpPagado" />
|
108
|
+
</xsl:call-template>
|
109
|
+
|
110
|
+
<xsl:call-template name="Opcional">
|
111
|
+
<xsl:with-param name="valor" select="./@ImpSaldoInsoluto" />
|
112
|
+
</xsl:call-template>
|
113
|
+
|
114
|
+
</xsl:template>
|
115
|
+
|
116
|
+
<xsl:template match="pago10:Impuestos">
|
117
|
+
<xsl:call-template name="Opcional">
|
118
|
+
<xsl:with-param name="valor" select="./@TotalImpuestosRetenidos" />
|
119
|
+
</xsl:call-template>
|
120
|
+
<xsl:call-template name="Opcional">
|
121
|
+
<xsl:with-param name="valor" select="./@TotalImpuestosTrasladados" />
|
122
|
+
</xsl:call-template>
|
123
|
+
|
124
|
+
<xsl:apply-templates select="./pago10:Retenciones"/>
|
125
|
+
<xsl:apply-templates select="./pago10:Traslados"/>
|
126
|
+
|
127
|
+
</xsl:template>
|
128
|
+
|
129
|
+
<xsl:template match="pago10:Retenciones">
|
130
|
+
<xsl:for-each select="./pago10:Retencion">
|
131
|
+
<xsl:apply-templates select="."/>
|
132
|
+
</xsl:for-each>
|
133
|
+
</xsl:template>
|
134
|
+
|
135
|
+
<xsl:template match="pago10:Traslados">
|
136
|
+
<xsl:for-each select="./pago10:Traslado">
|
137
|
+
<xsl:apply-templates select="."/>
|
138
|
+
</xsl:for-each>
|
139
|
+
|
140
|
+
</xsl:template>
|
141
|
+
|
142
|
+
<xsl:template match="pago10:Retencion">
|
143
|
+
<xsl:call-template name="Requerido">
|
144
|
+
<xsl:with-param name="valor" select="./@Impuesto" />
|
145
|
+
</xsl:call-template>
|
146
|
+
<xsl:call-template name="Requerido">
|
147
|
+
<xsl:with-param name="valor" select="./@Importe" />
|
148
|
+
</xsl:call-template>
|
149
|
+
</xsl:template>
|
150
|
+
|
151
|
+
<xsl:template match="pago10:Traslado">
|
152
|
+
<xsl:call-template name="Requerido">
|
153
|
+
<xsl:with-param name="valor" select="./@Impuesto" />
|
154
|
+
</xsl:call-template>
|
155
|
+
<xsl:call-template name="Requerido">
|
156
|
+
<xsl:with-param name="valor" select="./@TipoFactor" />
|
157
|
+
</xsl:call-template>
|
158
|
+
<xsl:call-template name="Requerido">
|
159
|
+
<xsl:with-param name="valor" select="./@TasaOCuota" />
|
160
|
+
</xsl:call-template>
|
161
|
+
<xsl:call-template name="Requerido">
|
162
|
+
<xsl:with-param name="valor" select="./@Importe" />
|
163
|
+
</xsl:call-template>
|
164
|
+
</xsl:template>
|
165
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:tpe="http://www.sat.gob.mx/TuristaPasajeroExtranjero">
|
3
|
+
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
|
4
|
+
<!-- Manejador de nodos tipo tpe:TuristaPasajeroExtranjero -->
|
5
|
+
<xsl:template match="tpe:TuristaPasajeroExtranjero">
|
6
|
+
<!--Iniciamos el tratamiento de los atributos de tpe:TuristaPasajeroExtranjero-->
|
7
|
+
<xsl:call-template name="Requerido">
|
8
|
+
<xsl:with-param name="valor" select="./@version"/>
|
9
|
+
</xsl:call-template>
|
10
|
+
<xsl:call-template name="Requerido">
|
11
|
+
<xsl:with-param name="valor" select="./@fechadeTransito"/>
|
12
|
+
</xsl:call-template>
|
13
|
+
<xsl:call-template name="Requerido">
|
14
|
+
<xsl:with-param name="valor" select="./@tipoTransito"/>
|
15
|
+
</xsl:call-template>
|
16
|
+
<xsl:apply-templates select="./tpe:datosTransito"/>
|
17
|
+
</xsl:template>
|
18
|
+
<!-- Manejador de nodos tipo datosTransito-->
|
19
|
+
<xsl:template match="tpe:datosTransito">
|
20
|
+
<!-- Iniciamos el tratamiento de los atributos de los datos de Transito-->
|
21
|
+
<xsl:call-template name="Requerido">
|
22
|
+
<xsl:with-param name="valor" select="./@Via"/>
|
23
|
+
</xsl:call-template>
|
24
|
+
<xsl:call-template name="Requerido">
|
25
|
+
<xsl:with-param name="valor" select="./@TipoId"/>
|
26
|
+
</xsl:call-template>
|
27
|
+
<xsl:call-template name="Requerido">
|
28
|
+
<xsl:with-param name="valor" select="./@NumeroId"/>
|
29
|
+
</xsl:call-template>
|
30
|
+
<xsl:call-template name="Requerido">
|
31
|
+
<xsl:with-param name="valor" select="./@Nacionalidad"/>
|
32
|
+
</xsl:call-template>
|
33
|
+
<xsl:call-template name="Requerido">
|
34
|
+
<xsl:with-param name="valor" select="./@EmpresaTransporte"/>
|
35
|
+
</xsl:call-template>
|
36
|
+
<xsl:call-template name="Opcional">
|
37
|
+
<xsl:with-param name="valor" select="./@IdTransporte"/>
|
38
|
+
</xsl:call-template>
|
39
|
+
</xsl:template>
|
40
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:aerolineas="http://www.sat.gob.mx/aerolineas">
|
3
|
+
|
4
|
+
<!-- Manejador de nodos tipo aerolineas:Aerolineas -->
|
5
|
+
<xsl:template match="aerolineas:Aerolineas">
|
6
|
+
|
7
|
+
<!-- Iniciamos el tratamiento de los atributos de aerolineas:Aerolineas -->
|
8
|
+
|
9
|
+
<xsl:call-template name="Requerido">
|
10
|
+
<xsl:with-param name="valor" select="./@Version"/>
|
11
|
+
</xsl:call-template>
|
12
|
+
<xsl:call-template name="Requerido">
|
13
|
+
<xsl:with-param name="valor" select="./@TUA"/>
|
14
|
+
</xsl:call-template>
|
15
|
+
|
16
|
+
<!-- Iniciamos el manejo de los nodos dependientes -->
|
17
|
+
<xsl:apply-templates select="./aerolineas:OtrosCargos"/>
|
18
|
+
|
19
|
+
</xsl:template>
|
20
|
+
|
21
|
+
<!-- Manejador de nodos tipo aerolineas:OtrosCargos -->
|
22
|
+
<xsl:template match="aerolineas:OtrosCargos">
|
23
|
+
|
24
|
+
<!-- Iniciamos el tratamiento de los atributos de aerolineas:OtrosCargos -->
|
25
|
+
<xsl:call-template name="Requerido">
|
26
|
+
<xsl:with-param name="valor" select="./@TotalCargos"/>
|
27
|
+
</xsl:call-template>
|
28
|
+
|
29
|
+
<!-- Iniciamos el manejo de los nodos dependientes -->
|
30
|
+
<xsl:for-each select="./aerolineas:Cargo">
|
31
|
+
<xsl:apply-templates select="."/>
|
32
|
+
</xsl:for-each>
|
33
|
+
|
34
|
+
</xsl:template>
|
35
|
+
|
36
|
+
<!-- Manejador de nodos tipo aerolineas:Cargo -->
|
37
|
+
<xsl:template match="aerolineas:Cargo">
|
38
|
+
|
39
|
+
<!-- Iniciamos el tratamiento de los atributos de aerolineas:ConceptoConsumoDeCombustibles -->
|
40
|
+
|
41
|
+
<xsl:call-template name="Requerido">
|
42
|
+
<xsl:with-param name="valor" select="./@CodigoCargo"/>
|
43
|
+
</xsl:call-template>
|
44
|
+
<xsl:call-template name="Requerido">
|
45
|
+
<xsl:with-param name="valor" select="./@Importe"/>
|
46
|
+
</xsl:call-template>
|
47
|
+
|
48
|
+
</xsl:template>
|
49
|
+
|
50
|
+
</xsl:stylesheet>
|