[Mono-bugs] [Bug 81129][Nor] New - XmlSchema:Duplicate id attribute (exception in mono - works in MS)

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Mar 13 00:51:59 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by mmorano at mikeandwan.us.

http://bugzilla.ximian.com/show_bug.cgi?id=81129

--- shadow/81129	2007-03-12 23:51:59.000000000 -0500
+++ shadow/81129.tmp.17327	2007-03-12 23:51:59.000000000 -0500
@@ -0,0 +1,107 @@
+Bug#: 81129
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: mmorano at mikeandwan.us               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: XmlSchema:Duplicate id attribute (exception in mono - works in MS)
+
+Description of Problem:
+Porting an application from MS to mono, and am running into an error when
+trying to add two different physical XSD documents to the list of schemas
+to be referenced by the parser.  The files start with the following lines:
+
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	   targetNamespace="http://www.molecular.com/molecular.config"
+	   xmlns="http://www.molecular.com/molecular.config"
+	   elementFormDefault="qualified"
+	   attributeFormDefault="unqualified"
+	   id="molecular">
+
+
+It complains that the "id" was already added, here is the stack trace:
+
+System.Reflection.TargetInvocationException: Exception has been thrown by
+the target of an invocation. ---> System.Xml.Schema.XmlSchemaException:
+XmlSchema error: Duplicate id attribute molecular Related schema item
+SourceUri:
+file:///home/mmorano/code/mikeandwan.us/src_www/config/molecular.config.types.xsd,
+Line 2, Position 2.
+  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.XmlSchemaUtil.CompileID (System.String id,
+System.Xml.Schema.XmlSchemaObject xso, System.Collections.Hashtable
+idCollection, System.Xml.Schema.ValidationEventHandler h) [0x00000] 
+  at System.Xml.Schema.XmlSchema.DoCompile
+(System.Xml.Schema.ValidationEventHandler handler,
+System.Collections.Hashtable handledUris, System.Xml.Schema.XmlSchemaSet
+col, System.Xml.XmlResolver resolver) [0x00000] 
+  at System.Xml.Schema.XmlSchema.CompileSubset
+(System.Xml.Schema.ValidationEventHandler handler,
+System.Xml.Schema.XmlSchemaSet col, System.Xml.XmlResolver resolver,
+System.Collections.Hashtable handledUris) [0x00000] 
+  at System.Xml.Schema.XmlSchemaSet.Compile () [0x00000] 
+  at System.Xml.Schema.XmlSchemaValidator.Initialize
+(System.Xml.Schema.XmlSchemaObject startType) [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.String url,
+System.Xml.XmlReaderSettings settings, System.Xml.XmlParserContext context)
+[0x00000] 
+  at System.Xml.XmlReader.Create (System.String url,
+System.Xml.XmlReaderSettings settings) [0x00000] 
+  at Molecular.Config.Sources.DefaultConfigSource.GetConfigReader
+(System.Xml.XmlReaderSettings settings) [0x00000] 
+  at Molecular.Config.Parsers.ConfigParser.Parse (IConfigSource source)
+[0x00000] 
+  at Molecular.Config.Parsers.ConfigParser.LoadConfiguration (IConfigSource
+source, IList`1 schemaSourceList) [0x00000] --- End of inner exception
+stack trace ---
+
+  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
+invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
+System.Globalization.CultureInfo culture) [0x00000] 
+  at System.Reflection.MethodBase.Invoke (System.Object obj,
+System.Object[] parameters) [0x00000] 
+  at System.Web.HttpApplicationFactory.FireEvent (System.String
+method_name, System.Object target, System.Object[] args) [0x00000] 
+  at System.Web.HttpApplicationFactory.FireOnAppStart
+(System.Web.HttpContext context) [0x00000] 
+  at System.Web.HttpApplicationFactory.GetApplication
+(System.Web.HttpContext context) [0x00000] 
+  at System.Web.HttpRuntime.RealProcessRequest (System.Object o) [0x00000] 
+
+
+This is currently working unmodified on MS.Net.
+
+Thanks,
+Mike


More information about the mono-bugs mailing list