Create a custom XSLT

H

Humphrey

I have a large number of InfoPath forms I want to print using word (primarily
so tabulated data prints the whole row on one page). I have read extensively
about the process but there is always one part that is left out - actually
creating the XSLT.
Normally the text details every step up to the creation of the XSLT, it then
assumes the user knows how to do this (or assumes a miracle will take place
and the XSLT will appear), and then continues on with detailed instructions.
Please can someone show me how to create a simple XSLT from a small InfoPath
form. I cannot spend the rest of my life trawling through Google...
 
S

S.Y.M. Wong-A-Ton

Just a tip when posting in the group: While I do understand your frustration,
it is best to try to omit it from your question, since people who answer
questions in the group tend to skip posts that display too much irritation.
We are here to try to help you. :)

There is nothing simple about learning XSLT, so I understand where you're
coming from. The best way I've found is to start with the XML itself that
you're trying to convert and then gradually replace and add the tags and
elements for XSLT. I tried to outline the process in this article
http://enterprise-solutions.swits.n...form-into-word-2007-document-xslt-c-sharp.htm
(starting from step 10), but it remains difficult to explain how to put an
XSLT together, which is why I'd recommend getting a good book or reference on
XSLT. There are references online, but you have to be pretty comfortable with
XML to understand them and pick up using XSLT quickly. For example, this
document http://www.w3.org/TR/xslt explains how it works and would generally
tell you everything you'd need to know on the topic, but again, it is
difficult to understand.
 
H

Humphrey

Thank you for your post - there's certainly enough information there to keep
me going for a while. Thanks also for your insight.
Could you recommend books for the XSLT transform. I've searched many in the
library but none go into detail about the transform process. We need to get
this working so we can get the documentation printed in the preferred format.

H
 
S

S.Y.M. Wong-A-Ton

I don't read many technical books anymore, since many of them just rehash
what is already available on MSDN and on the Internet. So it is difficult for
me to say what a good book would be. However, I've taken a look for you and
would recommend the following learning path: Have a look at the XSLT Starter
Kit in the MSXML SDK (http://msdn2.microsoft.com/en-us/library/ms767600.aspx)
first. There are basically 2 important things you need to understand: How XSL
templates work and how to use value-of. If the SDK info is not enough for
you, you can consider a book like Beginning XSLT from Apress. Wrox Press also
has an XSLT Reference book, but I'd go with the Apress book.

Finding details on exactly what you want to achieve is extremely difficult.
Most books either give an overview, explain basic technical details, or serve
as a reference. You rarely find books that deal with specific real-world
problems unless it's a cookbook type of book.
 
S

S.Y.M. Wong-A-Ton

A third thing I'd add to the list is learning how to use xsl:for-each. You
will need this to loop over the rows of your tables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top