Stefan Bormann
Stefan Bormann

Reputation: 693

Automatically generate graphical documentation for XSD like XmlSpy does

I would like to generate a graphical documentation of some XSD files (XML schema definition). I know, there are a few projects that do a good job generating a textual documentation. But I use XmlSpy and I really love the tree that I get when I click on "print".

I would like to generate this automatically on a continuous integration server. The question is: how can I get this scripted? I found a forum post that sais "it's possible", but I don't have a clue where to start.

EDIT: the focus here is doing it from the command line rather than having a graphical editor.

Upvotes: 1

Views: 2276

Answers (3)

Stefan Bormann
Stefan Bormann

Reputation: 693

Thanks to @Abel for pointing me to XSD Diagram. Since version 1.0 this program can also write the annotations into the generated image.

I am using it in the following way now:

XSDDiagramConsole.exe -o picture.png -r rootnode -d -y -e 10 schema.xsd

Upvotes: 0

Clemens
Clemens

Reputation: 1817

You can also use the stylesheets from the XS3P project. You can apply them using a standard XSLT transformation engine (Saxon...).

Upvotes: 0

Abel
Abel

Reputation: 57149

Some ideas:

  • You may like Xsdvi, which converts an input XSD into an SVG diagram like this one (which I think is a logical choice: it's an XML to XML conversion). It is simple to use and its output can be rendered to any scale, it is SVG after all.

  • This tool was mentioned in this off-topic and deleted post (requires 20k+ rep to view). And there's XSDiagram, check it out.

  • Apparently, JDeveloper can be used for this, as this post shows, which is free for registered users.

I have not tried any of these, I'm happy with what oXygen provides. Try them out. Be aware that asking for tools is typically off-topic on StackOverflow, though continuous-integration is not (hence I decided to answer anyway).

Upvotes: 3

Related Questions