generating xml from schema
Having trouble installing Oxygen? Got a bug to report? Post it all here.
generating xml from schema
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 "http://www.w3.org/2000/xmlns/" 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="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:group name="article">
<xs:sequence>
<xs:element name="article-area">
<xs:complexType>
<xs:choice>
<xs:element name="concepts"/>
<xs:element name="constants"/>
<xs:element name="seasons"/>
<xs:element name="passages"/>
</xs:choice>
</xs:complexType>
Attribute "xmlns" bound to namespace "http://www.w3.org/2000/xmlns/" 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="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:group name="article">
<xs:sequence>
<xs:element name="article-area">
<xs:complexType>
<xs:choice>
<xs:element name="concepts"/>
<xs:element name="constants"/>
<xs:element name="seasons"/>
<xs:element name="passages"/>
</xs:choice>
</xs:complexType>
Re: generating xml from schema
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.
Regards,
Costin
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.
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.- 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:complexType>
<xs:group ref="article"></xs:group>
</xs:complexType>
</xs:element>
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service