XSD Schema to JSON Schema
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 1
- Joined: Thu Feb 03, 2022 7:51 am
XSD Schema to JSON Schema
Post by alexneblett »
Hi,
I am running up against:
Simple type "STATE_COUNTRY_CODE" was not mapped to Enum due to EnumMemberSizeCap limit. Facets count: 331, current limit: 256. You can use customization attribute "typesafeEnumMaxMembers" to extend the limit.
when trying to convert an xsd schema to a json schema using the xsd to json schema tool. What is the best way to get past it?
Cheers,
Alex
I am running up against:
Simple type "STATE_COUNTRY_CODE" was not mapped to Enum due to EnumMemberSizeCap limit. Facets count: 331, current limit: 256. You can use customization attribute "typesafeEnumMaxMembers" to extend the limit.
when trying to convert an xsd schema to a json schema using the xsd to json schema tool. What is the best way to get past it?
Cheers,
Alex
-
- Posts: 37
- Joined: Wed Sep 09, 2020 3:17 pm
Re: XSD Schema to JSON Schema
Post by florin_nica »
Hi Alex,
Thank you for your interest. It looks like your XSD contains a large enumeration, that exceeds the default limit of 256 elements. You can use the customization attribute typesafeEnumMaxMembers to extend this limit. For example, if you want to extend it to 1000, you need to add inside the XSD some JAXB specific bindings, that look like this:
You also need to add the attributes "xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.1" to the <schema> element, so that the jaxb prefix is recognized.
Regards,
Florin
Thank you for your interest. It looks like your XSD contains a large enumeration, that exceeds the default limit of 256 elements. You can use the customization attribute typesafeEnumMaxMembers to extend this limit. For example, if you want to extend it to 1000, you need to add inside the XSD some JAXB specific bindings, that look like this:
Code: Select all
<xs:annotation>
<xs:appinfo>
<jaxb:globalBindings typesafeEnumMaxMembers="1000" />
</xs:appinfo>
</xs:annotation>
Regards,
Florin
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