Newbie questions...generating xml from schema & arrow keys

Having trouble installing Oxygen? Got a bug to report? Post it all here.
nigelj
Posts: 2
Joined: Wed Oct 29, 2008 11:22 am

Newbie questions...generating xml from schema & arrow keys

Post by nigelj »

Hi all,

Can I ask 3 [probably] simple questions...I am not an XML expert or at all familiar with Oxygen, so be gentle!...

1 - I have an xsd schema from which I need to generate an xml file with all the various tags, ready for me to populate (this is being used to submit data to a givernment organisation) When I've used the option in Tools menu to generate the xml from schema (various attempts using different options) each time some tags weren't included in the xml file. What options should I use to include all the tags?

2 - When completing an xml file with an associated xsd schema, where for certain tags there is a limited choice of defined options...is it possible to be able to display them to pick from a list? You can do this in XML spy and a free Microsoft xml editor for windows I used to use, but I haven't found how to do this with Oxygen.

3 - In the editor window, when I'm working on an xml file, the up and down arrows on the keyboard scroll the whole display...is there an option to just move the cursor to the next or previous line in the file? I've looked through the preferences but can't find one...probably have missed it!

Thanks for your help.

Nige
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Newbie questions...generating xml from schema & arrow keys

Post by sorin_ristache »

Hello,
nigelj wrote:1 - I have an xsd schema from which I need to generate an xml file with all the various tags, ready for me to populate (this is being used to submit data to a givernment organisation) When I've used the option in Tools menu to generate the xml from schema (various attempts using different options) each time some tags weren't included in the xml file. What options should I use to include all the tags?
If your XML Schema has xs:choice elements then only one of the elements referred inside the xs:choice will be generated in an XML instance of the schema because the generated XML instance must be a valid XML document. You can force always generating the first element of the xs:choice by selecting the value First instead of Random for the option Choice strategy.

Also if a type definition of the schema declares an optional element then that element is generated in XML instances only if the option Generate optional elements is selected in the dialog for generating XML instances.
nigelj wrote:2 - When completing an xml file with an associated xsd schema, where for certain tags there is a limited choice of defined options...is it possible to be able to display them to pick from a list?
The elements and attributes that can be inserted at the cursor position so that the current document remains valid are displayed in the content completion window. This is explained in the User Manual in a special section about content completion. Does content completion not work for your schema? Did you associate the schema with the edited XML document with one of the association methods available in Oxygen? The schema association is necessary for the content completion so that it knows where to find the elements and attributes that will be listed in the popup window.
nigelj wrote:3 - In the editor window, when I'm working on an xml file, the up and down arrows on the keyboard scroll the whole display...is there an option to just move the cursor to the next or previous line in the file? I've looked through the preferences but can't find one...probably have missed it!
This is a problem introduced by the Apple JVM version 1.5.0_16. We published on the Download page a new build of Oxygen 9.3 for Mac OS X that fixes the problem in the Oxygen code. Now there is a new version of Oxygen on the Download page (version 10.0) which of course includes the same fix.


Regards,
Sorin
nigelj
Posts: 2
Joined: Wed Oct 29, 2008 11:22 am

Re: Newbie questions...generating xml from schema & arrow keys

Post by nigelj »

Many thanks Sorin.

I'll re-check what I'm doing now!

Nige
Post Reply