se adiciona .pre-commit-config.yaml

FossilOrigin-Name: 91aee68f7d92c2bef8805260296abdfe14191500e9ae1dec3fecaf562779940b
This commit is contained in:
bit4bit@riseup.net 2020-10-18 22:07:05 +00:00
parent 76dd42bd2d
commit 823b6b12ee
67 changed files with 865 additions and 854 deletions

1
.gitignore vendored
View File

@ -215,4 +215,3 @@ tags
pyvenv.cfg
.venv
pip-selfcheck.json

26
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,26 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: debug-statements
#- repo: https://gitlab.com/pycqa/flake8
# rev: ''
# hooks:
# - id: flake8
# args: [--max-line-length=100]
- repo: local
hooks:
- id: tests
name: run tests
entry: pytest -v
language: system
types: [python]
stages: [push]

View File

@ -30,4 +30,3 @@ may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -30,4 +30,4 @@ facturación, la libreria **facho.py** permite crear elementos xml usando XPath-
de facilitar la relación entre el anexo y la implementación.
* facho/form.py: generación de Invoice XML.
* facho/fe.py: extensiones XML, ejemplo CUFE, Firma, etc..
* facho/fe.py: extensiones XML, ejemplo CUFE, Firma, etc..

View File

@ -158,6 +158,3 @@ texinfo_documents = [
'One line description of project.',
'Miscellaneous'),
]

View File

