News


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:

<?xml version="1.0" encoding="utf-8"?>

<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






.

 


Comments

Gravatar # re: Setting XSL-FO XML Schema in Visual Studio
Posted by mike on 10/10/2012 2:47 PM
I beleive liquid xml studio (http://www.liquid-technologies.com) also has a plugin for visual studio so should make for a neat way to validtae your schema, it also has intellisense, syntax highlighting etc, have you heard of liquid studio and do you think its any good?
Gravatar # re: Setting XSL-FO XML Schema in Visual Studio
Posted by Łukasz Kuryło on 10/18/2012 7:28 PM
no, I've never heard of liquid studio. I'm using xml only occasionally and I'm using a vs for it
Comments have been closed on this topic.