Chapter 17. Writing an XSLT ProcessorInterface
You’ve had a chance to use a number of XSLT processors in this book, such as Xalan C++ and Instant Saxon. Now you’ll get the opportunity to write your own Java or C# XSLT processor with a simple command-line interface. Actually, you won’t be writing an XSLT processor from scratch, but rather an interface to a processor that is available through Application Programming Interfaces (APIs).
This chapter assumes that you are already an experienced programmer in either or both of these languages. The nice thing about writing your own processor at the API level is that you have control over the interface and how things work. Of course, such a task requires much more effort on your part, but if a high level of control matters enough to you, the effort will be worthwhile.
The first part of the chapter walks through the creation of a Java
XSLT processor using Sun’s
Java API for XML Processing (JAXP).
The second part guides you in creating a processor with C# using
Microsoft’s .NET Framework 1.1 SDK. You
don’t need an interactive development environment
(IDE) to work with these examples—they require only a text
editor and the javac or csc
compilers. I’ll show you where to get those
compilers if you don’t already have them.
Running an XSLT Processor from Java
Java Version 1.4 standard or enterprise edition comes standard with JAXP. JAXP includes the APIs you’ll need to create an XSLT processor. You must use Version 1.4 or a later Java Runtime Environment ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access