4
votes

I have an XML file which in addition to it's standard XML schema allows the use of XSLT.

I am including the correct namespace for XSLT (xmlns:xsl="http://www.w3.org/1999/XSL/Transform") however I am not receiving Intellisense for XSLT when I start typing xsl: tags.

Is it possible to turn this on? When I edit XSLT files it works absolutely fine.

2

2 Answers

2
votes

The Xml editor does support the standard xsl intellisense but it will strictly apply the schema. Hence you first need to enter a <xsl:stylesheet> and start adding children to it before you will see any xsl options. This is because all other other xsl elements need be children of either the xsl:stylesheet element or some other xsl element.

1
votes

XSLT Intellisense is a hidden feature of VS 2008. It has to be enabled by setting a Registry key (http://memoryleak.me.uk/2008/11/xslt-intellisense-in-visual-studio-2008.html):

First, make sure you have the xslt.xsd file in the C:\Program Files\Microsoft Visual Studio 9.0\Xml\Schemas folder. If not, copy it from VS2005.

Next, add a new string value to the registry named XsltIntellisense under HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\XmlEditor and set the value to True. This will enable some other nice features to the standard tag completion stuff.

This hint came originally from http://www.tkachenko.com/blog/archives/000740.html