Cannot resolve the name 'xmldsig:Signature' to a(n) 'element
Posted: Wed Jun 29, 2005 2:23 pm
Hi all,
Lately I have been going through differents problems while trying to validate a XML along with a XSD schema.
The message in the subjetc: Cannot resolve the name 'xmldsig:Signature' to a(n) 'element, is produced by the next code:
XML FILE
URI="file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xml/PeticionFirmada.xml"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PeticionFirmada xmlns="https://www.munimadrid.es/Pagos">
<Peticion Id="12345" Version="1.0">
<NumOperacion>1111</NumOperacion>
<NifAyuntamiento>50200203</NifAyuntamiento>
<FechaTransaccion>
<DiaTransaccion>05052005</DiaTransaccion>
<HoraTransaccion>1245</HoraTransaccion>
</FechaTransaccion>
<CanalPago>1</CanalPago>
<InfoCertificado>
<NombreCertificado>César Fernández</NombreCertificado>
<NifCertificado>50200203</NifCertificado>
<NumeroSerieCertificado>123456879</NumeroSerieCertificado>
</InfoCertificado>
<InfoCuenta>
<Entidad>1234</Entidad>
<Sucursal>1234568790</Sucursal>
<DC>12</DC>
<Cuenta>1234</Cuenta>
</InfoCuenta>
<EntidadReceptora>2038</EntidadReceptora>
<Emisor>
<NumEmisor>28984.0</NumEmisor>
<Identificador>12345</Identificador>
<FechaControl>05052005</FechaControl>
<DigitosControl>12</DigitosControl>
<ImporteCobro>0000000010</ImporteCobro>
<NIFCIFInteresado>12345678F</NIFCIFInteresado>
<Confirmacion>
<Etiqueta>Marca y modelo
</Etiqueta>
<Etiqueta>Matricula
</Etiqueta>
<Informacion>OPEN CALIBRA
</Informacion>
<Informacion>M-9900-GM
</Informacion>
</Confirmacion>
<Recibo>
<AnioyTipoPres>54321</AnioyTipoPres>
<Concepto>7654321</Concepto>
<DatosRecibo>
<Linea1>linea 1</Linea1>
<Linea2>linea 2</Linea2>
<Linea3>linea 3</Linea3>
<Linea4>linea 4</Linea4>
<Linea5>linea 5</Linea5>
<Linea6>linea 6</Linea6>
<Linea7>linea 7</Linea7>
<Linea8>linea 8</Linea8>
</DatosRecibo>
</Recibo>
</Emisor>
</Peticion>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#12345">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>TRvw0HxqIAPNfRA/comKXO0w9l8=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
rDM8lP5IxIoEAIcsVcfBJXb+FcKYeGHAkS5S9yeLHNjZ45JtIrYbIvhp2YNqn+sTB0+MScVHe2HW
jVv9wrEGqIBpnP1zzzLxJrxrEqOP/AxlDGeYPsydOUudnuBOWaC4wKd0sFfIgzrmq7dNKunB0eoK
RvvEbweCT3NiyIHO1j8=
</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>
MIID4zCCA0ygAwIBAgIEPHR4dTANBgkqhkiG9w0BAQUFADA2MQswCQYDVQQGEwJFUzENMAsGA1UE
ChMERk5NVDEYMBYGA1UECxMPRk5NVCBDbGFzZSAyIENBMB4XDTAzMTEwNzEyNDQ1NloXDTA1MTEw
NzEzMTQ1NlowgbgxCzAJBgNVBAYTAkVTMQ0wCwYDVQQKEwRGTk1UMRgwFgYDVQQLEw9GTk1UIENs
YXNlIDIgQ0ExETAPBgNVBAsTCFB1YmxpY29zMRIwEAYDVQQLEwk1MDAwNzAwMTUxWTBXBgNVBAMT
UERFU0NSSVBDSU9OIE1VTklNQURSSUQgLSBFTlRJREFEIENFTlRSTyBNVU5JQ0lQQUwgREUgSU5G
T1JNQVRJQ0EgLSBDSUYgUDI4MDAwMzFDMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDsgqYX
9yqIPfGlgFbSR2eY28bpbeImdYGJVxhY78mdEcpAuVLL9P5RBj9L2snx3f6KyjBDOHsBRMI6qdCg
xJe3LZ6Ut6A6O6WBkNJffLwgjJy07hv5BLKLEIk4oxLkyWnBxeL2e5WJSgJ+9B/2K38WadkbauxP
ruI9kuPyqo99WwIDAQABo4IBeTCCAXUwCwYDVR0PBAQDAgeAMCsGA1UdEAQkMCKADzIwMDMxMTA3
MTI0NDU2WoEPMjAwNTExMDcxMzE0NTZaMBEGCWCGSAGG+EIBAQQEAwIEEDB+BgNVHREEdzB1pHMw
cTEYMBYGCSsGAQQBrGYBDxMJcDI4MDAwMzFjMS4wLAYJKwYBBAGsZgEOEx9jZW50cm8gbXVuaWNp
cGFsIGRlIGluZm9ybWF0aWNhMSUwIwYJKwYBBAGsZgEIExZkZXNjcmlwY2lvbiBtdW5pbWFkcmlk
MFsGA1UdHwRUMFIwUKBOoEykSjBIMQswCQYDVQQGEwJFUzENMAsGA1UEChMERk5NVDEYMBYGA1UE
CxMPRk5NVCBDbGFzZSAyIENBMRAwDgYDVQQDEwdDUkwxMDI3MB8GA1UdIwQYMBaAFECadkSXdAfE
rBTLHo1POkV8MNdhMB0GA1UdDgQWBBTBbxzf/1CxdWnqp3PKFC/jtCvByTAJBgNVHRMEAjAAMA0G
CSqGSIb3DQEBBQUAA4GBAFsrZeaxzv24tGSVwR3Y/1nimdiUnMWiV5vFK3Mzh8ukFelVTlXPSvqN
DHJvzG+JAMB1ZPevjq91kZqppoPZAFsEblAIsu5i3MUNRE4MsFUW4JSL6zoMhyfhkn1UdUe8Fntg
VHPLtJ9K1+9howV48sV1DDRnGUKx/Wv2ZtkuZpX3
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
</PeticionFirmada>
XSD MAIN FILE:
URI="file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xsd/PeticionPagosFirma.xsd"
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xmldsig="http://www.w3.org/2000/09/xmldsig#"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
<xs:schema xmlns:xmldsig="http://www.w3.org/2000/09/xmldsig#"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-->
<xs:include schemaLocation="file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xsd/PeticionPagos.xsd"/>
<!-- Otros schemas -->
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#"/>
<!-- Element -->
<xs:element name="PeticionFirmada">
<xs:complexType>
<xs:sequence>
<xs:element ref="Peticion"/>
<xs:element ref="xmldsig:Signature" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XSD SUPPORT FILE:
URI="file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xsd/PeticionPagos.xsd"
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xmldsig="http://www.w3.org/2000/09/xmldsig#"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
<xs:schema xmlns:xmldsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-->
<!-- Elementos Referenciados -->
<xs:element name="Peticion">
<xs:complexType>
<xs:sequence>
<xs:element ref="NumOperacion"/>
<xs:element ref="NifAyuntamiento"/>
<xs:element ref="FechaTransaccion"/>
<xs:element ref="CanalPago"/>
<xs:element ref="InfoCertificado"/>
<xs:element ref="InfoCuenta"/>
<xs:element ref="EntidadReceptora"/>
<xs:element ref="Emisor"/>
</xs:sequence>
<xs:attribute name="Id" type="tipo_id" use="required"/>
<xs:attribute name="Version" type="tipo_version" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="NumOperacion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NifAyuntamiento">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="9"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="FechaTransaccion">
<xs:complexType>
<xs:sequence>
<xs:element ref="DiaTransaccion"/>
<xs:element ref="HoraTransaccion"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DiaTransaccion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,8}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="HoraTransaccion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,4}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CanalPago">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="1"/>
<xs:enumeration value="2"/>
<xs:enumeration value="3"/>
<xs:enumeration value="4"/>
<xs:enumeration value="5"/>
<xs:enumeration value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="InfoCertificado">
<xs:complexType>
<xs:sequence>
<xs:element ref="NombreCertificado"/>
<xs:element ref="NifCertificado"/>
<xs:element ref="NumeroSerieCertificado"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NombreCertificado">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="70"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NifCertificado">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NumeroSerieCertificado">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="8"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="InfoCuenta">
<xs:complexType>
<xs:sequence>
<xs:element ref="Entidad"/>
<xs:element ref="Sucursal"/>
<xs:element ref="DC"/>
<xs:element ref="Cuenta"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Entidad">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Sucursal">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DC">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Cuenta">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,10}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EntidadReceptora">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Emisor">
<xs:complexType>
<xs:sequence>
<xs:element ref="NumEmisor"/>
<xs:element ref="Identificador"/>
<xs:element ref="FechaControl"/>
<xs:element ref="DigitosControl"/>
<xs:element ref="ImporteCobro"/>
<xs:element ref="NIFCIFInteresado"/>
<xs:element ref="Gestor"/>
<xs:element ref="Datos"/>
<xs:element ref="Confirmacion" minOccurs="1" maxOccurs="4"/>
<xs:element ref="Recibo" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NumEmisor">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="28984.0"/>
<xs:enumeration value="28989.9"/>
<xs:enumeration value="28990.5"/>
<xs:enumeration value="28992.9"/>
<xs:enumeration value="28995.4"/>
<xs:enumeration value="28996.6"/>
<xs:enumeration value="28997.8"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Identificador">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="9"/>
<xs:maxLength value="17"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="FechaControl">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,8}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DigitosControl">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,2}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ImporteCobro">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,12}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NIFCIFInteresado">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="9"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Gestor">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Datos">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="11"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Confirmacion">
<xs:complexType>
<xs:sequence>
<xs:element ref="Etiqueta"/>
<xs:element ref="Informacion"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Etiqueta">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Informacion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="50"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Recibo">
<xs:complexType>
<xs:sequence>
<xs:element ref="AnioyTipoPres"/>
<xs:element ref="Concepto"/>
<xs:element ref="DatosRecibo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AnioyTipoPres">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Concepto">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="7"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DatosRecibo">
<xs:complexType>
<xs:sequence>
<xs:element name="Linea1" type="linearecibo"/>
<xs:element name="Linea2" type="linearecibo"/>
<xs:element name="Linea3" type="linearecibo"/>
<xs:element name="Linea4" type="linearecibo"/>
<xs:element name="Linea5" type="linearecibo"/>
<xs:element name="Linea6" type="linearecibo"/>
<xs:element name="Linea7" type="linearecibo"/>
<xs:element name="Linea8" type="linearecibo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="linearecibo">
<xs:restriction base="xs:string">
<xs:maxLength value="80"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="tipo_id">
<xs:restriction base="xs:string">
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="tipo_version">
<xs:restriction base="xs:string">
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
And if I change the import line at the MAIN XSD file from this:
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#"/>
...to this
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#
http://www.w3.org/TR/2002/REC-xmldsig-c ... schema.xsd"/>
then I get this another error message:
src-resolve.4.2: Error resolving component 'xmldsig:Signature'. It was detected that 'xmldsig:Signature' is in namespace 'http://www.w3.org/2000/09/xmldsig#', but components from this namespace are not referenceable from schema document 'file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xsd/PeticionPagosFirma.xsd'. If this is the incorrect namespace, perhaps the prefix of 'xmldsig:Signature' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xsd/PeticionPagosFirma.xsd'.
It seems that the first error is because it does not find the Signature element, but when you provide it with the xsd then it said that it cannot be referenced from the MAIN XSD file.
Im using the last Xerces libraries and I just cannot get any idea to solve it.
Anyone can help me?
Thanks in advance.
Ivan Poza.
Lately I have been going through differents problems while trying to validate a XML along with a XSD schema.
The message in the subjetc: Cannot resolve the name 'xmldsig:Signature' to a(n) 'element, is produced by the next code:
XML FILE
URI="file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xml/PeticionFirmada.xml"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PeticionFirmada xmlns="https://www.munimadrid.es/Pagos">
<Peticion Id="12345" Version="1.0">
<NumOperacion>1111</NumOperacion>
<NifAyuntamiento>50200203</NifAyuntamiento>
<FechaTransaccion>
<DiaTransaccion>05052005</DiaTransaccion>
<HoraTransaccion>1245</HoraTransaccion>
</FechaTransaccion>
<CanalPago>1</CanalPago>
<InfoCertificado>
<NombreCertificado>César Fernández</NombreCertificado>
<NifCertificado>50200203</NifCertificado>
<NumeroSerieCertificado>123456879</NumeroSerieCertificado>
</InfoCertificado>
<InfoCuenta>
<Entidad>1234</Entidad>
<Sucursal>1234568790</Sucursal>
<DC>12</DC>
<Cuenta>1234</Cuenta>
</InfoCuenta>
<EntidadReceptora>2038</EntidadReceptora>
<Emisor>
<NumEmisor>28984.0</NumEmisor>
<Identificador>12345</Identificador>
<FechaControl>05052005</FechaControl>
<DigitosControl>12</DigitosControl>
<ImporteCobro>0000000010</ImporteCobro>
<NIFCIFInteresado>12345678F</NIFCIFInteresado>
<Confirmacion>
<Etiqueta>Marca y modelo
</Etiqueta>
<Etiqueta>Matricula
</Etiqueta>
<Informacion>OPEN CALIBRA
</Informacion>
<Informacion>M-9900-GM
</Informacion>
</Confirmacion>
<Recibo>
<AnioyTipoPres>54321</AnioyTipoPres>
<Concepto>7654321</Concepto>
<DatosRecibo>
<Linea1>linea 1</Linea1>
<Linea2>linea 2</Linea2>
<Linea3>linea 3</Linea3>
<Linea4>linea 4</Linea4>
<Linea5>linea 5</Linea5>
<Linea6>linea 6</Linea6>
<Linea7>linea 7</Linea7>
<Linea8>linea 8</Linea8>
</DatosRecibo>
</Recibo>
</Emisor>
</Peticion>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#12345">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>TRvw0HxqIAPNfRA/comKXO0w9l8=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
rDM8lP5IxIoEAIcsVcfBJXb+FcKYeGHAkS5S9yeLHNjZ45JtIrYbIvhp2YNqn+sTB0+MScVHe2HW
jVv9wrEGqIBpnP1zzzLxJrxrEqOP/AxlDGeYPsydOUudnuBOWaC4wKd0sFfIgzrmq7dNKunB0eoK
RvvEbweCT3NiyIHO1j8=
</ds:SignatureValue>
<ds:KeyInfo>
<ds:X509Data>
<ds:X509Certificate>
MIID4zCCA0ygAwIBAgIEPHR4dTANBgkqhkiG9w0BAQUFADA2MQswCQYDVQQGEwJFUzENMAsGA1UE
ChMERk5NVDEYMBYGA1UECxMPRk5NVCBDbGFzZSAyIENBMB4XDTAzMTEwNzEyNDQ1NloXDTA1MTEw
NzEzMTQ1NlowgbgxCzAJBgNVBAYTAkVTMQ0wCwYDVQQKEwRGTk1UMRgwFgYDVQQLEw9GTk1UIENs
YXNlIDIgQ0ExETAPBgNVBAsTCFB1YmxpY29zMRIwEAYDVQQLEwk1MDAwNzAwMTUxWTBXBgNVBAMT
UERFU0NSSVBDSU9OIE1VTklNQURSSUQgLSBFTlRJREFEIENFTlRSTyBNVU5JQ0lQQUwgREUgSU5G
T1JNQVRJQ0EgLSBDSUYgUDI4MDAwMzFDMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDsgqYX
9yqIPfGlgFbSR2eY28bpbeImdYGJVxhY78mdEcpAuVLL9P5RBj9L2snx3f6KyjBDOHsBRMI6qdCg
xJe3LZ6Ut6A6O6WBkNJffLwgjJy07hv5BLKLEIk4oxLkyWnBxeL2e5WJSgJ+9B/2K38WadkbauxP
ruI9kuPyqo99WwIDAQABo4IBeTCCAXUwCwYDVR0PBAQDAgeAMCsGA1UdEAQkMCKADzIwMDMxMTA3
MTI0NDU2WoEPMjAwNTExMDcxMzE0NTZaMBEGCWCGSAGG+EIBAQQEAwIEEDB+BgNVHREEdzB1pHMw
cTEYMBYGCSsGAQQBrGYBDxMJcDI4MDAwMzFjMS4wLAYJKwYBBAGsZgEOEx9jZW50cm8gbXVuaWNp
cGFsIGRlIGluZm9ybWF0aWNhMSUwIwYJKwYBBAGsZgEIExZkZXNjcmlwY2lvbiBtdW5pbWFkcmlk
MFsGA1UdHwRUMFIwUKBOoEykSjBIMQswCQYDVQQGEwJFUzENMAsGA1UEChMERk5NVDEYMBYGA1UE
CxMPRk5NVCBDbGFzZSAyIENBMRAwDgYDVQQDEwdDUkwxMDI3MB8GA1UdIwQYMBaAFECadkSXdAfE
rBTLHo1POkV8MNdhMB0GA1UdDgQWBBTBbxzf/1CxdWnqp3PKFC/jtCvByTAJBgNVHRMEAjAAMA0G
CSqGSIb3DQEBBQUAA4GBAFsrZeaxzv24tGSVwR3Y/1nimdiUnMWiV5vFK3Mzh8ukFelVTlXPSvqN
DHJvzG+JAMB1ZPevjq91kZqppoPZAFsEblAIsu5i3MUNRE4MsFUW4JSL6zoMhyfhkn1UdUe8Fntg
VHPLtJ9K1+9howV48sV1DDRnGUKx/Wv2ZtkuZpX3
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</ds:Signature>
</PeticionFirmada>
XSD MAIN FILE:
URI="file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xsd/PeticionPagosFirma.xsd"
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xmldsig="http://www.w3.org/2000/09/xmldsig#"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
<xs:schema xmlns:xmldsig="http://www.w3.org/2000/09/xmldsig#"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-->
<xs:include schemaLocation="file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xsd/PeticionPagos.xsd"/>
<!-- Otros schemas -->
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#"/>
<!-- Element -->
<xs:element name="PeticionFirmada">
<xs:complexType>
<xs:sequence>
<xs:element ref="Peticion"/>
<xs:element ref="xmldsig:Signature" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XSD SUPPORT FILE:
URI="file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xsd/PeticionPagos.xsd"
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xmldsig="http://www.w3.org/2000/09/xmldsig#"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<!--
<xs:schema xmlns:xmldsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
-->
<!-- Elementos Referenciados -->
<xs:element name="Peticion">
<xs:complexType>
<xs:sequence>
<xs:element ref="NumOperacion"/>
<xs:element ref="NifAyuntamiento"/>
<xs:element ref="FechaTransaccion"/>
<xs:element ref="CanalPago"/>
<xs:element ref="InfoCertificado"/>
<xs:element ref="InfoCuenta"/>
<xs:element ref="EntidadReceptora"/>
<xs:element ref="Emisor"/>
</xs:sequence>
<xs:attribute name="Id" type="tipo_id" use="required"/>
<xs:attribute name="Version" type="tipo_version" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="NumOperacion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NifAyuntamiento">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="9"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="FechaTransaccion">
<xs:complexType>
<xs:sequence>
<xs:element ref="DiaTransaccion"/>
<xs:element ref="HoraTransaccion"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DiaTransaccion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,8}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="HoraTransaccion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,4}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="CanalPago">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="1"/>
<xs:enumeration value="2"/>
<xs:enumeration value="3"/>
<xs:enumeration value="4"/>
<xs:enumeration value="5"/>
<xs:enumeration value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="InfoCertificado">
<xs:complexType>
<xs:sequence>
<xs:element ref="NombreCertificado"/>
<xs:element ref="NifCertificado"/>
<xs:element ref="NumeroSerieCertificado"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NombreCertificado">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="70"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NifCertificado">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NumeroSerieCertificado">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="8"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="InfoCuenta">
<xs:complexType>
<xs:sequence>
<xs:element ref="Entidad"/>
<xs:element ref="Sucursal"/>
<xs:element ref="DC"/>
<xs:element ref="Cuenta"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Entidad">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Sucursal">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DC">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Cuenta">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,10}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="EntidadReceptora">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="4"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Emisor">
<xs:complexType>
<xs:sequence>
<xs:element ref="NumEmisor"/>
<xs:element ref="Identificador"/>
<xs:element ref="FechaControl"/>
<xs:element ref="DigitosControl"/>
<xs:element ref="ImporteCobro"/>
<xs:element ref="NIFCIFInteresado"/>
<xs:element ref="Gestor"/>
<xs:element ref="Datos"/>
<xs:element ref="Confirmacion" minOccurs="1" maxOccurs="4"/>
<xs:element ref="Recibo" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NumEmisor">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="28984.0"/>
<xs:enumeration value="28989.9"/>
<xs:enumeration value="28990.5"/>
<xs:enumeration value="28992.9"/>
<xs:enumeration value="28995.4"/>
<xs:enumeration value="28996.6"/>
<xs:enumeration value="28997.8"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Identificador">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="9"/>
<xs:maxLength value="17"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="FechaControl">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,8}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DigitosControl">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,2}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="ImporteCobro">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{1,12}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="NIFCIFInteresado">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="9"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Gestor">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Datos">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="11"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Confirmacion">
<xs:complexType>
<xs:sequence>
<xs:element ref="Etiqueta"/>
<xs:element ref="Informacion"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Etiqueta">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="20"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Informacion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="50"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Recibo">
<xs:complexType>
<xs:sequence>
<xs:element ref="AnioyTipoPres"/>
<xs:element ref="Concepto"/>
<xs:element ref="DatosRecibo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AnioyTipoPres">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Concepto">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="7"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="DatosRecibo">
<xs:complexType>
<xs:sequence>
<xs:element name="Linea1" type="linearecibo"/>
<xs:element name="Linea2" type="linearecibo"/>
<xs:element name="Linea3" type="linearecibo"/>
<xs:element name="Linea4" type="linearecibo"/>
<xs:element name="Linea5" type="linearecibo"/>
<xs:element name="Linea6" type="linearecibo"/>
<xs:element name="Linea7" type="linearecibo"/>
<xs:element name="Linea8" type="linearecibo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="linearecibo">
<xs:restriction base="xs:string">
<xs:maxLength value="80"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="tipo_id">
<xs:restriction base="xs:string">
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="tipo_version">
<xs:restriction base="xs:string">
<xs:maxLength value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
And if I change the import line at the MAIN XSD file from this:
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#"/>
...to this
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#
http://www.w3.org/TR/2002/REC-xmldsig-c ... schema.xsd"/>
then I get this another error message:
src-resolve.4.2: Error resolving component 'xmldsig:Signature'. It was detected that 'xmldsig:Signature' is in namespace 'http://www.w3.org/2000/09/xmldsig#', but components from this namespace are not referenceable from schema document 'file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xsd/PeticionPagosFirma.xsd'. If this is the incorrect namespace, perhaps the prefix of 'xmldsig:Signature' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:///C:/Ivan/Programas/eclipse/workspace/TratamientoXML/xsd/PeticionPagosFirma.xsd'.
It seems that the first error is because it does not find the Signature element, but when you provide it with the xsd then it said that it cannot be referenced from the MAIN XSD file.
Im using the last Xerces libraries and I just cannot get any idea to solve it.
Anyone can help me?
Thanks in advance.
Ivan Poza.