generating xml from schema

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
Posts: 3

generating xml from schema

Wed Jul 05, 2017 2:09 pm

I am new to oxygen and xml. I have 2 schemas in the same folder. One I was able to generate an xml for. But the second schema gives me the following error in the xml when I try to generate an xml from tools>generate sample xml content
Attribute "xmlns" bound to namespace "" was already specified for element "group". It doesn't matter what I specify I get an error. I also got an error for element / complexContent etc

The code at the beginning of my schema is below - Please advise - thanks
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="" elementFormDefault="qualified">
<xs:group name="article">
<xs:element name="article-area">
<xs:element name="concepts"/>
<xs:element name="constants"/>
<xs:element name="seasons"/>
<xs:element name="passages"/>
Posts: 456

Re: generating xml from schema

Wed Jul 05, 2017 4:20 pm

Hi Susan,

I've already replied to your email regarding this on the official support email.
However, I am posting my reply also here, in case there are other users who might need this information.

- We analyzed the sample XSD you provided and it seems that your schema does not have any global element defined in it and implicitly there is no element which could be set as root. It consists only of groups (<xs:group/>), but no global elements.
Indeed, the base (root) group in the schema is "article", but, in order to generate an XML instance out of the XML schema, you still need to define at least one element.
For example, you could refer the "article" group in a global element (like in the below example), which in turn would be referred as the root element in the "Schema" tab of the Generate Sample XML Files dialog.

Code: Select all

<xs:element name="root">
            <xs:group ref="article"></xs:group>

In case you still encounter an error with the other schema, in order to see what triggers it, please send us a screenshot depicting the error and even a sample file (you can send it on our support email) for which you encounter the issue.

Costin Sandoi
oXygen XML Editor and Author Support

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 4 guests