Happy New Year Everyone!
The new XML Schema Designer (see this previous blog post for a d/l location to the CTP) offers four views over XML Schema Sets: the XML Schema Explorer, Graph View, Content Model View, and Start View. The XML Schema Explorer shipped in VS 2008 SP1 and was blogged about previously here. This entry will focus on the Content Model View (CMV). The CMV offers a detailed look at a node’s compiled content model.
Basics of the view:
Q: What’s the purpose of the CMV?
A: To show a “compiled” content model view for an XSD node. Basically it shows the node structure that is defined locally, shows structure included through extends/restricts for types, shows structure pulled in through refs, etc. It then strips everything out of the content model that won’t show in the instance document for the node, e.g. a restricted attribute, allowing you to focus on what the schema will force XML docs to comply with.
Q: How do you get to it?
A: You open an XSD in VS, drag a node onto the design surface and switch the designer to the CMV view.
Q: Can you view two node content models side by side (SxS)? …and the XML Editor SxS as well?
A: Yes. In the CTP all nodes are shown SxS. In more recent builds, we’ve added a filmstrip that contains nodes that you’ve dragged into the designer. For nodes in the filmstrip you select, a CMV is shown. You can also tile an XML Editor instance with the designer and get support for SxS editing, viewing, etc.
The view is built with WPF and has nice zoom + pan capability. We also show the properties of nodes using the Property Window.
Here are a few screenshots:
Content model view with filmstrip showing two CMVs SxS.
Deeply nested content model view and property window.
Shoot me an email at timlav@microsoft.com or post any comments & feedback you have here.
More on the Graph View next week….
Thanks!
- Tim Laverty
PM, Data Programmability XML Tools