[Mono-dev] Validate xml file with schema file

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Mon Nov 29 11:57:16 EST 2010


Ahh, ok. No worries then.

BTW I mistyped:  XDocument.Validate() is *now* implemented in git master ;)

Atsushi Eno

(2010/11/30 0:23), Chakotey STME wrote:
> Thats correct.
> The Mono analyzer says that it won't work.
> Sorry.
> Maybe I checked note the correct project with the mono analyzer.
>
> Thanks for your answer.
>
> chakoteystme
>
> 2010/11/29 Atsushi Eno<atsushieno at veritas-vos-liberabit.com>:
>> XDocument.Validate() is not implemented in git master.
>>
>> BTW I tried MoMA with a simple test code that uses XDocument.Validate()
>> against 2.6 profile, and it correctly reported 1 call to
>> NotImplementedException:
>> http://f.hatena.ne.jp/atsushieno/20101129214124
>> I wonder how you got such "OK" report from moma.
>>
>> Atsushi Eno
>>
>> (2010/11/29 19:17), Atsushi Eno wrote:
>>> You can't use moma report result to assume it *must* work if it does not
>>> report anything. It is explicitly stated on the first page when you ran
>>> moma:
>>> http://www.mono-project.com/Using_MoMA_Guide
>>>
>>> It won't report things that internally/indirectly use other types and/or
>>> members that throws NIE.
>>>
>>> Atsushi Eno
>>>
>>> (2010/11/29 18:55), Chakotey STME wrote:
>>>> Hi,
>>>>
>>>> I have a problem with this code under mono 2.6:
>>>>
>>>>           Dim xsdMarkup As XDocument =
>>>> XDocument.Load("/home/stefan/xml/PluginConfigSchema.xsd")
>>>>
>>>>
>>>>           Dim schemas As XmlSchemaSet = New XmlSchemaSet()
>>>>           schemas.Add("", xsdMarkup.CreateReader)
>>>>
>>>>           Dim doc1 As XDocument = XDocument.Load("/home/stefan/xml/Total
>>>> Processes.xml")
>>>>
>>>>           doc1.Validate(schemas, AddressOf XSDErrors)
>>>>
>>>>
>>>>       Private Sub XSDErrors(ByVal o As Object, ByVal e As
>>>> ValidationEventArgs)
>>>>           Console.WriteLine("{0}", e.Message)
>>>>           errors = True
>>>>       End Sub
>>>>
>>>> If I execute this program I get the following Exception:
>>>> Unhandled Exception: System.NotImplementedException: The requested
>>>> feature is not implemented.
>>>>     at XMLReader4.Module1.Main () [0x00000] in<filename unknown>:0
>>>>
>>>> But the mono migration analyzer says that this code is ok.
>>>>
>>>> So what can I do that this code works under mono 2.6?
>>>>
>>>> Thanks
>>>>
>>>> chakoteystme
>>>> _______________________________________________
>>>> Mono-devel-list mailing list
>>>> Mono-devel-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>
>>>
>>>
>>
>
>



More information about the Mono-devel-list mailing list