MagicDraw 16.8 XML schema generation - XSDinclude problem

General discussions about code engineering

Moderator: Moderators

MagicDraw 16.8 XML schema generation - XSDinclude problem

Postby deckerbd » Tue Jun 15, 2010 11:29 am

I may be having a problem with XSDinclude processing or code engineering/generation in Magic Draw 16.8. I also have UPDM 16.8 SP1 installed but don't believe it pertinent to the XML Schema modeling capabilities.

I did not have the problem that I describe below with previous versions of MagicDraw. I've been able to open a XML project with different versions and check syntax and generate XSD files with no errors.

Under MD 16.8 / UPDM 16.8 SP1 when I open my project and check syntax or generate XSD files I now get errors about referenced types in an XSD file that has an XSDInclude directive to another schema in the same namespace.

Here is a synopsis:

- All files reside in the project directory for simplicity
- Two namespaces are in the project
- "http://some.other.com/namespace" contains a pre-defined types inside "ForeignSchema.xsd" - assume this was a library that I Reversed into my model from existing XSD files
- "http://company.com/system" is the namespace where I am working, and it contains two XSD files, NamespaceCommon.xsd and System.xsd
- NamespaceCommon.xsd defines three types "OneUsefulType, which is an enumeration, "ComplexUsefulType" which contains a string and an instance of OneUsefulType, and ComplexTypeWithExternals with includes an instance of a type referenced in a schema component of http://some.other.com/namespace
- System.xsd has an XSDinclude directive to NamespaceCommon.xsd and creates an AnonymousType that has Attributes that are of types from NamespaceCommon.xsd

All files checked and generated with no problems under prior versions of MD.

Now under 16.8 using my my Code Engineering Sets:
- for NamespaceCommon.xsd, Check Syntax operation is successful, and Generate operation produces correct NamespaceCommon.xsd file output in the correct directory.

When I check syntax or attempt to generate against System.xsd however, I get errors that types cannot be resolved:

Syntax checking was made on temporary file file:///C:/Data/Local/Modeling/MagicDraw/XMLTest%202010/MySubsystem/System.xsd.tmp
Model contains the following errors:
Error: 11:76: src-resolve: Cannot resolve the name 'my:ComplexUsefulType' to a(n) 'type definition' component.
Error: 12:69: src-resolve: Cannot resolve the name 'my:OneUsefulType' to a(n) 'type definition' component.

Like I said, I've never had these errors with previous versions of MD. So I'm curious if something is known to be problematic with XSDInclude directives or use of referenced files in this version. Or possibly the usage of XSDinclude inside the XML models has changed. I am interested in any information that may get me over this issue since I am at a dead stop right now with my project.

My model is attached. I will also submit this to support@magicdraw.com and attach the model .mdzip file for review.

Thank you!
Brian Decker

XMLTest 2010.zip
You do not have the required permissions to view the files attached to this post.
deckerbd
Forum Newbie
Forum Newbie
 
Posts: 20
Posts Rating:0
Joined: Tue Jun 15, 2010 10:50 am

Re: MagicDraw 16.8 XML schema generation - XSDinclude problem

Postby deckerbd » Thu Jun 17, 2010 8:47 am

Update via email today:

Thank you for the update and agreement that a problem exists. I'll be downloading the 16.9 Beta as soon as I can. Until then I'll continue my work in 16.8, turn off the Syntax Checking steps, and manually insert the "include" lines I need where I need them in the generated XSD files.

-----Original Message-----
From: MagicDraw Support Team [mailto:support@magicdraw.com]
Sent: Thursday, June 17, 2010 5:10 AM
To: Decker, Brian Cc: MagicDraw Support Team
Subject: Re: MagicDraw 16.8 XML schema generation - XSDinclude problem

Decker,

We have investigated this problem and reproduced it. Bug fix will be included in MagicDraw 16.9 beta.
Thank you for your report. Unfortunately, but workaround is not available - included component is omitted from code generation
set.

Best Regards,
--
Egidijus Vaisnora
No Magic Customer Support
Phone: +370 37 324032, Fax: +370 37 320670
WWW: https://support.nomagic.com
Email: support@nomagic.com
deckerbd
Forum Newbie
Forum Newbie
 
Posts: 20
Posts Rating:0
Joined: Tue Jun 15, 2010 10:50 am


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests

cron