Merging Multiple xsd into Single File
Questions about XML that are not covered by the other forums should go here.
Merging Multiple xsd into Single File
Hi,
I'm trying to merge two schemas into a single file. I have the following code, which I have taken as a basis to get started:
However I get the following error message in <oXygen/> XML editor:
Thanks
I'm trying to merge two schemas into a single file. I have the following code, which I have taken as a basis to get started:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:resourcedata type="acquisition">
<xs:details>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="resource">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:long" name="identifier"/>
<xs:element type="xs:string" name="requestedby"/>
<xs:element type="xs:string" name="product"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</xs:details>
</xs:resourcedata>
<xs:resourcedata type="warningletter">
<xs:details>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="resource">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:long" name="identifier"/>
<xs:element type="xs:string" name="email"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</xs:details>
</xs:resourcedata>
</xs:schema>
I can see resourcedata appears too often but I'm not sure how I correct this to allow multiple schemas in a single file.Engine name: Xerces
Severity: error
Description: s4s-elt-invalid-content.1: The content of 'schema' is invalid. Element 'resourcedata' is invalid, misplaced, or occurs too often.
Thanks
Re: Merging Multiple xsd into Single File
Hi,
The XML Schema vocabulary specification:
https://www.w3.org/TR/xmlschema-1/
defines a set of schema element names. You are using tags like xs:resourcedata or xs:details which are not part of the XML Schema specification.
Maybe you should try to google and read an XML Schema tutorial, just to understand what a schema is and how multiple schemas can be combined.
Regards,
Radu
The XML Schema vocabulary specification:
https://www.w3.org/TR/xmlschema-1/
defines a set of schema element names. You are using tags like xs:resourcedata or xs:details which are not part of the XML Schema specification.
Maybe you should try to google and read an XML Schema tutorial, just to understand what a schema is and how multiple schemas can be combined.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
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