The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

XSD generator

Does anybody out there know of a good XSD generator that would take a well-formed XML document as an input?
Steve Hirsch Send private email
Tuesday, November 28, 2006
 
 
The .NET Framework includes a tool xsd.exe that can do this.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpconxmlschemadefinitiontoolxsdexe.asp

I've used xsd.exe for several projects and been reasonably happy with it.

Also I know that XML Spy provides this as well but I have never personally used it.

http://www.altova.com/products/xmlspy/dtd_editor.html
Robert Horvick Send private email
Tuesday, November 28, 2006
 
 
If you're command-line averse (hey, I am), you can also do it from within VS 2003 or 2005; when you open or edit an XML document, there's a "Create Schema" button on the toolbar that'll do it in one click.
Kyralessa Send private email
Tuesday, November 28, 2006
 
 
InfoPath does this too, although you have to "Extract Form Files" to get at the XSD.
Raj Chaudhuri Send private email
Tuesday, November 28, 2006
 
 
Much of the VS2005 stuff mentioned even comes in the Express editions of VB.Net and C#.
Oscar
Tuesday, November 28, 2006
 
 
Anybody know of anything in the J2EE world?
Steve Hirsch Send private email
Wednesday, November 29, 2006
 
 
XMLSpy works pretty well and I have been using it pretty consistently since mid-2001.

I don't know of anything in the Java space...
KC Send private email
Wednesday, November 29, 2006
 
 
You can try XSD inference available here :
http://www.gotdotnet.com/team/xmltools/

Not sure about the J2EE specific need though. But would like to know why you need one.
Vineet.Reynolds Send private email
Wednesday, November 29, 2006
 
 
There must be something for the Java crowd, but working with a WebSphere MB contractor recently I found he was clueless about how to validate document and subset schema XSDs he was creating based on an enormous "data model" XSD we were given.  I ended up installing C#.Net Express so he had some tools to work with.

I was sure IBM et al. must have some Eclipse add on for this, but he wasn't aware of anything.

I wonder if anyone has tried to compile a list of available XSD tools (pay and free) for the various code ecosystems we play in?  So far all I've found are fairly fragmented lists here and there on personal web sites.  XML Spy is fairly well known but others seem more obscure.
Not the Mama
Wednesday, November 29, 2006
 
 
We want to embed the functionality in our tool. It seems like a very silly wheel to reinvent.
Steve Hirsch Send private email
Thursday, November 30, 2006
 
 
Ok, I did this once. But the scope was very small.
Feel free to pinch my idea.

Use XSLT (yes, it can work on input xml and generate xsds in return). Examine every input xml and create a corresponding schema. Make a unions of all the generated XSDs( tough one, if you plan to support several input files for one output xsd).

My earlier tool (if you can call it a tool) was just one programatically generated style sheet that operated upon one input xml at a time.
Vineet.Reynolds Send private email
Thursday, November 30, 2006
 
 
Thanks. I'll pass it on to the developers.
Steve Hirsch Send private email
Thursday, November 30, 2006
 
 
It seems odd that you would want to have a schema inference mechanism included in a system at runtime, unless it is an XML IDE tool!

Of the tools I've used XmlSpy is by far the best - what I would expect you would have to do is import the XML, generate a schema from it then generalize the schema to meet the exact requirements. Unless it is a very simple XML format then there simply isn't enough information in a single sample XML document to infer an entire useful schema.
Arethuza Send private email
Friday, December 01, 2006
 
 
Trang is decent Open Source code for doing this - it generates DTDs, Relax NG or XSD.

It's about as good as XML Spy is - which is to say, not nearly as good as a manually written schema.
Inigo
Saturday, December 02, 2006
 
 
I'm not saying that the requirement makes sense--to me, it doesn't. At a certain point though, it's not what you want, but what the customer wants and is willing to pay for.

Myself, I would be happy if markup languages were only used for what they were intended for, marking up text, but what do I know?
Steve Hirsch Send private email
Monday, December 04, 2006
 
 
Just wait until this committee brings forth its Prodigal Son:

XML Binary Characterization

http://www.w3.org/TR/xbc-characterization/


XML Binary?  I wonder what a Binary XSD will look like?

"It is a riddle, wrapped in a mystery, inside an enigma..."

-- Winston Churchill
Justinian
Monday, December 04, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz