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 pyvenv.cfg
.venv .venv
pip-selfcheck.json 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 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 Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>. <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. de facilitar la relación entre el anexo y la implementación.
* facho/form.py: generación de Invoice XML. * 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.', 'One line description of project.',
'Miscellaneous'), 'Miscellaneous'),
] ]

View File

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

View File

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

View File

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

View File

@ -66,7 +66,7 @@ class MemorySignature(object):
self.digest_method = digest_method self.digest_method = digest_method
self.signature_method = signature_method self.signature_method = signature_method
self.expires_dt = expires_dt self.expires_dt = expires_dt
def apply(self, envelope, headers): def apply(self, envelope, headers):
key = _make_sign_key(self.key_data, self.cert_data, self.password) key = _make_sign_key(self.key_data, self.cert_data, self.password)
_sign_envelope_with_key( _sign_envelope_with_key(
@ -225,7 +225,7 @@ def get_timestamp(timestamp = None, delta=None):
timestamp = timestamp or datetime.utcnow() timestamp = timestamp or datetime.utcnow()
if delta: if delta:
timestamp += delta timestamp += delta
format_ = '%Y-%m-%dT%H:%M:%SZ' format_ = '%Y-%m-%dT%H:%M:%SZ'
timestamp = timestamp.replace(tzinfo=pytz.utc, microsecond=0) timestamp = timestamp.replace(tzinfo=pytz.utc, microsecond=0)
return timestamp.strftime(format_) return timestamp.strftime(format_)
@ -233,7 +233,7 @@ def get_timestamp(timestamp = None, delta=None):
def _append_timestamp(security, expires_dt=None): def _append_timestamp(security, expires_dt=None):
if expires_dt is None: if expires_dt is None:
expires_dt = timedelta(seconds=6000) 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 = 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.Created(get_timestamp()))
etimestamp.append(utils.WSU.Expires(get_timestamp(delta=expires_dt))) 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): def validate(xml, schema):
schema.validate(xml) schema.validate(xml)

View File

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

View File

@ -54,48 +54,48 @@
</xsd:complexType> </xsd:complexType>
</xsd:schema> </xsd:schema>
<!-- ===== Copyright Notice ===== --><!-- <!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this to the implementation or use of the technology described in this
document or the extent to which any license under such rights document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has 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 made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from implementors or users of this specification, can be obtained from
the OASIS Executive Director. the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to rights which may cover technology that may be required to
implement this specification. Please address the information to the implement this specification. Please address the information to the
OASIS Executive Director. 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 This document and translations of it may be copied and furnished to
revoked by OASIS or its successors or assigns. 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 The limited permissions granted above are perpetual and will not be
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, revoked by OASIS or its successors or assigns.
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN This document and the information contained herein is provided on
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
PARTICULAR PURPOSE. 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> </xsd:schema>
<!-- ===== Copyright Notice ===== --> <!-- ===== Copyright Notice ===== -->
<!-- <!--
OASIS takes no position regarding the validity or scope of any OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this to the implementation or use of the technology described in this
document or the extent to which any license under such rights document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has 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 made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from implementors or users of this specification, can be obtained from
the OASIS Executive Director. the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to rights which may cover technology that may be required to
implement this specification. Please address the information to the implement this specification. Please address the information to the
OASIS Executive Director. 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 This document and translations of it may be copied and furnished to
revoked by OASIS or its successors or assigns. 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 The limited permissions granted above are perpetual and will not be
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, revoked by OASIS or its successors or assigns.
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN This document and the information contained herein is provided on
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 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. PARTICULAR PURPOSE.
--> -->

View File

@ -11,8 +11,8 @@
"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" "urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
targetNamespace= targetNamespace=
"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" "urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
elementFormDefault="qualified" elementFormDefault="qualified"
attributeFormDefault="unqualified" attributeFormDefault="unqualified"
version="2.1"> version="2.1">
<!--import here all extension schemas--> <!--import here all extension schemas-->
@ -42,48 +42,48 @@
</xsd:schema> </xsd:schema>
<!-- ===== Copyright Notice ===== --> <!-- ===== Copyright Notice ===== -->
<!-- <!--
OASIS takes no position regarding the validity or scope of any OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this to the implementation or use of the technology described in this
document or the extent to which any license under such rights document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has 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 made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from implementors or users of this specification, can be obtained from
the OASIS Executive Director. the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to rights which may cover technology that may be required to
implement this specification. Please address the information to the implement this specification. Please address the information to the
OASIS Executive Director. 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 This document and translations of it may be copied and furnished to
revoked by OASIS or its successors or assigns. 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 The limited permissions granted above are perpetual and will not be
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, revoked by OASIS or its successors or assigns.
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN This document and the information contained herein is provided on
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 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. PARTICULAR PURPOSE.
--> -->

