Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Xsd.exe errors?

  1. #1
    Junior Member
    Join Date
    Sep 2006
    Posts
    2

    Xsd.exe errors?

    Hi,
    I'm new to Collada so I decided to start it easy and try to generate classes from the COLLADASchema_141.xsd. When I run it on the commandline I get following error.

    Code :
    xsd /classes /language:CS COLLADASchema_141.xsd
    Microsoft (R) Xml Schemas/DataTypes support utility
    [Microsoft (R) .NET Framework, Version 2.0.50727.42]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Error: Error generating classes for schema 'COLLADASchema_141'.
      - Group 'glsl_param_type' from targetNamespace='http://www.collada.org/2005/11
    /COLLADASchema' has invalid definition: Circular group reference.
     
    If you would like more help, please type "xsd /?".

    Is this bug in the schema or in the xsd.exe tool?

    I also tried to generate dataset from it using the same commandline tool but I get following error:

    Code :
    xsd /d /language:CS COLLADASchema_141.xsd
    Microsoft (R) Xml Schemas/DataTypes support utility
    [Microsoft (R) .NET Framework, Version 2.0.50727.42]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Writing file 'COLLADASchema_141.cs'.
    Error: There was an error processing 'COLLADASchema_141.xsd'.
      - Error generating code for DataSet ''.
      - Unable to convert input xml file content to a DataSet. The 'http://www.w3.or
    g/XML/1998/namespace:base' attribute is not declared.
      - The 'http://www.w3.org/XML/1998/namespace:base' attribute is not declared.
     
    If you would like more help, please type "xsd /?".

    So no luck with it either. If anyone could point me to the right directions with this?

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    which version of Visual Studio you are using ?
    The 2003 version has several bugs, it should have need fixed in 2005.

  3. #3
    Junior Member
    Join Date
    Sep 2006
    Posts
    2
    I'am using Visual Studio 2005 Professional version.

    The Xsd.exe which I tried to use is located at C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\xsd.exe. I could not locate a duplicate of the utility in my system so it should be the newest one.

    I did manage to create a data classes by using XMLSpy but it adds it's own framework to the mix which I don't want. Anyone has a code tempelate avaible for it which uses generic .NET xml nodes or other less intrusive classes?

  4. #4
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    Can you report this bug to Microsoft please ?

  5. #5
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: Xsd.exe errors?

    Quote Originally Posted by pekkah
    Code :
    xsd /d /language:CS COLLADASchema_141.xsd
    Microsoft (R) Xml Schemas/DataTypes support utility
    [Microsoft (R) .NET Framework, Version 2.0.50727.42]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Writing file 'COLLADASchema_141.cs'.
    Error: There was an error processing 'COLLADASchema_141.xsd'.
      - Error generating code for DataSet ''.
      - Unable to convert input xml file content to a DataSet. The 'http://www.w3.or
    g/XML/1998/namespace:base' attribute is not declared.
      - The 'http://www.w3.org/XML/1998/namespace:base' attribute is not declared.
     
    If you would like more help, please type "xsd /?".
    Can you make sure that the <xs:import> that supplies the xml:base declaration is not commented out? Since the error message includes the whole namespace for "base" it seems like it is being parsed but then it looks like the import directive may not be supported in VS8 completely?

  6. #6
    Junior Member
    Join Date
    Sep 2006
    Posts
    3
    marcus, you are using the xsd.exe from the vs2003. The error we are talking is in vs2005. I've managed to convert to C# classes after I commented out the GLSL part, the CG part and the GLES part(this one because of the GLSL). There are only 2 errors, which are similar, one is in GLSL and one in CG, they are related to groups glsl_param_type and cg_param_type and the error is the same : circular group reference.

  7. #7
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771
    Quote Originally Posted by meeshoo
    marcus, you are using the xsd.exe from the vs2003. The error we are talking is in vs2005.
    Actually I have access to both versions. The error message quoted is not from me.

    This bug needs to be posted to www.khronos.org/bugzilla I think.

  8. #8
    Senior Member
    Join Date
    Aug 2005
    Location
    California
    Posts
    165
    The bug isn't in the schema. The XML Schema language allows for circular references and we use them in the effects parameters. The problem is that MSXML doesn't allow for that.

    When I was working on 1.4 support for the DOM the circular references were a problem but I created a way to handle them properly. It's not impossible and not incorrect. Just MS must think it's not something that should be done.

    I'm not sure that we can fix this in the schema either. Some of it might be pretty essential and logical to be circular. The circular reference is as follows:
    The glsl_param_type and cg_param_type can have a <surface>. This <surface> can have a program to procedurally generate itself described by <generator>. <generator>, since it is a program, can have parameters that need to be set. These parameters are set using <setparam> which contains a glsl_param_type.

    That makes plenty of sense to me. You may think that we can limit the type of parameters <generator> can take, thus removing <surface> and the circular dependency but I think that generating a surface based on a different surface as a parameter could be useful. Sure nobody is doing it now with COLLADA but thats not our fault

    -Andy

  9. #9
    Senior Member
    Join Date
    Aug 2005
    Location
    California
    Posts
    165
    We may be able to "hack" a solution together using substitution instead of groups. It might allow backwards compatibility with regards to validating instance documents, but any application based on classes generated from the schema, ie COLLADA DOM, would not be backwards compatible. And personaly I really wouldn't want to work on trying to make the DOM backwards compatible with a change like that.

    -Andy

  10. #10
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    Can someone report this bug to Microsoft ?
    Please!

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •