Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 8th, 2009, 09:07 AM
Registered User
 
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default using 2 xsi:schemaLocation and getting No matching global element declaration availab

I am sure is a no-brainer but I am new at XSLT. I just can get my XML to vaLidate against 2 namespaces; I might be missing somethig at the psgecfd:PrestadoresDeServiciosDeCFD node!.

I have an XML with 2 xsi:schemaLocation and when validation againts the xsd I got the error:

Vs cfdv2.xsd:
Element '{http://www.sat.gob.mx/psgecfd}PrestadoresDeServiciosDeCFD': No matching global element declaration available, but demanded by the strict wildcard.

Vs psgecfd.xsd:
Element '{http://www.sat.gob.mx/cfd/2}Comprobante': No matching global declaration available for the validation root.

Below is my XML (line-feed added for redeability):

HTML Code:
HTML Code:
<?xml version="1.0" encoding="UTF-8"?>
<Comprobante 
	xmlns="http://www.sat.gob.mx/cfd/2" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:psgecfd="http://www.sat.gob.mx/psgecfd" 
	xsi:schemaLocation="
		http://www.sat.gob.mx/cfd/2 
		http://www.sat.gob.mx/sitio_internet/cfd/2/cfdv2.xsd 
		http://www.sat.gob.mx/psgecfd 
		http://www.sat.gob.mx/sitio_internet/cfd/psgecfd/psgecfd.xsd" 
	version="2.0" 
	serie="A" 
	folio="1" 
	fecha="2009-10-05T21:21:01-06:00" 
	sello="SDI54eGUxAguVKmAOJLdbLjq9duhViBQLO6FTRiNRdesC/vNfkuBIxa1dKt8xRbBtXYbjhs8CklbgW2tqUdFHg86ethlnhOgJXAB40qokFSviWHwBEIA8TMfUb7bDywbR+F3ZKKixMFCMzj/A98SEcV5Rq9piEUjjzqp9mdeijs=" 
	noAprobacion="1" 
	anoAprobacion="2004" 
	formaDePago="Pago de Contado" 
	noCertificado="00001000000000000114" 
	subTotal="350.00" 
	total="402.50" 
	tipoDeComprobante="ingreso">
  <Emisor rfc="ISP900909Q88" nombre="Industrias del Sur Poniente, S.A. de C.V.">
    <DomicilioFiscal calle="Alvaro Obregón" noExterior="37" noInterior="3" colonia="Col. Roma Norte" localidad="México" municipio="Cuauhtémoc" estado="Distrito Federal" pais="México" codigoPostal="06700"/>
    <ExpedidoEn calle="Pino Suarez" noExterior="23" localidad="Monterrey" municipio="Monterrey" estado="Nuevo Léon" pais="México" codigoPostal="95460"/>
  </Emisor>
  <Receptor rfc="CAUR390312S87" nombre="Rosa María Calderón Uriegas">
    <Domicilio calle="Topochico" noExterior="52" colonia="Jardines del Valle" localidad="Monterrey" municipio="Monterrey" estado="Nuevo Léon" pais="México" codigoPostal="95465"/>
  </Receptor>
  <Conceptos>
    <Concepto cantidad="10" descripcion="Vasos decorados" valorUnitario="20.00" importe="200.00"/>
    <Concepto cantidad="1" descripcion="Charola metálica" valorUnitario="150.00" importe="150.00"/>
  </Conceptos>
  <Impuestos>
    <Traslados>
      <Traslado impuesto="IVA" tasa="15.00" importe="52.5"/>
    </Traslados>
  </Impuestos>
  <Complemento>
    <psgecfd:PrestadoresDeServiciosDeCFD 
		nombre="Servicios Digitales Baja, S.A. de C.V." 
		rfc="MOCE671020I57" 
		noCertificado="01234567890123456789" 
		fechaAutorizacion="2009-10-20T16:30:00" 
		noAutorizacion="9999" 
		selloDelPSGECFD="SGIO5WMRD7I+h1972L4nUugxts8APBNC7lrewbNMm7ppfb6kOx+yuMekzlClCihjU+hvd1YIL+dO89j4L9L7+Dpyo2SpU1WfOVqByWz5MsXxEhMnmBlZOWwsh7srkzLOuz1UgUmmnGkhCegMZghJ6SC9CYgsG9ylp/Lri2E6bHc="/>
  </Complemento>
</Comprobante>
 
Old October 9th, 2009, 07:28 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

This forum is about XSLT. Your question mentions XSLT but the problem seems to be related to validation, not to XSLT.
You might want to try the XML forum instead or maybe even a forum dedicated to the XML parser or editor you use to try to validate that XML document you have posted. It looks to me as if the parser or editor or tool you use tries to validate the document but ignores the schemaLocation hint. So you will need to find out how to configure your parser (editor/tool) to use the schemas specified in the schemaLocation attribute.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog





Similar Threads
Thread Thread Starter Forum Replies Last Post
schemaLocation vs nonamespaceschema... newbieboobers XML 0 August 28th, 2008 11:30 AM
problem with xsi:SchemaLocation akshay144 XML 2 August 20th, 2008 05:40 AM
Global declaration of a class object nrlahoti ASP.NET 2.0 Professional 5 October 14th, 2007 01:21 PM
missing schemalocation in output XML matrixman XSLT 7 May 4th, 2007 07:55 AM
copy-of xsi namespace chris_strub XSLT 2 October 2nd, 2004 10:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.