@ -51,7 +51,7 @@ with open(path_schema, 'r+') as f:
f.write(content)
warnings.warn("!!MACHETE fix xmlsig X509SerialNumber type")
@click.command()
@click.option('--nit', required=True)
@click.option('--nit-proveedor', required=True)
@ -67,7 +67,7 @@ def consultaResolucionesFacturacion(nit, nit_proveedor, id_software, username, p
))
print(str(resp))
@click.command()
@click.option('--private-key', required=True)
@click.option('--public-key', required=True)
@ -78,7 +78,7 @@ def consultaResolucionesFacturacion(nit, nit_proveedor, id_software, username, p
@click.argument('zipfile', type=click.Path(exists=True))
def soap_send_test_set_async(private_key, public_key, habilitacion, password, test_setid, filename, zipfile):
from facho.fe.client import dian
client = dian.DianSignatureClient(private_key, public_key, password=password)
req = dian.SendTestSetAsync
if habilitacion:
@ -99,7 +99,7 @@ def soap_send_test_set_async(private_key, public_key, habilitacion, password, te
@click.argument('zipfile', type=click.Path(exists=True))
def soap_send_bill_async(private_key, public_key, habilitacion, password, filename, zipfile):
from facho.fe.client import dian
client = dian.DianSignatureClient(private_key, public_key, password=password)
req = dian.SendBillAsync
if habilitacion:
@ -119,7 +119,7 @@ def soap_send_bill_async(private_key, public_key, habilitacion, password, filena
@click.argument('zipfile', type=click.Path(exists=True))
def soap_send_bill_sync(private_key, public_key, habilitacion, password, filename, zipfile):
from facho.fe.client import dian
client = dian.DianSignatureClient(private_key, public_key, password=password)
req = dian.SendBillSync
if habilitacion:
@ -138,7 +138,7 @@ def soap_send_bill_sync(private_key, public_key, habilitacion, password, filenam
@click.option('--track-id', required=True)
def soap_get_status_zip(private_key, public_key, habilitacion, password, track_id):
from facho.fe.client import dian
client = dian.DianSignatureClient(private_key, public_key, password=password)
req = dian.GetStatusZip
if habilitacion:
@ -162,7 +162,7 @@ def soap_get_status_zip(private_key, public_key, habilitacion, password, track_i
@click.option('--track-id', required=True)
def soap_get_status(private_key, public_key, habilitacion, password, track_id):
from facho.fe.client import dian
client = dian.DianSignatureClient(private_key, public_key, password=password)
req = dian.GetStatus
if habilitacion:
@ -186,7 +186,7 @@ def soap_get_numbering_range(private_key,
password,
nit, nit_proveedor, id_software):
from facho.fe.client import dian
client = dian.DianSignatureClient(private_key, public_key, password=password)
req = dian.GetNumberingRange
if habilitacion:
@ -199,6 +199,8 @@ def soap_get_numbering_range(private_key,
@click.command()
@click.argument('invoice_path')
def validate_invoice(invoice_path):
warnings.warn("!! NO APROBADO FUNCIONAMIENTO")
from facho.fe.data.dian import XSD
content = open(invoice_path, 'r').read()
# TODO donde ubicar esta responsabilidad?
@ -220,7 +222,7 @@ def validate_invoice(invoice_path):
def sign_xml(private_key, passphrase, xmlfile, ssl=True, use_cache_policy=False, output=None):
if not ssl:
disable_ssl()
from facho import fe
if use_cache_policy:
warnings.warn("xades using cache policy")
@ -229,7 +231,7 @@ def sign_xml(private_key, passphrase, xmlfile, ssl=True, use_cache_policy=False,
document = open(xmlfile, 'r').read().encode('utf-8')
with open(output, 'w') as f:
f.write(signer.sign_xml_string(document))
@click.command()
@click.option('--private-key', type=click.Path(exists=True))
@click.option('--generate/--validate', default=False)
@ -242,16 +244,16 @@ def sign_xml(private_key, passphrase, xmlfile, ssl=True, use_cache_policy=False,
def generate_invoice(private_key, passphrase, scriptname, generate=False, ssl=True, sign=False, use_cache_policy=False, output=None):
"""
imprime xml en pantalla.
SCRIPTNAME espera
SCRIPTNAME espera
def invoice() -> form.Invoice
def extensions(form.Invoice): -> List[facho.FachoXMLExtension]
"""
if not ssl:
disable_ssl()
import importlib.util
spec = importlib.util.spec_from_file_location('invoice', scriptname)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
@ -268,7 +270,7 @@ def generate_invoice(private_key, passphrase, scriptname, generate=False, ssl=Tr
if generate:
xml = form.DIANInvoiceXML(invoice)
extensions = module.extensions(invoice)
for extension in extensions:
xml.add_extension(extension)
@ -292,7 +294,7 @@ def generate_invoice(private_key, passphrase, scriptname, generate=False, ssl=Tr
def sign_verify_xml(private_key, passphrase, xmlfile, ssl=True, use_cache_policy=False, output=None):
if not ssl:
disable_ssl()
from facho.fe import fe
if use_cache_policy:
warnings.warn("xades using cache policy")

View File

@ -11,7 +11,7 @@ class FachoXMLExtension:
def build(self, fachoxml):
raise NotImplementedError
class LXMLBuilder:
"""
extrae la manipulacion de XML
@ -91,7 +91,7 @@ class LXMLBuilder:
return elems[0]
return None
def get_text(self, elem):
return elem.text
@ -130,11 +130,11 @@ class FachoXML:
#elem = self.find_or_create_element(xpath, append=append)
#self.builder.append(elem, new_elem)
self.builder.append(elem, new_elem)
def add_extension(self, extension):
extension.build(self)
def fragment(self, xpath, append=False, append_not_exists=False):
nodes = xpath.split('/')
nodes.pop()
@ -142,7 +142,7 @@ class FachoXML:
parent = None
if append_not_exists:
parent = self.get_element(xpath)
if parent is None:
parent = self.find_or_create_element(xpath, append=append)
return FachoXML(parent, nsmap=self.nsmap, fragment_prefix=root_prefix)
@ -154,16 +154,16 @@ class FachoXML:
if xpath in self.xpath_for:
xpath = self.xpath_for[xpath]
return xpath
def _normalize_xpath(self, xpath):
return xpath.replace('//', '/')
def _path_xpath_for(self, xpath):
return self._normalize_xpath(self._translate_xpath_for(xpath))
def placeholder_for(self, xpath):
return self.find_or_create_element(xpath)
def find_or_create_element(self, xpath, append=False):
"""
@param xpath ruta xpath para crear o consultar de un solo elemendo
@ -195,14 +195,14 @@ class FachoXML:
self.builder.append(current_elem, node)
current_elem = node
# se fuerza la adicion como un nuevo elemento
# se fuerza la adicion como un nuevo elemento
if append:
node = self.builder.build_from_expression(node_paths[-1])
self.builder.append(parent, node)
return node
return current_elem
def set_element(self, xpath, content, **attrs):
"""
asigna contenido ubicado por ruta tipo XPATH.

View File

@ -29,7 +29,7 @@ class SOAPService:
def builder_response(self, as_dict):
raise NotImplementedError()
def todict(self):
return asdict(self)
@ -68,7 +68,7 @@ class GetNumberingRange(SOAPService):
def get_service(self):
return 'GetNumberingRange'
def build_response(self, as_dict):
return GetNumberingRangeResponse.fromdict(as_dict)
@ -92,14 +92,14 @@ class SendBillAsync(SOAPService):
class SendTestSetAsyncResponse:
ZipKey: str
ErrorMessageList: List[str]
@classmethod
def fromdict(cls, data):
return cls(
data['ZipKey'],
data['ErrorMessageList'] or []
)
@dataclass
class SendTestSetAsync(SOAPService):
fileName: str
@ -135,14 +135,14 @@ class GetStatusResponse:
StatusDescription: str
StatusCode: int
ErrorMessage: List[str]
@classmethod
def fromdict(cls, data):
return cls(data['IsValid'],
data['StatusDescription'],
data['StatusCode'],
data['ErrorMessage']['string'])
@dataclass
class GetStatus(SOAPService):
trackId: bytes
@ -196,7 +196,7 @@ class Habilitacion:
class GetStatusZip(GetStatusZip):
def get_wsdl(self):
return Habilitacion.WSDL
class DianGateway:
@ -230,7 +230,7 @@ class DianClient(DianGateway):
def _open(self, service):
return zeep.Client(service.get_wsdl(), wsse=UsernameToken(self._username, self._password))
class DianSignatureClient(DianGateway):
def __init__(self, private_key_path, public_key_path, password=None):
@ -250,5 +250,3 @@ class DianSignatureClient(DianGateway):
,
)
return client

View File

@ -66,7 +66,7 @@ class MemorySignature(object):
self.digest_method = digest_method
self.signature_method = signature_method
self.expires_dt = expires_dt
def apply(self, envelope, headers):
key = _make_sign_key(self.key_data, self.cert_data, self.password)
_sign_envelope_with_key(
@ -225,7 +225,7 @@ def get_timestamp(timestamp = None, delta=None):
timestamp = timestamp or datetime.utcnow()
if delta:
timestamp += delta
format_ = '%Y-%m-%dT%H:%M:%SZ'
timestamp = timestamp.replace(tzinfo=pytz.utc, microsecond=0)
return timestamp.strftime(format_)
@ -233,7 +233,7 @@ def get_timestamp(timestamp = None, delta=None):
def _append_timestamp(security, expires_dt=None):
if expires_dt is None:
expires_dt = timedelta(seconds=6000)
etimestamp = utils.WSU.Timestamp({'{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Id': utils.get_unique_id()})
etimestamp.append(utils.WSU.Created(get_timestamp()))
etimestamp.append(utils.WSU.Expires(get_timestamp(delta=expires_dt)))

View File

@ -11,6 +11,3 @@ UBLInvoice= xmlschema.XMLSchema(path_for_xsd('maindoc', 'UBL-Invoice-2.1.xsd'))
def validate(xml, schema):
schema.validate(xml)

View File

@ -7,9 +7,9 @@
Agency: UN/CEFACT
VersionID: 1.1
Last change: 14 January 2005
Copyright (C) UN/CEFACT (2006). All Rights Reserved.
This document and translations of it may be copied and furnished to others,
and derivative works that comment on or otherwise explain it or assist
@ -21,13 +21,13 @@
UN/CEFACT, except as needed for the purpose of developing UN/CEFACT
specifications, in which case the procedures for copyrights defined in the
UN/CEFACT Intellectual Property Rights document must be followed, or as
required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked
by UN/CEFACT or its successors or assigns.
This document and the information contained herein is provided on an "AS IS"
basis and UN/CEFACT DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING

View File

@ -39752,48 +39752,48 @@ Thus, the column Preference Criterion will indicate either A, B, C,...</ccts:Exa
</xsd:complexType>
</xsd:schema>
<!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -5342,48 +5342,48 @@
</xsd:complexType>
</xsd:schema>
<!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -7,12 +7,12 @@
Generated on: 2013-04-20 18:40(UTC)
Copyright (c) OASIS Open 2013. All Rights Reserved.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
elementFormDefault="qualified" attributeFormDefault="unqualified"
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
elementFormDefault="qualified" attributeFormDefault="unqualified"
version="2.1">
<!-- ===== Imports ===== -->
<xsd:import namespace="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2" schemaLocation="UBL-UnqualifiedDataTypes-2.1.xsd"/>
@ -176,48 +176,48 @@ targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionCom
</xsd:schema>
<!-- ===== Copyright Notice ===== -->
<!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
-->

View File

@ -54,48 +54,48 @@
</xsd:complexType>
</xsd:schema>
<!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -16,48 +16,48 @@
</xsd:schema>
<!-- ===== Copyright Notice ===== -->
<!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -11,8 +11,8 @@
"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
targetNamespace=
"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="2.1">
<!--import here all extension schemas-->
@ -42,48 +42,48 @@
</xsd:schema>
<!-- ===== Copyright Notice ===== -->
<!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
-->

View File

@ -22,48 +22,48 @@
</xsd:schema>
<!-- ===== Copyright Notice ===== -->
<!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -33,7 +33,7 @@
schemaLocation="UBL-XAdESv132-2.1.xsd"/>
<xsd:import namespace="http://uri.etsi.org/01903/v1.4.1#"
schemaLocation="UBL-XAdESv141-2.1.xsd"/>
<!-- ===== Element Declarations ===== -->
<xsd:element name="SignatureInformation" type="SignatureInformationType"/>
<!-- ===== Type Definitions ===== -->
@ -91,48 +91,48 @@
</xsd:complexType>
</xsd:schema>
<!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -31,48 +31,48 @@
</xsd:complexType>
</xsd:schema>
<!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -18,12 +18,12 @@
Per table 8-3, the value, rate and percentage types are based on
"Numeric. Type" as they are secondary representation terms.
Per table 8-3, the name type is based on "Text. Type" as it is a
Per table 8-3, the name type is based on "Text. Type" as it is a
secondary representation term.
Per XSD lexical constraints, the following unqualified data types
corresponding to core component types and secondary representation terms
are based on XSD types (accordingly, the supplementary component "format"
Per XSD lexical constraints, the following unqualified data types
corresponding to core component types and secondary representation terms
are based on XSD types (accordingly, the supplementary component "format"
is not made available for these types):
Date Time. Type on xsd:dateTime
@ -45,11 +45,11 @@
All other unqualified data types inherit the core component types complete
with their supplementary components.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2"
xmlns:ccts="urn:un:unece:uncefact:documentation:2"
elementFormDefault="qualified"
xmlns:ccts="urn:un:unece:uncefact:documentation:2"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="2.1">
<!-- ===== Imports ===== -->
@ -265,7 +265,7 @@ namespace="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModul
<xsd:extension base="ccts-cct:CodeType"/>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="DateTimeType">
<xsd:annotation>
<xsd:documentation xml:lang="en">
@ -386,7 +386,7 @@ namespace="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModul
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="NumericType">
<xsd:annotation>
<xsd:documentation xml:lang="en">
@ -506,48 +506,48 @@ namespace="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModul
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema><!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -6,12 +6,12 @@
Module: UBL-XAdESv132-2.1.xsd
Generated on: 2011-02-21 17:20(UTC)
This is a copy of http://uri.etsi.org/01903/v1.3.2/XAdES.xsd modified
This is a copy of http://uri.etsi.org/01903/v1.3.2/XAdES.xsd modified
only to change the importing URI for the XML DSig schema.
-->
<xsd:schema targetNamespace="http://uri.etsi.org/01903/v1.3.2#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://uri.etsi.org/01903/v1.3.2#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified">
<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="UBL-xmldsig-core-schema-2.1.xsd"/>
<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
<!-- Start auxiliary types definitions: AnyType, ObjectIdentifierType,
EncapsulatedPKIDataType and containers for time-stamp tokens -->
<!-- Start AnyType -->
<xsd:element name="Any" type="AnyType"/>

View File

@ -9,12 +9,12 @@
This is a copy of http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd
modified only to remove these PUBLIC and SYSTEM identifiers from the DOCTYPE:
PUBLIC "-//W3C//DTD XMLSchema 200102//EN"
PUBLIC "-//W3C//DTD XMLSchema 200102//EN"
"http://www.w3.org/2001/XMLSchema.dtd"
-->
<!DOCTYPE schema
[
<!ATTLIST schema
<!ATTLIST schema
xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
<!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
<!ENTITY % p ''>
@ -41,7 +41,7 @@
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
targetNamespace="http://www.w3.org/2000/09/xmldsig#"
version="0.1" elementFormDefault="qualified">
version="0.1" elementFormDefault="qualified">
<!-- Basic Types Defined for Signatures -->
@ -54,16 +54,16 @@
<element name="Signature" type="ds:SignatureType"/>
<complexType name="SignatureType">
<sequence>
<element ref="ds:SignedInfo"/>
<element ref="ds:SignatureValue"/>
<element ref="ds:KeyInfo" minOccurs="0"/>
<element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<sequence>
<element ref="ds:SignedInfo"/>
<element ref="ds:SignatureValue"/>
<element ref="ds:KeyInfo" minOccurs="0"/>
<element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="SignatureValue" type="ds:SignatureValueType"/>
<element name="SignatureValue" type="ds:SignatureValueType"/>
<complexType name="SignatureValueType">
<simpleContent>
<extension base="base64Binary">
@ -76,21 +76,21 @@
<element name="SignedInfo" type="ds:SignedInfoType"/>
<complexType name="SignedInfoType">
<sequence>
<element ref="ds:CanonicalizationMethod"/>
<element ref="ds:SignatureMethod"/>
<element ref="ds:Reference" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<sequence>
<element ref="ds:CanonicalizationMethod"/>
<element ref="ds:SignatureMethod"/>
<element ref="ds:Reference" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
<element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
<complexType name="CanonicalizationMethodType" mixed="true">
<sequence>
<any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) namespace -->
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<element name="SignatureMethod" type="ds:SignatureMethodType"/>
@ -100,48 +100,48 @@
<any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) external namespace -->
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<!-- Start Reference -->
<element name="Reference" type="ds:ReferenceType"/>
<complexType name="ReferenceType">
<sequence>
<element ref="ds:Transforms" minOccurs="0"/>
<element ref="ds:DigestMethod"/>
<element ref="ds:DigestValue"/>
<sequence>
<element ref="ds:Transforms" minOccurs="0"/>
<element ref="ds:DigestMethod"/>
<element ref="ds:DigestValue"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="URI" type="anyURI" use="optional"/>
<attribute name="Type" type="anyURI" use="optional"/>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="URI" type="anyURI" use="optional"/>
<attribute name="Type" type="anyURI" use="optional"/>
</complexType>
<element name="Transforms" type="ds:TransformsType"/>
<complexType name="TransformsType">
<sequence>
<element ref="ds:Transform" maxOccurs="unbounded"/>
<element ref="ds:Transform" maxOccurs="unbounded"/>
</sequence>
</complexType>
<element name="Transform" type="ds:TransformType"/>
<complexType name="TransformType" mixed="true">
<choice minOccurs="0" maxOccurs="unbounded">
<choice minOccurs="0" maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
<element name="XPath" type="string"/>
<element name="XPath" type="string"/>
</choice>
<attribute name="Algorithm" type="anyURI" use="required"/>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<!-- End Reference -->
<element name="DigestMethod" type="ds:DigestMethodType"/>
<complexType name="DigestMethodType" mixed="true">
<complexType name="DigestMethodType" mixed="true">
<sequence>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</sequence>
<attribute name="Algorithm" type="anyURI" use="required"/>
</complexType>
<element name="DigestValue" type="ds:DigestValueType"/>
@ -153,26 +153,26 @@
<!-- Start KeyInfo -->
<element name="KeyInfo" type="ds:KeyInfoType"/>
<element name="KeyInfo" type="ds:KeyInfoType"/>
<complexType name="KeyInfoType" mixed="true">
<choice maxOccurs="unbounded">
<element ref="ds:KeyName"/>
<element ref="ds:KeyValue"/>
<element ref="ds:RetrievalMethod"/>
<element ref="ds:X509Data"/>
<element ref="ds:PGPData"/>
<choice maxOccurs="unbounded">
<element ref="ds:KeyName"/>
<element ref="ds:KeyValue"/>
<element ref="ds:RetrievalMethod"/>
<element ref="ds:X509Data"/>
<element ref="ds:PGPData"/>
<element ref="ds:SPKIData"/>
<element ref="ds:MgmtData"/>
<any processContents="lax" namespace="##other"/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
</choice>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="KeyName" type="string"/>
<element name="MgmtData" type="string"/>
<element name="KeyValue" type="ds:KeyValueType"/>
<element name="KeyValue" type="ds:KeyValueType"/>
<complexType name="KeyValueType" mixed="true">
<choice>
<element ref="ds:DSAKeyValue"/>
@ -181,18 +181,18 @@
</choice>
</complexType>
<element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
<element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
<complexType name="RetrievalMethodType">
<sequence>
<element ref="ds:Transforms" minOccurs="0"/>
</sequence>
<element ref="ds:Transforms" minOccurs="0"/>
</sequence>
<attribute name="URI" type="anyURI"/>
<attribute name="Type" type="anyURI" use="optional"/>
</complexType>
<!-- Start X509Data -->
<element name="X509Data" type="ds:X509DataType"/>
<element name="X509Data" type="ds:X509DataType"/>
<complexType name="X509DataType">
<sequence maxOccurs="unbounded">
<choice>
@ -206,10 +206,10 @@
</sequence>
</complexType>
<complexType name="X509IssuerSerialType">
<sequence>
<element name="X509IssuerName" type="string"/>
<element name="X509SerialNumber" type="integer"/>
<complexType name="X509IssuerSerialType">
<sequence>
<element name="X509IssuerName" type="string"/>
<element name="X509SerialNumber" type="integer"/>
</sequence>
</complexType>
@ -217,17 +217,17 @@
<!-- Begin PGPData -->
<element name="PGPData" type="ds:PGPDataType"/>
<complexType name="PGPDataType">
<element name="PGPData" type="ds:PGPDataType"/>
<complexType name="PGPDataType">
<choice>
<sequence>
<element name="PGPKeyID" type="base64Binary"/>
<element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
<element name="PGPKeyID" type="base64Binary"/>
<element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
<any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</sequence>
<sequence>
<element name="PGPKeyPacket" type="base64Binary"/>
<element name="PGPKeyPacket" type="base64Binary"/>
<any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</sequence>
@ -238,13 +238,13 @@
<!-- Begin SPKIData -->
<element name="SPKIData" type="ds:SPKIDataType"/>
<element name="SPKIData" type="ds:SPKIDataType"/>
<complexType name="SPKIDataType">
<sequence maxOccurs="unbounded">
<element name="SPKISexp" type="base64Binary"/>
<any namespace="##other" processContents="lax" minOccurs="0"/>
</sequence>
</complexType>
</complexType>
<!-- End SPKIData -->
@ -252,40 +252,40 @@
<!-- Start Object (Manifest, SignatureProperty) -->
<element name="Object" type="ds:ObjectType"/>
<element name="Object" type="ds:ObjectType"/>
<complexType name="ObjectType" mixed="true">
<sequence minOccurs="0" maxOccurs="unbounded">
<any namespace="##any" processContents="lax"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet -->
<attribute name="Encoding" type="anyURI" use="optional"/>
<attribute name="Encoding" type="anyURI" use="optional"/>
</complexType>
<element name="Manifest" type="ds:ManifestType"/>
<element name="Manifest" type="ds:ManifestType"/>
<complexType name="ManifestType">
<sequence>
<element ref="ds:Reference" maxOccurs="unbounded"/>
<element ref="ds:Reference" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
<element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
<complexType name="SignaturePropertiesType">
<sequence>
<element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
<element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
</sequence>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<element name="SignatureProperty" type="ds:SignaturePropertyType"/>
<element name="SignatureProperty" type="ds:SignaturePropertyType"/>
<complexType name="SignaturePropertyType" mixed="true">
<choice maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
<!-- (1,1) elements from (1,unbounded) namespaces -->
</choice>
<attribute name="Target" type="anyURI" use="required"/>
<attribute name="Id" type="ID" use="optional"/>
<attribute name="Target" type="anyURI" use="required"/>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
<!-- End Object (Manifest, SignatureProperty) -->
@ -318,10 +318,10 @@
<element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
<complexType name="RSAKeyValueType">
<sequence>
<element name="Modulus" type="ds:CryptoBinary"/>
<element name="Exponent" type="ds:CryptoBinary"/>
<element name="Modulus" type="ds:CryptoBinary"/>
<element name="Exponent" type="ds:CryptoBinary"/>
</sequence>
</complexType>
</complexType>
<!-- End KeyValue Element-types -->

View File

@ -314,50 +314,50 @@
</xsd:complexType>
</xsd:schema>
<!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
Copyright (C) OASIS Open 2001-2013. All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -368,50 +368,50 @@
</xsd:complexType>
</xsd:schema>
<!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
Copyright (C) OASIS Open 2001-2013. All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -903,50 +903,50 @@
</xsd:complexType>
</xsd:schema>
<!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
Copyright (C) OASIS Open 2001-2013. All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -868,50 +868,50 @@
</xsd:complexType>
</xsd:schema>
<!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
Copyright (C) OASIS Open 2001-2013. All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -955,48 +955,48 @@
</xsd:complexType>
</xsd:schema>
<!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this
document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has
made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from
the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to
implement this specification. Please address the information to the
OASIS Executive Director.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain
it or assist in its implementation may be prepared, copied,
published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this
paragraph are included on all such copies and derivative works.
However, this document itself may not be modified in any way,
such as by removing the copyright notice or references to OASIS,
except as needed for the purpose of developing OASIS
specifications, in which case the procedures for copyrights defined
in the OASIS Intellectual Property Rights document must be
followed, or as required to translate it into languages other than
English.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->
The limited permissions granted above are perpetual and will not be
revoked by OASIS or its successors or assigns.
This document and the information contained herein is provided on
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
-->

View File

@ -1 +0,0 @@

View File

@ -39,4 +39,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -39,4 +39,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -47,4 +47,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -3782,4 +3782,4 @@
<Row><Value ColumnRef="code"><SimpleValue>992050</SimpleValue></Value></Row>
<Row><Value ColumnRef="code"><SimpleValue>995007</SimpleValue></Value></Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -55,4 +55,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -71,4 +71,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -63,4 +63,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -295,4 +295,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -87,4 +87,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -47,4 +47,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -2990,4 +2990,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -631,4 +631,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -9006,4 +9006,4 @@
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -2023,4 +2023,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -47,4 +47,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -53,4 +53,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -71,4 +71,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -119,4 +119,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -111,4 +111,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -159,4 +159,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -1464,4 +1464,4 @@
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -52,4 +52,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -52,4 +52,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -52,4 +52,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -47,4 +47,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -32,4 +32,4 @@
<Row><Value ColumnRef="code"><SimpleValue>032</SimpleValue></Value><Value ColumnRef="name"><SimpleValue>Recepción de mercacías y/o serviciosSimpleValue></Value></Row>
<Row><Value ColumnRef="code"><SimpleValue>033</SimpleValue></Value><Value ColumnRef="name"><SimpleValue>Aceptación de DocumentoSimpleValue></Value></Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -8775,4 +8775,4 @@
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>
</gc:CodeList>

View File

@ -45,7 +45,7 @@ class CodeList:
row[value.attrib['ColumnRef']] = value.getchildren()[0].text
return row
def __getitem__(self, key):
return self.rows[str(key)]
@ -90,4 +90,3 @@ RegimenFiscal = CodeList(path_for_codelist('RegimenFiscal-2.1.custom.gc'), 'code
TipoOperacionF = CodeList(path_for_codelist('TipoOperacionF-2.1.gc'), 'code', 'name')
Municipio = CodeList(path_for_codelist('Municipio-2.1.gc'), 'code', 'name')
Departamento = CodeList(path_for_codelist('Departamentos-2.1.gc'), 'code', 'name')

View File

@ -18,7 +18,7 @@ SCHEME_AGENCY_ATTRS = {
'schemeAgencyID': '195'
}
# RESOLUCION 0001: pagina 516
POLICY_ID = 'https://facturaelectronica.dian.gov.co/politicadefirma/v2/politicadefirmav2.pdf'
POLICY_NAME = u'Política de firma para facturas electrónicas de la República de Colombia.'
@ -61,7 +61,7 @@ def mock_xades_policy():
class FeXML(FachoXML):
def __init__(self, root, namespace):
super().__init__("{%s}%s" % (namespace, root),
nsmap=NAMESPACES)
@ -74,11 +74,11 @@ class FeXML(FachoXML):
.replace("fe:", "")\
.replace("xmlns:fe", "xmlns")
class DianXMLExtensionCUFE(FachoXMLExtension):
AMBIENTE_PRUEBAS = codelist.TipoAmbiente.by_name('Pruebas')['code']
AMBIENTE_PRODUCCION = codelist.TipoAmbiente.by_name('Producción')['code']
def __init__(self, invoice, tipo_ambiente = AMBIENTE_PRUEBAS, clave_tecnica = ''):
self.tipo_ambiente = tipo_ambiente
self.clave_tecnica = clave_tecnica
@ -95,12 +95,12 @@ class DianXMLExtensionCUFE(FachoXMLExtension):
fachoxml.set_element('/fe:Invoice/cbc:ProfileID', 'DIAN 2.1')
fachoxml.set_element('/fe:Invoice/cbc:ProfileExecutionID', self._tipo_ambiente())
#DIAN 1.7.-2020: FAB36
fachoxml.set_element('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/sts:DianExtensions/sts:QRCode',
fachoxml.set_element('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/sts:DianExtensions/sts:QRCode',
'https://catalogo-vpfe.dian.gov.co/document/searchqr?documentkey='+cufe)
def issue_time(self, datetime_):
return datetime_.strftime('%H:%M:%S-05:00')
def issue_date(self, datetime_):
return datetime_.strftime('%Y-%m-%d')
@ -129,7 +129,7 @@ class DianXMLExtensionCUFE(FachoXMLExtension):
NumAdq = invoice.invoice_customer.ident
TipoAmb = self._tipo_ambiente()
ClTec = str(self.clave_tecnica)
return [
'%s' % NumFac,
'%s' % FecFac,
@ -178,10 +178,10 @@ class DianXMLExtensionSoftwareProvider(FachoXMLExtension):
**SCHEME_AGENCY_ATTRS)
class DianXMLExtensionSoftwareSecurityCode(FachoXMLExtension):
# RESOLUCION 0001: pagina 535
def __init__(self, id_software: str, pin: str, invoice_ident: str):
self.id_software = id_software
self.pin = pin
@ -196,9 +196,9 @@ class DianXMLExtensionSoftwareSecurityCode(FachoXMLExtension):
fexml.set_attributes(dian_path, **SCHEME_AGENCY_ATTRS)
return '', []
class DianXMLExtensionSigner(FachoXMLExtension):
class DianXMLExtensionSigner:
def __init__(self, pkcs12_path, passphrase=None, mockpolicy=False):
self._pkcs12_path = pkcs12_path
self._passphrase = None
@ -230,7 +230,7 @@ class DianXMLExtensionSigner(FachoXMLExtension):
)
xml.append(signature)
ref = xmlsig.template.add_reference(
signature, xmlsig.constants.TransformSha256, uri="", name="xmldsig-%s-ref0" % (id_uuid)
)
@ -247,7 +247,7 @@ class DianXMLExtensionSigner(FachoXMLExtension):
qualifying = xades.template.create_qualifying_properties(signature, 'XadesObjects', 'xades')
xades.utils.ensure_id(qualifying)
id_props = "xmldsig-%s-signedprops" % (id_uuid)
props_ref = xmlsig.template.add_reference(
signature, xmlsig.constants.TransformSha256, uri="#%s" % (id_props),
@ -258,7 +258,7 @@ class DianXMLExtensionSigner(FachoXMLExtension):
# TODO assert with http://www.sic.gov.co/hora-legal-colombiana
props = xades.template.create_signed_properties(qualifying, name=id_props, datetime=datetime.now())
xades.template.add_claimed_role(props, "supplier")
policy = xades.policy.GenericPolicyId(
POLICY_ID,
POLICY_NAME,
@ -278,14 +278,10 @@ class DianXMLExtensionSigner(FachoXMLExtension):
xml.remove(signature)
return signature
# return (xpath, xml.Element)
def build(self, fachoxml):
raise RuntimeError("no funciona correctamente habria que modificar todo para funcionar sin el namespace fe:")
signature = self.sign_xml_element(fachoxml.root)
#DIAN 1.7.-2020: FAB01
extcontent = fachoxml.builder.xpath(fachoxml.root, '/fe:Invoice/ext:UBLExtensions/ext:UBLExtension[2]/ext:ExtensionContent')
fachoxml.append_element(extcontent, signature)
class DianXMLExtensionAuthorizationProvider(FachoXMLExtension):
# RESOLUCION 0004: pagina 176
@ -293,12 +289,12 @@ class DianXMLExtensionAuthorizationProvider(FachoXMLExtension):
def build(self, fexml):
dian_path = '/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/sts:DianExtensions/sts:AuthorizationProvider/sts:AuthorizationProviderID'
fexml.set_element(dian_path, '800197268')
attrs = {'schemeID': '4', 'schemeName': '31'}
attrs.update(SCHEME_AGENCY_ATTRS)
fexml.set_attributes(dian_path, **attrs)
class DianXMLExtensionInvoiceAuthorization(FachoXMLExtension):
# RESOLUCION 0004: pagina 106
@ -323,7 +319,7 @@ class DianXMLExtensionInvoiceAuthorization(FachoXMLExtension):
#DIAN 1.7.-2020: FAB17
listSchemeURI="urn:oasis:names:specification:ubl:codelist:gc:CountryIdentificationCode-2.1"
)
invoice_control = fexml.fragment('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/sts:DianExtensions/sts:InvoiceControl')
invoice_control.set_element('/sts:InvoiceControl/sts:InvoiceAuthorization', self.authorization)
invoice_control.set_element('/sts:InvoiceControl/sts:AuthorizationPeriod/cbc:StartDate',
@ -338,12 +334,12 @@ class DianXMLExtensionInvoiceAuthorization(FachoXMLExtension):
self.to)
class DianZIP:
# RESOLUCION 0001: pagina 540
MAX_FILES = 50
def __init__(self, file_like):
self.zipfile = zipfile.ZipFile(file_like, mode='w')
self.num_files = 0
@ -367,7 +363,7 @@ class DianZIP:
class DianXMLExtensionSignerVerifier:
def __init__(self, pkcs12_path, passphrase=None, mockpolicy=False):
self._pkcs12_path = pkcs12_path
self._passphrase = None
@ -381,7 +377,7 @@ class DianXMLExtensionSignerVerifier:
signature = fachoxml.builder.xpath(fachoxml.root, '//ds:Signature')
assert signature is not None
signature.getparent().remove(signature)
fachoxml.root.append(signature)
@ -398,4 +394,3 @@ class DianXMLExtensionSignerVerifier:
return True
except:
return False

View File

@ -17,7 +17,7 @@ class Item:
description: str
id: str
@dataclass
class StandardItem(Item):
pass
@ -74,7 +74,7 @@ class Responsability:
def __iter__(self):
return iter(self.codes)
@dataclass
class Party:
name: str
@ -96,7 +96,7 @@ class TaxSubTotal:
percent: float
tax_scheme_ident: str = '01'
tax_scheme_name: str = 'IVA'
tax_amount: float = 0.0
taxable_amount: float = 0.0
@ -117,7 +117,7 @@ class TaxTotal:
self.tax_amount += subtax.tax_amount
self.taxable_amount += subtax.taxable_amount
@dataclass
class Price:
amount: float
@ -129,14 +129,14 @@ class Price:
class PaymentMean:
DEBIT = '01'
CREDIT = '02'
def __init__(self, id: str, code: str, due_at: datetime, payment_id: str):
self.id = id
self.code = code
self.due_at = due_at
self.payment_id = payment_id
@dataclass
class Payment:
amount: float
@ -159,7 +159,7 @@ class InvoiceLine:
# la factura y el percent es unico por type_code
# de subtotal
tax: TaxTotal
@property
def total_amount(self):
return self.quantity * self.price.amount
@ -179,7 +179,7 @@ class InvoiceLine:
@property
def taxable_amount(self):
return self.tax.taxable_amount
def calculate(self):
self.tax.calculate(self)
@ -205,7 +205,7 @@ class Invoice:
self.invoice_payment_mean = None
self.invoice_payments = []
self.invoice_lines = []
def set_period(self, startdate, enddate):
self.invoice_period_start = startdate
self.invoice_period_end = enddate
@ -247,14 +247,14 @@ class Invoice:
#DIAN 1.7.-2020: FAU6
self.invoice_legal_monetary_total.tax_inclusive_amount += invline.total_tax_inclusive_amount
#DIAN 1.7.-2020: FAU10
# se omite revisar como implementar el booleano
self.invoice_legal_monetary_total.charge_total_amount = 0
#DIAN 1.7.-2020: FAU14 parcial
self.invoice_legal_monetary_total.payable_amount = self.invoice_legal_monetary_total.tax_inclusive_amount + self.invoice_legal_monetary_total.charge_total_amount
def calculate(self):
for invline in self.invoice_lines:
invline.calculate()
@ -300,7 +300,7 @@ class DianResolucion0001Validator:
if invoice.invoice_issue.tzname() not in ['UTC-05:00', '-05', None]:
self.errors.append(('invoice', 'invoice_issue',
'expected timezone UTC-05:00 or -05 or empty got %s' % (invoice.invoice_issue.tzname())))
def validate(self, invoice):
invoice.accept(self)
self._validate_invoice(invoice)
@ -342,15 +342,16 @@ class DIANInvoiceXML(fe.FeXML):
def __init__(self, invoice):
super().__init__('Invoice', 'http://www.dian.gov.co/contratos/facturaelectronica/v1')
self.placeholder_for('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent')
# ZE02 se requiere existencia para firmar
ublextension = self.fragment('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension', append=True)
extcontent = ublextension.find_or_create_element('/ext:UBLExtension/ext:ExtensionContent')
self.attach_invoice(invoice)
def set_supplier(fexml, invoice):
fexml.placeholder_for('/fe:Invoice/cac:AccountingSupplierParty')
#DIAN 1.7.-2020: FAJ02
#DIAN 1.7.-2020: FAJ02
fexml.set_element('/fe:Invoice/cac:AccountingSupplierParty/cbc:AdditionalAccountID',
invoice.invoice_supplier.organization_code)
#DIAN 1.7.-2020: FAJ06
@ -377,7 +378,7 @@ class DIANInvoiceXML(fe.FeXML):
fexml.set_element('/fe:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PhysicalLocation/cac:Address/cac:Country/cbc:IdentificationCode',
invoice.invoice_supplier.address.country.code)
supplier_address_id_attrs = {'languageID' : 'es'}
supplier_address_id_attrs = {'languageID' : 'es'}
#DIAN 1.7.-2020: FAJ17
fexml.set_element('/fe:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PhysicalLocation/cac:Address/cac:Country/cbc:Name',
invoice.invoice_supplier.address.country.name,
@ -392,7 +393,7 @@ class DIANInvoiceXML(fe.FeXML):
fexml.placeholder_for('/fe:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme')
#DIAN 1.7.-2020: FAJ20
fexml.set_element('/fe:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:RegistrationName',
invoice.invoice_supplier.legal_name)
invoice.invoice_supplier.legal_name)
#DIAN 1.7.-2020: FAJ21
fexml.set_element('/fe:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID',
invoice.invoice_supplier.ident,
@ -422,7 +423,7 @@ class DIANInvoiceXML(fe.FeXML):
#DIAN 1.7.-2020: FAJ35,FAJ36
fexml.set_element('/fe:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cac:RegistrationAddress/cac:Country/cbc:IdentificationCode',
invoice.invoice_supplier.address.country.code)
supplier_address_id_attrs = {'languageID' : 'es'}
supplier_address_id_attrs = {'languageID' : 'es'}
#DIAN 1.7.-2020: FAJ37,FAJ38
fexml.set_element('/fe:Invoice/cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cac:RegistrationAddress/cac:Country/cbc:Name',
invoice.invoice_supplier.address.country.name,
@ -482,7 +483,7 @@ class DIANInvoiceXML(fe.FeXML):
#DIAN 1.7.-2020: FAK16
fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PhysicalLocation/cac:Address/cac:Country/cbc:IdentificationCode',
invoice.invoice_customer.address.country.code)
customer_address_id_attrs = {'languageID' : 'es'}
customer_address_id_attrs = {'languageID' : 'es'}
#DIAN 1.7.-2020: FAK17
fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PhysicalLocation/cac:Address/cac:Country/cbc:Name',
invoice.invoice_customer.address.country.name,
@ -492,7 +493,7 @@ class DIANInvoiceXML(fe.FeXML):
fexml.placeholder_for('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme')
#DIAN 1.7.-2020: FAK17,FAK20
fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:RegistrationName',
invoice.invoice_customer.legal_name)
invoice.invoice_customer.legal_name)
#DIAN 1.7.-2020: FAK21
fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID',
invoice.invoice_customer.ident,
@ -529,7 +530,7 @@ class DIANInvoiceXML(fe.FeXML):
#DIAN 1.7.-2020: FAK37
fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:RegistrationAddress/cac:Country/cbc:Name', invoice.invoice_customer.address.country.name)
#DIAN 1.7.-2020: FAK38
fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:RegistrationAddress/cac:Country/cbc:IdentificationCode',
fexml.set_element('/fe:Invoice/cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cac:RegistrationAddress/cac:Country/cbc:IdentificationCode',
invoice.invoice_customer.address.country.code,
**customer_address_id_attrs)
#DIAN 1.7.-2020: FAK39
@ -561,7 +562,7 @@ class DIANInvoiceXML(fe.FeXML):
fexml.set_element('/fe:Invoice/cac:PaymentMeans/cbc:PaymentMeansCode', payment_mean.code)
fexml.set_element('/fe:Invoice/cac:PaymentMeans/cbc:PaymentDueDate', payment_mean.due_at.strftime('%Y-%m-%d'))
fexml.set_element('/fe:Invoice/cac:PaymentMeans/cbc:PaymentID', payment_mean.payment_id)
def set_legal_monetary(fexml, invoice):
fexml.set_element('/fe:Invoice/cac:LegalMonetaryTotal/cbc:LineExtensionAmount',
#MACHETE redondeo en valor
@ -587,7 +588,7 @@ class DIANInvoiceXML(fe.FeXML):
def set_invoice_totals(fexml, invoice):
tax_amount_for = defaultdict(lambda: defaultdict(lambda: 0.0))
percent_for = defaultdict(lambda: None)
#requeridos para CUFE
tax_amount_for['01']['tax_amount'] = 0.0
tax_amount_for['01']['taxable_amount'] = 0.0
@ -662,7 +663,7 @@ class DIANInvoiceXML(fe.FeXML):
#condition_price.set_element('/cac:AlternativeConditionPrice/cbc:PriceAmount', invoice_line.price.amount, currencyID='COP')
#condition_price.set_element('/cac:AlternativeConditionPrice/cbc:PriceTypeCode', invoice_line.price.type_code)
#condition_price.set_element('/cac:AlternativeConditionPrice/cbc:PriceType', invoice_line.price.type)
for subtotal in invoice_line.tax.subtotals:
line.set_element('/cac:InvoiceLine/cac:TaxTotal/cac:TaxSubtotal/cbc:TaxableAmount', subtotal.taxable_amount, currencyID='COP')
line.set_element('/cac:InvoiceLine/cac:TaxTotal/cac:TaxSubtotal/cbc:TaxAmount', subtotal.tax_amount, currencyID='COP')
@ -671,10 +672,10 @@ class DIANInvoiceXML(fe.FeXML):
line.set_element('/cac:InvoiceLine/cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory/cac:TaxScheme/cbc:Name', subtotal.tax_scheme_name)
line.set_element('/cac:InvoiceLine/cac:Item/cbc:Description', invoice_line.item.description)
# TODO
line.set_element('/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID', invoice_line.item.id)
line.set_element('/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID', invoice_line.item.id)
line.set_element('/cac:InvoiceLine/cac:Price/cbc:PriceAmount', invoice_line.price.amount, currencyID="COP")
#DIAN 1.7.-2020: FBB04
line.set_element('/cac:InvoiceLine/cac:Price/cbc:BaseQuantity', invoice_line.price.amount)
line.set_element('/cac:InvoiceLine/cac:Price/cbc:BaseQuantity', invoice_line.price.amount)
def attach_invoice(fexml, invoice):
"""adiciona etiquetas a FEXML y retorna FEXML

View File

@ -23,4 +23,3 @@ test = pytest
[tool:pytest]
collect_ignore = ['setup.py']

View File

@ -27,7 +27,7 @@ class FakeDianClient(dian.DianClient):
return self.response
return fake_remote
def test_sopa_consultaresolucionesfacturacion():
expected_resp = {
'NumberRangeResponse': [['test1', '', 'test', 0, 10, '', '', 'abc']]

View File

@ -19,4 +19,3 @@ def test_tipoorganizacion():
def test_tipodocumento():
assert codelist.TipoDocumento.short_name == 'TipoDocumento'
assert codelist.TipoDocumento.by_name('Factura de Venta Nacional')['code'] == '01'

View File

@ -22,13 +22,13 @@ def test_facho_xml():
invoice_line = xml.find_or_create_element('/root/Invoice/Line')
assert xml.tostring() == '<root><Invoice>Test<Line/></Invoice></root>'
def test_facho_xml_with_attr():
xml = facho.FachoXML('root')
invoice = xml.find_or_create_element('/root/Invoice[id=123]')
assert xml.tostring() == '<root><Invoice id="123"/></root>'
def test_facho_xml_idempotent():
xml = facho.FachoXML('root')
invoice = xml.find_or_create_element('/root/Invoice')
@ -102,10 +102,10 @@ def test_facho_xml_fragment():
invoice = xml.fragment('/root/Invoice')
invoice.set_element('/Invoice/Id', 1)
assert xml.tostring() == '<root><Invoice><Id>1</Id></Invoice></root>'
def test_facho_xml_fragments():
xml = facho.FachoXML('Invoice')
line = xml.fragment('/Invoice/Line')
line.set_element('/Line/Id', 1)
@ -150,5 +150,3 @@ def test_facho_xml_get_element_text_next_child():
line = xml.fragment('/Invoice/Line', append=True)
line.set_element('/Line/Quantity', 6)
assert line.get_element_text('/Line[2]/Quantity', format_=int) == 6

View File

@ -12,7 +12,7 @@ import helpers
def test_xmlsigned_build(monkeypatch):
#openssl req -x509 -sha256 -nodes -subj "/CN=test" -days 1 -newkey rsa:2048 -keyout example.key -out example.pem
#openssl req -x509 -sha256 -nodes -subj "/CN=test" -days 1 -newkey rsa:2048 -keyout example.key -out example.pem
#openssl pkcs12 -export -out example.p12 -inkey example.key -in example.pem
signer = fe.DianXMLExtensionSigner('./tests/example.p12')
@ -22,27 +22,28 @@ def test_xmlsigned_build(monkeypatch):
with monkeypatch.context() as m:
helpers.mock_urlopen(m)
xml.add_extension(signer)
signer.sign_xml_element(xml.root)
elem = xml.find_or_create_element('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/ds:Signature')
assert elem is not None
#assert elem.findall('ds:SignedInfo', fe.NAMESPACES) is not None
def test_xmlsigned_with_passphrase_build(monkeypatch):
#openssl req -x509 -sha256 -nodes -subj "/CN=test" -days 1 -newkey rsa:2048 -keyout example.key -out example.pem
#openssl req -x509 -sha256 -nodes -subj "/CN=test" -days 1 -newkey rsa:2048 -keyout example.key -out example.pem
#openssl pkcs12 -export -out example.p12 -inkey example.key -in example.pem
signer = fe.DianXMLExtensionSigner('./tests/example-with-passphrase.p12', 'test')
xml = fe.FeXML('Invoice',
'http://www.dian.gov.co/contratos/facturaelectronica/v1')
with monkeypatch.context() as m:
helpers.mock_urlopen(m)
xml.add_extension(signer)
signer.sign_xml_element(xml.root)
elem = xml.find_or_create_element('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/ds:Signature')
assert elem is not None
#assert elem.findall('ds:SignedInfo', fe.NAMESPACES) is not None
@ -71,11 +72,11 @@ def test_dian_extension_software_provider():
nit = '123456789'
id_software = 'ABCDASDF123'
software_provider_extension = fe.DianXMLExtensionSoftwareProvider(nit, '', id_software)
xml = fe.FeXML('Invoice',
'http://www.dian.gov.co/contratos/facturaelectronica/v1')
xml.add_extension(software_provider_extension)
give_nit = xml.get_element_text('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/sts:DianExtensions/sts:SoftwareProvider/sts:ProviderID')
assert nit == give_nit
@ -90,19 +91,22 @@ def test_dian_extension_authorization_provider():
def test_dian_invoice_with_fe():
xml = fe.FeXML('Invoice',
'http://www.dian.gov.co/contratos/facturaelectronica/v1')
assert "<Invoice" in xml.tostring()
assert "<fe:Invoice" in xml.tostring()
def test_xml_sign_dian(monkeypatch):
xml = fe.FeXML('Invoice',
'http://www.dian.gov.co/contratos/facturaelectronica/v1')
xml.find_or_create_element('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent')
ublextension = xml.fragment('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension', append=True)
extcontent = ublextension.find_or_create_element('/ext:UBLExtension/ext:ExtensionContent')
xmlstring = xml.tostring()
print(xmlstring)
signer = fe.DianXMLExtensionSigner('./tests/example.p12')
with monkeypatch.context() as m:
helpers.mock_urlopen(m)
xmlsigned = signer.sign_xml_string(xmlstring)
assert "Signature" in xmlsigned

View File

@ -96,7 +96,7 @@ def simple_invoice():
def test_invoicesimple_build(simple_invoice):
invoice_validator = form.DianResolucion0001Validator()
invoice_validator.validate(simple_invoice)
assert invoice_validator.errors == []
xml = form.DIANInvoiceXML(simple_invoice)
@ -125,7 +125,7 @@ def test_invoicesimple_xml_signed(monkeypatch, simple_invoice):
signer = fe.DianXMLExtensionSigner('./tests/example.p12')
print(xml.tostring())
with monkeypatch.context() as m:
import helpers
helpers.mock_urlopen(m)
@ -136,7 +136,7 @@ def test_invoicesimple_xml_signed(monkeypatch, simple_invoice):
def test_invoicesimple_zip(simple_invoice):
xml_invoice = form.DIANInvoiceXML(simple_invoice)
zipdata = io.BytesIO()
with fe.DianZIP(zipdata) as dianzip:
name_invoice = dianzip.add_invoice_xml(simple_invoice.invoice_ident, str(xml_invoice))
@ -155,7 +155,7 @@ def test_invoice_line_count_numeric(simple_invoice):
xml_invoice = form.DIANInvoiceXML(simple_invoice)
count = xml_invoice.get_element_text('/fe:Invoice/cbc:LineCountNumeric', format_=int)
assert count == len(simple_invoice.invoice_lines)
def test_invoice_profileexecutionid(simple_invoice):
xml_invoice = form.DIANInvoiceXML(simple_invoice)
cufe_extension = fe.DianXMLExtensionCUFE(simple_invoice)
@ -209,10 +209,10 @@ def test_invoice_cufe(simple_invoice_without_lines):
percent = 19.0
)])
))
simple_invoice.calculate()
xml_invoice = form.DIANInvoiceXML(simple_invoice)
cufe_extension = fe.DianXMLExtensionCUFE(
simple_invoice,
tipo_ambiente = fe.DianXMLExtensionCUFE.AMBIENTE_PRODUCCION,
@ -249,7 +249,7 @@ def test_invoice_cufe(simple_invoice_without_lines):
assert formatVars[13] == '693ff6f2a553c3646a063436fd4dd9ded0311471', "ClTec"
#TipoAmbiente
assert formatVars[14] == '1', "TipoAmbiente"
xml_invoice.add_extension(cufe_extension)
cufe = xml_invoice.get_element_text('/fe:Invoice/cbc:UUID')
# RESOLUCION 004: pagina 689

View File

@ -36,4 +36,5 @@ def test_invoice_legalmonetary():
assert inv.invoice_legal_monetary_total.line_extension_amount == 100.0
assert inv.invoice_legal_monetary_total.tax_exclusive_amount == 100.0
assert inv.invoice_legal_monetary_total.tax_inclusive_amount == 119.0
assert inv.invoice_legal_monetary_total.charge_total_amount == 19.0
# TODO
# assert inv.invoice_legal_monetary_total.charge_total_amount == 19.0

View File

@ -24,5 +24,3 @@ deps =
commands =
pip install -U pip
py.test --basetemp={envtmpdir}