• Lunes 23 de Diciembre de 2024, 02:39

Autor Tema:  Validacion de un XML con respecto a un XSD  (Leído 790 veces)

MiguelAngelMtz

  • Nuevo Miembro
  • *
  • Mensajes: 2
  • Nacionalidad: mx
    • Ver Perfil
Validacion de un XML con respecto a un XSD
« en: Lunes 1 de Junio de 2009, 19:37 »
0
Hola, antes ke nada resiban un cardial saludo..

Soy nuevo en desarrollar en C# en el editor de MonoDevelop y tengo que hacer la validacion de un archivo XML con respecto a un archivo XSD, y los archivos xsd manejan herencia a otros xsd, pero en la plataforma de Windows si funciona muy bien con SharpDevelop y el Linux “UBUNTU 9.4”  NO, al hacer la validacion me manda los siguienetes excepciones:


Unhandled Exception: System.Xml.Schema.XmlSchemaException: XmlSchema error: Specified derivation is specified as final by derived schema type. Related schema item SourceUri: ../../archivo.xsd, Line 102, Position 3.
  at System.Xml.Schema.ValidationHandler.RaiseValidationEvent (System.Xml.Schema.ValidationEventHandler handle, System.Exception innerException, System.String message, System.Xml.Schema.XmlSchemaObject xsobj, System.Object sender, System.String sourceUri, XmlSeverityType severity) [0x00000]
  at System.Xml.Schema.XmlSchemaObject.error (System.Xml.Schema.ValidationEventHandler handle, System.String message, System.Exception innerException, System.Xml.Schema.XmlSchemaObject xsobj, System.Object sender) [0x00000]
  at System.Xml.Schema.XmlSchemaObject.error (System.Xml.Schema.ValidationEventHandler handle, System.String message) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexType.ValidateContentModel (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexType.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaElement.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaSequence.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexType.ValidateContentFirstPass (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexType.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaElement.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaSequence.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexContentExtension.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexContent.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexType.ValidateContentFirstPass (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexType.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaElement.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaSequence.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexContentExtension.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexContent.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexType.ValidateContentFirstPass (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchemaComplexType.Validate (System.Xml.Schema.ValidationEventHandler h, System.Xml.Schema.XmlSchema schema) [0x00000]
  at System.Xml.Schema.XmlSchema.Validate (System.Xml.Schema.ValidationEventHandler handler) [0x00000]
  at System.Xml.Schema.XmlSchemaSet.Compile () [0x00000]
  at System.Xml.Schema.XmlSchemaValidator.Initialize () [0x00000]
  at Mono.Xml.Schema.XmlSchemaValidatingReader..ctor (System.Xml.XmlReader reader, System.Xml.XmlReaderSettings settings) [0x00000]
  at System.Xml.XmlReader.CreateValidatingXmlReader (System.Xml.XmlReader reader, System.Xml.XmlReaderSettings settings) [0x00000]
  at System.Xml.XmlReader.CreateFilteredXmlReader (System.Xml.XmlReader reader, System.Xml.XmlReaderSettings settings) [0x00000]
  at System.Xml.XmlReader.CreateCustomizedTextReader (System.Xml.XmlTextReader reader, System.Xml.XmlReaderSettings settings) [0x00000]
  at System.Xml.XmlReader.Create (System.IO.TextReader reader, System.Xml.XmlReaderSettings settings, System.Xml.XmlParserContext context) [0x00000]
  at System.Xml.XmlReader.Create (System.IO.TextReader reader, System.Xml.XmlReaderSettings settings, System.String baseUri) [0x00000]
  at System.Xml.XmlReader.Create (System.IO.TextReader reader, System.Xml.XmlReaderSettings settings) [0x00000]
  at LibOpenSCLUI.DocSchemaValidator.ValidateAgainstSchema (System.String xmldoc, System.String schemaFile) [0x00000]
  at LibOpenSCLUI.openDialog.sendFile (System.String NameFileXML) [0x00000]
  at LibOpenSCLUI.openDialog.openDialogs () [0x00000]
  at OpenSCLConfigurator.FormSCL.ValidateFileClick (System.Object sender, System.EventArgs e) [0x0001c] in /home/miguel/Escritorio/OpenSCLConfigurator/OpenSCLConfigurator.cs:342
  at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) [0x00000]
  at System.Windows.Forms.ToolStripMenuItem.OnClick (System.EventArgs e) [0x00000]
  at System.Windows.Forms.ToolStripMenuItem.HandleClick (System.EventArgs e) [0x00000]
  at System.Windows.Forms.ToolStripItem.FireEvent (System.EventArgs e, ToolStripItemEventType met) [0x00000]
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.ToolStripItem:FireEvent (System.EventArgs,System.Windows.Forms.ToolStripItemEventType)
  at System.Windows.Forms.ToolStrip.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) [0x00000]
  at System.Windows.Forms.ToolStripDropDown.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) [0x00000]
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.ToolStripDropDown.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x00000]
  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg, IntPtr wParam, IntPtr lParam) [0x00000]
  at System.Windows.Forms.XplatUIX11.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000]
  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG& msg) [0x00000]
  at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000]
  at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000]
  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000]
  at OpenSCLConfigurator.MainForm.Main () [0x00000] in /home/miguel/Escritorio/OpenSCLConfigurator/OpenSCLConfigurator.Designer.cs:32



espero me puedan ayudar a corregir estos errores..
de antemano mil gracias