xml:lang error

Nov 17, 2010 at 10:58 PM


First off, this is a brilliant tool. I can't believe that the VS xsd.exe doesn't do List<> instead of [] by default.

I'm having a problem processing the schema found here: http://ns.hr-xml.org/2_3/HR-XML-2_3/StandAlone/BackgroundCheck.xsd

xsd.exe handles it fine, but xsd2code gives me the error "The 'http://www.w3.org/XML/1998/namespace:lang' attribute is not declared" The offending lines appear to be a handful of attributes defined like this:

   <xsd:attribute ref="xml:lang" use="optional"></xsd:attribute>

If I remove these attributes, the schema processes just fine.


Nov 18, 2010 at 2:48 AM

Interesting. xsd.exe seems to have inside knowledge of that namespace and doesn't need to actually see the corresponding xsd. But this tool needs the xsd, and when I grabbed it from w3.org and saved it to the same directory as the base xsd I was working with, all was well.

Thanks again for this tool!