[xsd-users] Re: Help me: VC pro and VC express generate different
jxmei3 at gmail.com
Fri Oct 16 22:33:33 EDT 2009
Please find the VC project/source attached with all schema files.
The Program compiled with VC++ Pro 2008 will generates extra attributes "ix"
and "sGroup". If the same source is compiled with VC++ express 2008, ix and
sGroup will not be there.
Please use the file "1" as the source xml file. (use run.bat)
BTW, ix is an optional attribute, but sGroup is not. It does not exist in
the schema. Intially I though it was "SettingGroups" attribute, but the
element name does not match. I am not sure where "sGroup" comes from.
Could you take a look what did I set wrong here ?
On Sat, Oct 17, 2009 at 8:10 AM, James Mei <jxmei3 at gmail.com> wrote:
> Hi Boris
> I just found out that ix and sGroup is part of the schema as optional
> The strange part for VC++ express and VC++ Pro 2008 is that:
> Same source code but one compiler program produces those attributes (VC++
> pro) and one does not (VC++ express). BTW, the original xml file does not
> have those attributes.
> I also found out that the strange number at the back ix="3452816845", is
> the actual pointer value of the attribute.
> Any idea ?
> int _tmain(int argc, _TCHAR* argv)
> using namespace SC_SCL;
> auto_ptr<SCL> h (SCL_ (argv, xml_schema::flags::dont_validate));
> ofstream outfile(argv, ios::out);
> SCL_(outfile, *h);
> catch (const xml_schema::exception& e)
> cerr << e << endl;
> return 1;
> Also notice the constructor of the xsd class (SCL) does not take wchar_t*
> as input filename. It has to be char *. Is there anyway to make it unicode
> compatible ?
> On Fri, Oct 16, 2009 at 5:03 PM, James Mei <jxmei3 at gmail.com> wrote:
>> Hi Boris
>>> > ix="3452816845", sGroup="3452816845" are not part of the schema and do
>>> > not exist in the program output generated by vc express 2008.
>>> They are part of the schema.
>> If it is part of the schema, then VC express should generate this entries
>> as well. But it has no where exists in the xsd file.
>>> > Also, the decimal value of 3452816845 is HEX 0xCDCDCDCD, does it mean
>>> > anything ?
>>> It is most likely garbage. I suspect that you are trying this with XSD
>>> source code that you have modified. Can you try it on the standard XSD
>>> distribution without any modifications? Double check that the include
>>> paths in VC++ point to the unmodified libxsd.
>> I have now regenerated the source file, but the same thing happened.
>> However, the program compiled with BCB2009 produces one sGroup attribute in
>> one of the TAG. None exist in the program compiled by VC express 2008. Lots
>> of those ix, sGroup entries in the program compiled by VC pro.
>> Any idea ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VC++ Project.zip
Size: 35270 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20091017/c00902c1/VCProject-0001.zip
More information about the xsd-users