XML schema creation

I am having an issue where i am trying to create a xml schema from a xml and i am getting this error.

Could not create Schema
The DTD for this XML document could not be used.

The xml is well formed and valid (from xmlSpy) but when I select the file from the browse window i am getting this error.

Since you already using XML Spy, why not create an XSD instead of creating your schema from an XML instance document?

You can only create an IS schema from an XML document if that document references a DTD. You can also create IS schemas from XSD’s and DTD’s.

See the Developer User’s Guide “Creating and IS Schema” section for more details.

Mark

The xsd is the issue - we have an xsd we are running 6.1 and the xsd is valid but it has a choice branch. When we try to create a schema nothing happens (the progress bar pops up but no schema is created) - Any ideas on why this happens.

Your original post stated “i am trying to create a xml schema from a xml” and said nothing about an XML Schema (XSD). The error message you are getting is the one returned when you attempt to create an IS Schema from an XML document that does not refer to a DTD.

If you’d like to post the XSD that is giving the problem, I’ll try to take a quick look. Otherwise, I won’t waste my time guessing on what might be the issue.

IS has no problem creating IS Schemas from XSD’s which use choice models, unions and other fun XML constructs. You just have to stay away from recursive (self referencing) definitions. See the IntegrationServerSchemaReference.pdf document for more about IS Schemas.

Mark

Correct - we have been trying to work around this issue from every possible direction. Here is the xsd
my.zip (28.7 KB)

I was able to use Developer 6.5 to successfully create an IS Schema from the my.xsd that you attached in your previous post with no errors and no warnings.

Is there a way to generate XSD from an IS document.
I have a very big IS Document which has several fields with constaints like min, max length etc. And all the constaints are defined directly in IS documents using property window. Is there a way that I can genrate IS schema or XSD file from this IS Document?

If found pub.schema:createXSD service can generate XSD schema when I pass Fully qualified name of a document type, service, or specification on IS.
But when I looked at the schema for an IS document which has few fields with pick list choices I could not field those pick list choice values in XSD. Is there any way to get those pick list choices values in generated XSD

Is there any way to create XSD schema from an IS schema ?

Not within Developer and not using the built-in services.

Mark

Hi Vijayvjp,
Try the below…It must work

just delete the pick list.
use property Content type, and select the string or anyother as requires…then click on customize and give enumaration values(you can say pick list).

Now try to create XSD…you shoul definitely get XSD in the format you are looking…