Can't expand elements inline in schema design view

This should cover W3C XML Schema, Relax NG and DTD related problems.
lemming
Posts: 2
Joined: Thu Jun 10, 2010 1:09 pm

Can't expand elements inline in schema design view

Post by lemming »

Hi all,

I'm a new user of Oxygen. One thing that's confusing me is when I'm viewing a schema in design mode I often can't expand elements inline and I'm not sure why. For example:

Image

Here order:Order is a complex type in the same schema - why can I not expand this inline?

Cheers,
Colin
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Can't expand elements inline in schema design view

Post by adrian »

Hello,

The only situation where this is known to happen is in a schema that uses components from another schema imported indirectly.
e.g.
a imports b imports c
a uses a complex type from c

This type of schema is valid in Oxygen only when the http://apache.org/xml/features/honour-a ... aLocations XML parser feature is enabled in Options -> Preferences -> XML -> XML Parser.

If you are encountering this issue in a completely different situation then please send a sample of your schema to support@oxygenxml.com for us to analyse.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
lemming
Posts: 2
Joined: Thu Jun 10, 2010 1:09 pm

Re: Can't expand elements inline in schema design view

Post by lemming »

Hi Adrian,

Thanks for the quick reply. No, in this case both types are in the same schema. I'll send a sample.

Cheers,
Colin
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Can't expand elements inline in schema design view

Post by adrian »

Hi,

In case others are wondering about what was happening...

This is indeed a bug in Oxygen's Schema Diagram(Design mode). It only collects namespace prefix declarations from the schema root and the mentioned schema does not declare the 'order' prefix on the root, it is only declared in the schema components that need it.
e.g.

Code: Select all

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="PlaceOrderRequest">
<xs:sequence>
<xs:element xmlns:order="http://my.ns" name="order" type="order:Order"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
I have added this problem to our issue tracking tool and we will fix it in a future version of Oxygen.

As a workaround for Oxygen the namespace prefix should also be declared on the root element and you will then be able to expand the components from that namespace.
e.g.

Code: Select all

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:order="http://my.ns">
<xs:complexType name="PlaceOrderRequest">
<xs:sequence>
<xs:element xmlns:order="http://my.ns" name="order" type="order:Order"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
rable2
Posts: 2
Joined: Thu Nov 30, 2017 5:42 pm

Re: Can't expand elements inline in schema design view

Post by rable2 »

This still appears to be an issue inversion 19.1 - is there any update on a fix?

I am working with schemas and a WSDL that are auto generated from a .NET web service, and these define many prefixes only at the element level. This makes for a lot of refactoring before the models display correctly in design mode.

Richard
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Can't expand elements inline in schema design view

Post by adrian »

Hi Richard,

I'm afraid not. This has not been fixed yet, as it seems to be a very rare occurrence. You are the first person to re-encounter this in 7 years.
I gave the issue a nudge and mentioned your comments. For future reference it is issue EXM-17828.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
rable2
Posts: 2
Joined: Thu Nov 30, 2017 5:42 pm

Re: Can't expand elements inline in schema design view

Post by rable2 »

Thanks for the update. Just for reference, a colleague uses an Altova alternative product, and that application throws a message about "re-writing the schema" (or some such) and this normalises the model in to one which is more generally accepted across multiple products.
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Can't expand elements inline in schema design view

Post by adrian »

Thank you for the feedback. I've mentioned your comments on the logged issue.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply