> From: ENRIQUE ARIZON BENITO
>To: generateds-users@lists.sourceforge.net 
>Sent: Monday, January 23, 2012 6:06 AM
> 
 > 
> Hello,
> 
> I just started to make my first test with generateDS.
> 
> I try to programatically create an xml file using a code like:
> 
> import sys
> import test 
> import upnp_device
> 
> DeviceTypeObj = test.DeviceType()
> DeviceTypeObj.set_DeviceDescription(upnp_device.deviceType())
> DeviceTypeObj.export(sys.stdout,1)
> 
> I was expecting a result similar to:
> 
>     <test:DeviceType>
>         <test:DeviceDescription>
>             <upnp_device:deviceType>
>                 ...
>             </upnp_device:deviceType>
>     </test:DeviceType>
> 
> But for now the output looks like:
> 
>     <test:DeviceType>
>         <test:DeviceDescription>
>             &lt;upnp_device.deviceType object at 0xb6d7b9cc&gt;
>         </alicante:DeviceDescription>
>     </test:DeviceType>
> 
Enrique -

Thanks for alerting me about this.

That definitely looks like a bug.

I can't really test this because the schema you sent (test.xsd) has
imports that reference schemas that are on your machine.

However, looking at the schema you sent, I see that those imports
have a "namespace attribute, for example:

<import namespace="urn:schemas-upnp-org:device-1-0" 
schemaLocation="upnp-device.xsd" />

I don't believe that process_includes.py, which is used by
generateDS.py to pull in imports and includes, does anything with
that namespace attribute.  So, I'm guessing that this bug is somehow
related to that deficiency.  generateDS.py tries to provide some
minimal support for namespaces, but it really isn't smart enough to
handle this case.

Sorry that I can't be of more help with this.

- Dave



-- Dave Kuhlman
http://www.rexx.com/~dkuhlman

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to