New XML Editor in Visual Studio 2005 Beta 1

| 1 Comment | 1 TrackBack

Cool news from the XML Editor Team (announced by Chris Lovett):


Announcing: New XML Editor in Visual Studio 2005 Beta 1

Visual Studio 2005 Beta 1 contains a completely new XML Editor, built on top of the core text editor provided by Visual Studio. It is entirely written in C# and leverages all the cool stuff provided by the System.Xml .NET assembly. The new XML editor provides support for editing XML and DTD content, including special support for XSD and XSL. It contains the following handy features:

* Full syntax coloring for all XML and DTD syntax.
* Well formedness checking while you type, with red squiggles and error list.
* Intellisense based on any DTD, XDR and XSD schemas.
* Validation-while-you-type with blue squiggles and error list.
* Auto-completion of namespace declarations, end tags and attribute value quotes.
* Support for xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes.
* Schema picker dialog for overriding schemas used for validation, which is then remembered as a document property in your solution.
* Schema cache for commonly used schemas with standard set provided out of the box. You can easily add your own schemas here or edit the existing ones to constantly improve your XML editing experience.
* Smart Formatter that is more than a pretty printer. It honors and formatting of attributes that you may have done by hand and it fixes up the most common mistakes people make in XML, like unquoted attribute values.
* Smart indenting based on XML element depth.
* Inline expand/collapse support.
* Easy navigation between start and end tags using brace matching command (Ctrl+]) .
* Brace highlighting so you see which tags are being closed as you type.
* Goto Definition command for navigating between elements and their associated DTD, XDR or XSD schema definitions. This command can also navigate from an entity reference to the entity definition in the DTD.
* Tool tips that popup showing xsd:annotations for the element or attribute under the mouse.
* XSL and XSD compilation errors while you type, providing even more error checking that can be represented in the schemas alone. * Show XSLT Output command available on any XML or XSLT file.

XSD Schema Inference

The editor provides a handy command named "Create Schema" which does one of three things:

1. Convert associated DTD to XSD
2. Convert associated XDR schema to XSD
3. Infer a schema from the XML

This is by far the easiest way to get started with designing an XSD schema.

XSLT Debugging

In non-Express SKU's only, this feature gives you a powerful XSLT debugger, fully integrated into the overall Visual Studio debugging experience so you can step from C# code directly into the XSLT transform itself and back out, or from XSLT out to extension objects and back. It also provides a "Debug XSL" command on XML editor toolbar to start debugging directly from XML or XSL file.

Once debugging has started the standard Visual Studio debugging menu is available including special support for the following:

  Setting and clearing breakpoints, at the node level (as opposed to line level).

  Locals window that shows XSLT variables and parameters that are in scope.

  Call Stack window that shows XSLT template stack.

Deep VS Integration & Extensibility

All the advanced core text editor commands and configurability is available, for example:

o Fully configurable colors using standard Tools/Options/Environment/Fonts and Colors property page.
o Fully integrated text editor settings (Tools/Options/Text Editor/XML) for general, tabs and miscellaneous settings.
o Support for the new Visual Studio 2005 "Import/Export Settings" feature.

Support for multiple-views over the same buffer. In Visual Studio 2003, the XSD designer and grid views were only available from a tab at the bottom of the document window, which means you could not view both ways at the same time. This limitation has been removed, and each different view is now a full fledged document window.

Custom XML designers can also be registered per file extension and/or XML namespace URI, which is how the Visual Studio XSD designer, DataSet designer, and the Grid View are associated with the XML editor. Anyone can now register an XML designer for a given namespace and the XML editor will automatically provide a View Designer menu item for invoking that designer. In fact if you are planning a custom XML designer, I'd love to chat about integration with this new XML text editor.

All I can say is "finally!"

Related Blog Posts

1 TrackBack

TrackBack URL: http://www.tkachenko.com/cgi-bin/mt-tb.cgi/253

Rats! from Colin's Blog on July 1, 2004 5:39 PM

TITLE: Rats! URL: http://dotnet.org.za/colin/archive/0001/01/01/2447.aspx IP: 196.25.219.121 BLOG NAME: Colin's Blog DATE: 07/01/2004 05:39:32 PM Read More

1 Comment

Have you checked if intellisense based on XSD supports all schema features? I particulary interested in Substitution Groups support.

Leave a comment