Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-452

Problems With XML Schema to Instance Conversion Program

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • Version 2.5
    • unspecified
    • Tools
    • None
    • The problem is not platform specific and is reproducible on all environments

    Description

      We get Instance out of a Schema Element using the createSampleForType method of org.apache.xmlbeans.impl.xsd2inst.SampleXmlUtil.
      We have observed two problems
      1. This program does not give a complete instance. If the number of child elements in the instance is large(Running into Thousands) then this program gives a truncated instance.
      2. Elements in a XML Schema can have a "default" or "fixed" value. The instance generated by this program does not respect the "default" value as specified in the schema.

      We overcame these two problems by changing org.apache.xmlbeans.impl.xsd2inst.SampleXmlUtil and we want to share the patch with you. You can review it and use it if you feel it is correct.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            ssdwivedi Saurabh

            Dates

              Created:
              Updated:

              Slack

                Issue deployment