Setting XSL-FO XML Schema in Visual Studio

I'm playing lately with an XSL-FO for generating a pdf documents.
XSL-FO has a long list of available tags and attributes, which for a new guy who want to create a simple document is a nightmare to find a proper one.
Fortunatelly we can set an schema for XSL-FO, so will result in acquire a full intellisense in VS.

For a simple *.fo file, we can set the path to the schema directly in file:

<fo:root

      xmlns:fo="http://www.w3.org/1999/XSL/Format"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xsi:schemaLocation="

http://www.w3.org/1999/XSL/Format

http://www.xmlblueprint.com/documents/fop.xsd">

...

We can of course use the build in VS XML Schemas selector. To use it, we must copy the schema file to the Schemas catalog (defaut path for VS2012 is C:\Program Files (x86)\Microsoft Visual Studio 11.0\Xml\Schemas).

Then we can go to Properties of the opened xml/xslt file and set the new added schema to file:

schema

From now, we should have an enable intellisense as shown below:

xsl-intellisense

.

This article is part of the GWB Archives. Original Author: Łukasz Kuryło

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.