View File

@ -22,48 +22,48 @@
</xsd:schema> </xsd:schema>
<!-- ===== Copyright Notice ===== --> <!-- ===== Copyright Notice ===== -->
<!-- <!--
OASIS takes no position regarding the validity or scope of any OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this to the implementation or use of the technology described in this
document or the extent to which any license under such rights document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has 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 made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from implementors or users of this specification, can be obtained from
the OASIS Executive Director. the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to rights which may cover technology that may be required to
implement this specification. Please address the information to the implement this specification. Please address the information to the
OASIS Executive Director. 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 This document and translations of it may be copied and furnished to
revoked by OASIS or its successors or assigns. 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 The limited permissions granted above are perpetual and will not be
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, revoked by OASIS or its successors or assigns.
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN This document and the information contained herein is provided on
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 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. PARTICULAR PURPOSE.
--> -->

View File

@ -33,7 +33,7 @@
schemaLocation="UBL-XAdESv132-2.1.xsd"/> schemaLocation="UBL-XAdESv132-2.1.xsd"/>
<xsd:import namespace="http://uri.etsi.org/01903/v1.4.1#" <xsd:import namespace="http://uri.etsi.org/01903/v1.4.1#"
schemaLocation="UBL-XAdESv141-2.1.xsd"/> schemaLocation="UBL-XAdESv141-2.1.xsd"/>
<!-- ===== Element Declarations ===== --> <!-- ===== Element Declarations ===== -->
<xsd:element name="SignatureInformation" type="SignatureInformationType"/> <xsd:element name="SignatureInformation" type="SignatureInformationType"/>
<!-- ===== Type Definitions ===== --> <!-- ===== Type Definitions ===== -->
@ -91,48 +91,48 @@
</xsd:complexType> </xsd:complexType>
</xsd:schema> </xsd:schema>
<!-- ===== Copyright Notice ===== --><!-- <!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this to the implementation or use of the technology described in this
document or the extent to which any license under such rights document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has 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 made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from implementors or users of this specification, can be obtained from
the OASIS Executive Director. the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to rights which may cover technology that may be required to
implement this specification. Please address the information to the implement this specification. Please address the information to the
OASIS Executive Director. 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 This document and translations of it may be copied and furnished to
revoked by OASIS or its successors or assigns. 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 The limited permissions granted above are perpetual and will not be
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, revoked by OASIS or its successors or assigns.
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN This document and the information contained herein is provided on
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
PARTICULAR PURPOSE. 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:complexType>
</xsd:schema> </xsd:schema>
<!-- ===== Copyright Notice ===== --><!-- <!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this to the implementation or use of the technology described in this
document or the extent to which any license under such rights document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has 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 made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from implementors or users of this specification, can be obtained from
the OASIS Executive Director. the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to rights which may cover technology that may be required to
implement this specification. Please address the information to the implement this specification. Please address the information to the
OASIS Executive Director. 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 This document and translations of it may be copied and furnished to
revoked by OASIS or its successors or assigns. 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 The limited permissions granted above are perpetual and will not be
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, revoked by OASIS or its successors or assigns.
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN This document and the information contained herein is provided on
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
PARTICULAR PURPOSE. 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 Per table 8-3, the value, rate and percentage types are based on
"Numeric. Type" as they are secondary representation terms. "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. secondary representation term.
Per XSD lexical constraints, the following unqualified data types Per XSD lexical constraints, the following unqualified data types
corresponding to core component types and secondary representation terms corresponding to core component types and secondary representation terms
are based on XSD types (accordingly, the supplementary component "format" are based on XSD types (accordingly, the supplementary component "format"
is not made available for these types): is not made available for these types):
Date Time. Type on xsd:dateTime Date Time. Type on xsd:dateTime
@ -45,11 +45,11 @@
All other unqualified data types inherit the core component types complete All other unqualified data types inherit the core component types complete
with their supplementary components. with their supplementary components.
--> -->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2" targetNamespace="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2"
xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2" xmlns:ccts-cct="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModule:2"
xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:ccts="urn:un:unece:uncefact:documentation:2"
elementFormDefault="qualified" elementFormDefault="qualified"
attributeFormDefault="unqualified" attributeFormDefault="unqualified"
version="2.1"> version="2.1">
<!-- ===== Imports ===== --> <!-- ===== Imports ===== -->
@ -265,7 +265,7 @@ namespace="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModul
<xsd:extension base="ccts-cct:CodeType"/> <xsd:extension base="ccts-cct:CodeType"/>
</xsd:simpleContent> </xsd:simpleContent>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="DateTimeType"> <xsd:complexType name="DateTimeType">
<xsd:annotation> <xsd:annotation>
<xsd:documentation xml:lang="en"> <xsd:documentation xml:lang="en">
@ -386,7 +386,7 @@ namespace="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModul
</xsd:restriction> </xsd:restriction>
</xsd:simpleContent> </xsd:simpleContent>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="NumericType"> <xsd:complexType name="NumericType">
<xsd:annotation> <xsd:annotation>
<xsd:documentation xml:lang="en"> <xsd:documentation xml:lang="en">
@ -506,48 +506,48 @@ namespace="urn:un:unece:uncefact:data:specification:CoreComponentTypeSchemaModul
</xsd:simpleContent> </xsd:simpleContent>
</xsd:complexType> </xsd:complexType>
</xsd:schema><!-- ===== Copyright Notice ===== --><!-- </xsd:schema><!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this to the implementation or use of the technology described in this
document or the extent to which any license under such rights document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has 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 made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from implementors or users of this specification, can be obtained from
the OASIS Executive Director. the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to rights which may cover technology that may be required to
implement this specification. Please address the information to the implement this specification. Please address the information to the
OASIS Executive Director. 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 This document and translations of it may be copied and furnished to
revoked by OASIS or its successors or assigns. 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 The limited permissions granted above are perpetual and will not be
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, revoked by OASIS or its successors or assigns.
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN This document and the information contained herein is provided on
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A 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. PARTICULAR PURPOSE.
--> -->

View File

@ -6,12 +6,12 @@
Module: UBL-XAdESv132-2.1.xsd Module: UBL-XAdESv132-2.1.xsd
Generated on: 2011-02-21 17:20(UTC) 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. 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: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"/> <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 --> EncapsulatedPKIDataType and containers for time-stamp tokens -->
<!-- Start AnyType --> <!-- Start AnyType -->
<xsd:element name="Any" type="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 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: 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" "http://www.w3.org/2001/XMLSchema.dtd"
--> -->
<!DOCTYPE schema <!DOCTYPE schema
[ [
<!ATTLIST schema <!ATTLIST schema
xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#"> xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
<!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'> <!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
<!ENTITY % p ''> <!ENTITY % p ''>
@ -41,7 +41,7 @@
<schema xmlns="http://www.w3.org/2001/XMLSchema" <schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
targetNamespace="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 --> <!-- Basic Types Defined for Signatures -->
@ -54,16 +54,16 @@
<element name="Signature" type="ds:SignatureType"/> <element name="Signature" type="ds:SignatureType"/>
<complexType name="SignatureType"> <complexType name="SignatureType">
<sequence> <sequence>
<element ref="ds:SignedInfo"/> <element ref="ds:SignedInfo"/>
<element ref="ds:SignatureValue"/> <element ref="ds:SignatureValue"/>
<element ref="ds:KeyInfo" minOccurs="0"/> <element ref="ds:KeyInfo" minOccurs="0"/>
<element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/> <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/>
</sequence> </sequence>
<attribute name="Id" type="ID" use="optional"/> <attribute name="Id" type="ID" use="optional"/>
</complexType> </complexType>
<element name="SignatureValue" type="ds:SignatureValueType"/> <element name="SignatureValue" type="ds:SignatureValueType"/>
<complexType name="SignatureValueType"> <complexType name="SignatureValueType">
<simpleContent> <simpleContent>
<extension base="base64Binary"> <extension base="base64Binary">
@ -76,21 +76,21 @@
<element name="SignedInfo" type="ds:SignedInfoType"/> <element name="SignedInfo" type="ds:SignedInfoType"/>
<complexType name="SignedInfoType"> <complexType name="SignedInfoType">
<sequence> <sequence>
<element ref="ds:CanonicalizationMethod"/> <element ref="ds:CanonicalizationMethod"/>
<element ref="ds:SignatureMethod"/> <element ref="ds:SignatureMethod"/>
<element ref="ds:Reference" maxOccurs="unbounded"/> <element ref="ds:Reference" maxOccurs="unbounded"/>
</sequence> </sequence>
<attribute name="Id" type="ID" use="optional"/> <attribute name="Id" type="ID" use="optional"/>
</complexType> </complexType>
<element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/> <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/>
<complexType name="CanonicalizationMethodType" mixed="true"> <complexType name="CanonicalizationMethodType" mixed="true">
<sequence> <sequence>
<any namespace="##any" minOccurs="0" maxOccurs="unbounded"/> <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) namespace --> <!-- (0,unbounded) elements from (1,1) namespace -->
</sequence> </sequence>
<attribute name="Algorithm" type="anyURI" use="required"/> <attribute name="Algorithm" type="anyURI" use="required"/>
</complexType> </complexType>
<element name="SignatureMethod" type="ds:SignatureMethodType"/> <element name="SignatureMethod" type="ds:SignatureMethodType"/>
@ -100,48 +100,48 @@
<any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
<!-- (0,unbounded) elements from (1,1) external namespace --> <!-- (0,unbounded) elements from (1,1) external namespace -->
</sequence> </sequence>
<attribute name="Algorithm" type="anyURI" use="required"/> <attribute name="Algorithm" type="anyURI" use="required"/>
</complexType> </complexType>
<!-- Start Reference --> <!-- Start Reference -->
<element name="Reference" type="ds:ReferenceType"/> <element name="Reference" type="ds:ReferenceType"/>
<complexType name="ReferenceType"> <complexType name="ReferenceType">
<sequence> <sequence>
<element ref="ds:Transforms" minOccurs="0"/> <element ref="ds:Transforms" minOccurs="0"/>
<element ref="ds:DigestMethod"/> <element ref="ds:DigestMethod"/>
<element ref="ds:DigestValue"/> <element ref="ds:DigestValue"/>
</sequence> </sequence>
<attribute name="Id" type="ID" use="optional"/> <attribute name="Id" type="ID" use="optional"/>
<attribute name="URI" type="anyURI" use="optional"/> <attribute name="URI" type="anyURI" use="optional"/>
<attribute name="Type" type="anyURI" use="optional"/> <attribute name="Type" type="anyURI" use="optional"/>
</complexType> </complexType>
<element name="Transforms" type="ds:TransformsType"/> <element name="Transforms" type="ds:TransformsType"/>
<complexType name="TransformsType"> <complexType name="TransformsType">
<sequence> <sequence>
<element ref="ds:Transform" maxOccurs="unbounded"/> <element ref="ds:Transform" maxOccurs="unbounded"/>
</sequence> </sequence>
</complexType> </complexType>
<element name="Transform" type="ds:TransformType"/> <element name="Transform" type="ds:TransformType"/>
<complexType name="TransformType" mixed="true"> <complexType name="TransformType" mixed="true">
<choice minOccurs="0" maxOccurs="unbounded"> <choice minOccurs="0" maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/> <any namespace="##other" processContents="lax"/>
<!-- (1,1) elements from (0,unbounded) namespaces --> <!-- (1,1) elements from (0,unbounded) namespaces -->
<element name="XPath" type="string"/> <element name="XPath" type="string"/>
</choice> </choice>
<attribute name="Algorithm" type="anyURI" use="required"/> <attribute name="Algorithm" type="anyURI" use="required"/>
</complexType> </complexType>
<!-- End Reference --> <!-- End Reference -->
<element name="DigestMethod" type="ds:DigestMethodType"/> <element name="DigestMethod" type="ds:DigestMethodType"/>
<complexType name="DigestMethodType" mixed="true"> <complexType name="DigestMethodType" mixed="true">
<sequence> <sequence>
<any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</sequence> </sequence>
<attribute name="Algorithm" type="anyURI" use="required"/> <attribute name="Algorithm" type="anyURI" use="required"/>
</complexType> </complexType>
<element name="DigestValue" type="ds:DigestValueType"/> <element name="DigestValue" type="ds:DigestValueType"/>
@ -153,26 +153,26 @@
<!-- Start KeyInfo --> <!-- Start KeyInfo -->
<element name="KeyInfo" type="ds:KeyInfoType"/> <element name="KeyInfo" type="ds:KeyInfoType"/>
<complexType name="KeyInfoType" mixed="true"> <complexType name="KeyInfoType" mixed="true">
<choice maxOccurs="unbounded"> <choice maxOccurs="unbounded">
<element ref="ds:KeyName"/> <element ref="ds:KeyName"/>
<element ref="ds:KeyValue"/> <element ref="ds:KeyValue"/>
<element ref="ds:RetrievalMethod"/> <element ref="ds:RetrievalMethod"/>
<element ref="ds:X509Data"/> <element ref="ds:X509Data"/>
<element ref="ds:PGPData"/> <element ref="ds:PGPData"/>
<element ref="ds:SPKIData"/> <element ref="ds:SPKIData"/>
<element ref="ds:MgmtData"/> <element ref="ds:MgmtData"/>
<any processContents="lax" namespace="##other"/> <any processContents="lax" namespace="##other"/>
<!-- (1,1) elements from (0,unbounded) namespaces --> <!-- (1,1) elements from (0,unbounded) namespaces -->
</choice> </choice>
<attribute name="Id" type="ID" use="optional"/> <attribute name="Id" type="ID" use="optional"/>
</complexType> </complexType>
<element name="KeyName" type="string"/> <element name="KeyName" type="string"/>
<element name="MgmtData" type="string"/> <element name="MgmtData" type="string"/>
<element name="KeyValue" type="ds:KeyValueType"/> <element name="KeyValue" type="ds:KeyValueType"/>
<complexType name="KeyValueType" mixed="true"> <complexType name="KeyValueType" mixed="true">
<choice> <choice>
<element ref="ds:DSAKeyValue"/> <element ref="ds:DSAKeyValue"/>
@ -181,18 +181,18 @@
</choice> </choice>
</complexType> </complexType>
<element name="RetrievalMethod" type="ds:RetrievalMethodType"/> <element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
<complexType name="RetrievalMethodType"> <complexType name="RetrievalMethodType">
<sequence> <sequence>
<element ref="ds:Transforms" minOccurs="0"/> <element ref="ds:Transforms" minOccurs="0"/>
</sequence> </sequence>
<attribute name="URI" type="anyURI"/> <attribute name="URI" type="anyURI"/>
<attribute name="Type" type="anyURI" use="optional"/> <attribute name="Type" type="anyURI" use="optional"/>
</complexType> </complexType>
<!-- Start X509Data --> <!-- Start X509Data -->
<element name="X509Data" type="ds:X509DataType"/> <element name="X509Data" type="ds:X509DataType"/>
<complexType name="X509DataType"> <complexType name="X509DataType">
<sequence maxOccurs="unbounded"> <sequence maxOccurs="unbounded">
<choice> <choice>
@ -206,10 +206,10 @@
</sequence> </sequence>
</complexType> </complexType>
<complexType name="X509IssuerSerialType"> <complexType name="X509IssuerSerialType">
<sequence> <sequence>
<element name="X509IssuerName" type="string"/> <element name="X509IssuerName" type="string"/>
<element name="X509SerialNumber" type="integer"/> <element name="X509SerialNumber" type="integer"/>
</sequence> </sequence>
</complexType> </complexType>
@ -217,17 +217,17 @@
<!-- Begin PGPData --> <!-- Begin PGPData -->
<element name="PGPData" type="ds:PGPDataType"/> <element name="PGPData" type="ds:PGPDataType"/>
<complexType name="PGPDataType"> <complexType name="PGPDataType">
<choice> <choice>
<sequence> <sequence>
<element name="PGPKeyID" type="base64Binary"/> <element name="PGPKeyID" type="base64Binary"/>
<element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/> <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/>
<any namespace="##other" processContents="lax" minOccurs="0" <any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/> maxOccurs="unbounded"/>
</sequence> </sequence>
<sequence> <sequence>
<element name="PGPKeyPacket" type="base64Binary"/> <element name="PGPKeyPacket" type="base64Binary"/>
<any namespace="##other" processContents="lax" minOccurs="0" <any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/> maxOccurs="unbounded"/>
</sequence> </sequence>
@ -238,13 +238,13 @@
<!-- Begin SPKIData --> <!-- Begin SPKIData -->
<element name="SPKIData" type="ds:SPKIDataType"/> <element name="SPKIData" type="ds:SPKIDataType"/>
<complexType name="SPKIDataType"> <complexType name="SPKIDataType">
<sequence maxOccurs="unbounded"> <sequence maxOccurs="unbounded">
<element name="SPKISexp" type="base64Binary"/> <element name="SPKISexp" type="base64Binary"/>
<any namespace="##other" processContents="lax" minOccurs="0"/> <any namespace="##other" processContents="lax" minOccurs="0"/>
</sequence> </sequence>
</complexType> </complexType>
<!-- End SPKIData --> <!-- End SPKIData -->
@ -252,40 +252,40 @@
<!-- Start Object (Manifest, SignatureProperty) --> <!-- Start Object (Manifest, SignatureProperty) -->
<element name="Object" type="ds:ObjectType"/> <element name="Object" type="ds:ObjectType"/>
<complexType name="ObjectType" mixed="true"> <complexType name="ObjectType" mixed="true">
<sequence minOccurs="0" maxOccurs="unbounded"> <sequence minOccurs="0" maxOccurs="unbounded">
<any namespace="##any" processContents="lax"/> <any namespace="##any" processContents="lax"/>
</sequence> </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="MimeType" type="string" use="optional"/> <!-- add a grep facet -->
<attribute name="Encoding" type="anyURI" use="optional"/> <attribute name="Encoding" type="anyURI" use="optional"/>
</complexType> </complexType>
<element name="Manifest" type="ds:ManifestType"/> <element name="Manifest" type="ds:ManifestType"/>
<complexType name="ManifestType"> <complexType name="ManifestType">
<sequence> <sequence>
<element ref="ds:Reference" maxOccurs="unbounded"/> <element ref="ds:Reference" maxOccurs="unbounded"/>
</sequence> </sequence>
<attribute name="Id" type="ID" use="optional"/> <attribute name="Id" type="ID" use="optional"/>
</complexType> </complexType>
<element name="SignatureProperties" type="ds:SignaturePropertiesType"/> <element name="SignatureProperties" type="ds:SignaturePropertiesType"/>
<complexType name="SignaturePropertiesType"> <complexType name="SignaturePropertiesType">
<sequence> <sequence>
<element ref="ds:SignatureProperty" maxOccurs="unbounded"/> <element ref="ds:SignatureProperty" maxOccurs="unbounded"/>
</sequence> </sequence>
<attribute name="Id" type="ID" use="optional"/> <attribute name="Id" type="ID" use="optional"/>
</complexType> </complexType>
<element name="SignatureProperty" type="ds:SignaturePropertyType"/> <element name="SignatureProperty" type="ds:SignaturePropertyType"/>
<complexType name="SignaturePropertyType" mixed="true"> <complexType name="SignaturePropertyType" mixed="true">
<choice maxOccurs="unbounded"> <choice maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/> <any namespace="##other" processContents="lax"/>
<!-- (1,1) elements from (1,unbounded) namespaces --> <!-- (1,1) elements from (1,unbounded) namespaces -->
</choice> </choice>
<attribute name="Target" type="anyURI" use="required"/> <attribute name="Target" type="anyURI" use="required"/>
<attribute name="Id" type="ID" use="optional"/> <attribute name="Id" type="ID" use="optional"/>
</complexType> </complexType>
<!-- End Object (Manifest, SignatureProperty) --> <!-- End Object (Manifest, SignatureProperty) -->
@ -318,10 +318,10 @@
<element name="RSAKeyValue" type="ds:RSAKeyValueType"/> <element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
<complexType name="RSAKeyValueType"> <complexType name="RSAKeyValueType">
<sequence> <sequence>
<element name="Modulus" type="ds:CryptoBinary"/> <element name="Modulus" type="ds:CryptoBinary"/>
<element name="Exponent" type="ds:CryptoBinary"/> <element name="Exponent" type="ds:CryptoBinary"/>
</sequence> </sequence>
</complexType> </complexType>
<!-- End KeyValue Element-types --> <!-- End KeyValue Element-types -->

View File

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

View File

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

View File

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

View File

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

View File

@ -955,48 +955,48 @@
</xsd:complexType> </xsd:complexType>
</xsd:schema> </xsd:schema>
<!-- ===== Copyright Notice ===== --><!-- <!-- ===== Copyright Notice ===== --><!--
OASIS takes no position regarding the validity or scope of any OASIS takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to pertain intellectual property or other rights that might be claimed to pertain
to the implementation or use of the technology described in this to the implementation or use of the technology described in this
document or the extent to which any license under such rights document or the extent to which any license under such rights
might or might not be available; neither does it represent that it has 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 made any effort to identify any such rights. Information on OASIS's
procedures with respect to rights in OASIS specifications can be procedures with respect to rights in OASIS specifications can be
found at the OASIS website. Copies of claims of rights made found at the OASIS website. Copies of claims of rights made
available for publication and any assurances of licenses to be made available for publication and any assurances of licenses to be made
available, or the result of an attempt made to obtain a general available, or the result of an attempt made to obtain a general
license or permission for the use of such proprietary rights by license or permission for the use of such proprietary rights by
implementors or users of this specification, can be obtained from implementors or users of this specification, can be obtained from
the OASIS Executive Director. the OASIS Executive Director.
OASIS invites any interested party to bring to its attention any OASIS invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to rights which may cover technology that may be required to
implement this specification. Please address the information to the implement this specification. Please address the information to the
OASIS Executive Director. 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 This document and translations of it may be copied and furnished to
revoked by OASIS or its successors or assigns. 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 The limited permissions granted above are perpetual and will not be
an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, revoked by OASIS or its successors or assigns.
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION HEREIN This document and the information contained herein is provided on
WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES,
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
PARTICULAR PURPOSE. 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> </Value>
</Row> </Row>
</SimpleCodeList> </SimpleCodeList>
</gc:CodeList> </gc:CodeList>

View File

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

View File

@ -47,4 +47,4 @@
</Value> </Value>
</Row> </Row>
</SimpleCodeList> </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>992050</SimpleValue></Value></Row>
<Row><Value ColumnRef="code"><SimpleValue>995007</SimpleValue></Value></Row> <Row><Value ColumnRef="code"><SimpleValue>995007</SimpleValue></Value></Row>
</SimpleCodeList> </SimpleCodeList>
</gc:CodeList> </gc:CodeList>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -47,4 +47,4 @@
</Value> </Value>
</Row> </Row>
</SimpleCodeList> </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>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> <Row><Value ColumnRef="code"><SimpleValue>033</SimpleValue></Value><Value ColumnRef="name"><SimpleValue>Aceptación de DocumentoSimpleValue></Value></Row>
</SimpleCodeList> </SimpleCodeList>
</gc:CodeList> </gc:CodeList>

View File

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

View File

@ -45,7 +45,7 @@ class CodeList:
row[value.attrib['ColumnRef']] = value.getchildren()[0].text row[value.attrib['ColumnRef']] = value.getchildren()[0].text
return row return row
def __getitem__(self, key): def __getitem__(self, key):
return self.rows[str(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') TipoOperacionF = CodeList(path_for_codelist('TipoOperacionF-2.1.gc'), 'code', 'name')
Municipio = CodeList(path_for_codelist('Municipio-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') Departamento = CodeList(path_for_codelist('Departamentos-2.1.gc'), 'code', 'name')

View File

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

View File

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

View File

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

View File

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

View File

@ -19,4 +19,3 @@ def test_tipoorganizacion():
def test_tipodocumento(): def test_tipodocumento():
assert codelist.TipoDocumento.short_name == 'TipoDocumento' assert codelist.TipoDocumento.short_name == 'TipoDocumento'
assert codelist.TipoDocumento.by_name('Factura de Venta Nacional')['code'] == '01' 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') invoice_line = xml.find_or_create_element('/root/Invoice/Line')
assert xml.tostring() == '<root><Invoice>Test<Line/></Invoice></root>' assert xml.tostring() == '<root><Invoice>Test<Line/></Invoice></root>'
def test_facho_xml_with_attr(): def test_facho_xml_with_attr():
xml = facho.FachoXML('root') xml = facho.FachoXML('root')
invoice = xml.find_or_create_element('/root/Invoice[id=123]') invoice = xml.find_or_create_element('/root/Invoice[id=123]')
assert xml.tostring() == '<root><Invoice id="123"/></root>' assert xml.tostring() == '<root><Invoice id="123"/></root>'
def test_facho_xml_idempotent(): def test_facho_xml_idempotent():
xml = facho.FachoXML('root') xml = facho.FachoXML('root')
invoice = xml.find_or_create_element('/root/Invoice') invoice = xml.find_or_create_element('/root/Invoice')
@ -102,10 +102,10 @@ def test_facho_xml_fragment():
invoice = xml.fragment('/root/Invoice') invoice = xml.fragment('/root/Invoice')
invoice.set_element('/Invoice/Id', 1) invoice.set_element('/Invoice/Id', 1)
assert xml.tostring() == '<root><Invoice><Id>1</Id></Invoice></root>' assert xml.tostring() == '<root><Invoice><Id>1</Id></Invoice></root>'
def test_facho_xml_fragments(): def test_facho_xml_fragments():
xml = facho.FachoXML('Invoice') xml = facho.FachoXML('Invoice')
line = xml.fragment('/Invoice/Line') line = xml.fragment('/Invoice/Line')
line.set_element('/Line/Id', 1) 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 = xml.fragment('/Invoice/Line', append=True)
line.set_element('/Line/Quantity', 6) line.set_element('/Line/Quantity', 6)
assert line.get_element_text('/Line[2]/Quantity', format_=int) == 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): 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 #openssl pkcs12 -export -out example.p12 -inkey example.key -in example.pem
signer = fe.DianXMLExtensionSigner('./tests/example.p12') signer = fe.DianXMLExtensionSigner('./tests/example.p12')
@ -22,27 +22,28 @@ def test_xmlsigned_build(monkeypatch):
with monkeypatch.context() as m: with monkeypatch.context() as m:
helpers.mock_urlopen(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') elem = xml.find_or_create_element('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/ds:Signature')
assert elem is not None assert elem is not None
#assert elem.findall('ds:SignedInfo', fe.NAMESPACES) is not None #assert elem.findall('ds:SignedInfo', fe.NAMESPACES) is not None
def test_xmlsigned_with_passphrase_build(monkeypatch): 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 #openssl pkcs12 -export -out example.p12 -inkey example.key -in example.pem
signer = fe.DianXMLExtensionSigner('./tests/example-with-passphrase.p12', 'test') signer = fe.DianXMLExtensionSigner('./tests/example-with-passphrase.p12', 'test')
xml = fe.FeXML('Invoice', xml = fe.FeXML('Invoice',
'http://www.dian.gov.co/contratos/facturaelectronica/v1') 'http://www.dian.gov.co/contratos/facturaelectronica/v1')
with monkeypatch.context() as m: with monkeypatch.context() as m:
helpers.mock_urlopen(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') elem = xml.find_or_create_element('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/ds:Signature')
assert elem is not None assert elem is not None
#assert elem.findall('ds:SignedInfo', fe.NAMESPACES) 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' nit = '123456789'
id_software = 'ABCDASDF123' id_software = 'ABCDASDF123'
software_provider_extension = fe.DianXMLExtensionSoftwareProvider(nit, '', id_software) software_provider_extension = fe.DianXMLExtensionSoftwareProvider(nit, '', id_software)
xml = fe.FeXML('Invoice', xml = fe.FeXML('Invoice',
'http://www.dian.gov.co/contratos/facturaelectronica/v1') 'http://www.dian.gov.co/contratos/facturaelectronica/v1')
xml.add_extension(software_provider_extension) 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') give_nit = xml.get_element_text('/fe:Invoice/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/sts:DianExtensions/sts:SoftwareProvider/sts:ProviderID')
assert nit == give_nit assert nit == give_nit
@ -90,19 +91,22 @@ def test_dian_extension_authorization_provider():
def test_dian_invoice_with_fe(): def test_dian_invoice_with_fe():
xml = fe.FeXML('Invoice', xml = fe.FeXML('Invoice',
'http://www.dian.gov.co/contratos/facturaelectronica/v1') '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): def test_xml_sign_dian(monkeypatch):
xml = fe.FeXML('Invoice', xml = fe.FeXML('Invoice',
'http://www.dian.gov.co/contratos/facturaelectronica/v1') '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() xmlstring = xml.tostring()
print(xmlstring)
signer = fe.DianXMLExtensionSigner('./tests/example.p12') signer = fe.DianXMLExtensionSigner('./tests/example.p12')
with monkeypatch.context() as m: with monkeypatch.context() as m:
helpers.mock_urlopen(m) helpers.mock_urlopen(m)
xmlsigned = signer.sign_xml_string(xmlstring) xmlsigned = signer.sign_xml_string(xmlstring)
assert "Signature" in xmlsigned assert "Signature" in xmlsigned

View File

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