| |||||||||||||||
This book is about XSLT, or XSL Transformations (XSL stands for Extensible Stylesheet Language), which is a language developed by W3C that can be used to transform XML documents. XSLT is so versatile that it can transform one kind of XML document to another kind of XML document, to an HTML document, or to a text document.
This book is for anybody who wants to use XSLT to transform XML documents to HTML documents. We will look at what XSLT is all about, how it is used for transformation to HTML, and especially how to write the XSLT documents for the transformation. Although XML to HTML is the focus of this book, the principles of transformation do not change whether you want to transform XML documents to HTML, XML, or text. Once you know how to produce HTML documents, you will possess the knowledge to produce the other two types as well. The Main Specifications
Before we get into XSLT, we must become familiar with its four core specifications: XSLT, XML, XML Namespace, and XPath. All four specifications are W3C recommendations; in other words, they are standards for the Web and the final authority for XML, XSLT, XPath, and XML Namespaces. These specifications are available at w3/TR. Because we will be using HTML as the primary output document format, you may want to look at the HTML specifications as well.
The Learning Curve
Although XSLT has concepts that require some programming fundamentals, it is not necessary to have a programming background. In other words, it is typical of the technologies that Web developers encounter and use every day. The definitions and examples should help you grasp the nonprogramming concepts.
This book was written in plain English, with as little computer jargon as possible. However, since you occasionally need to consult the specifications related to XSLT, I have used that terminology in the book.
XSLT Processors
To perform examples in this book, an XSLT processor program is needed. I use the XSLT processor written by James Clark to verify the examples. This XSLT processor can be obtained from James Clark's Web site: jclark. You can certainly use a different XSLT processor if you wish to. footnote: There is a chance XT may be retired shortly after this book is published.
Appendix A lists URLs that will help you find other tools to write XML and XSLT documents. Conventions Used in This Book
Concepts and terms are set in boldface type the first time they are used. Examples and code are set in the typewriter font. File names are set in italics. The '_' symbol is used to make the invisible space character visible. Organization
This book is organized into four parts and three appendixes. Part I provides you with the features of XML and XSLT that you will use most of the time. Part II describes the concepts of XSLT and XPath in more depth. Part III presents the usage of XSLT. Part IV discusses transformation to XML and text documents. The appendixes include online resources, character sets and encoding schemes, and a reference for XSLT and XPath, with many examples for the elements and functions in different circumstances. Part I
The first three chapters discuss the most frequently used 20 percent of XML and XSLT. You will be able to handle 80 percent of XSLT work in your daily life as an XSLT developer. Chapter 1, "Introduction," explains the importance of XML and the role of XSLT in the scheme of things. Chapter 2, "XML," is a simple introduction to XML. Chapter 3, "Introduction to XSLT," introduces you to XSLT. The most frequently used features are discussed here, with three related examples. Part II
The chapters in Part II explain how the transformation is constructed. Once you understand the transformation, you should have no problem writing XSLT documents to produce your desired result. Chapter 4, "XML Documents as Trees," displays the XML document as a tree. Chapter 5, "Paths," explains the all-important concept of location path. These are expressions that allow you to refer to elements, among other things, in XML documents. Chapter 6, "Transformation," explains the transformation process in XSLT, which uses templates for matching the XML documents. This is the foundation for understanding how XSLT provides a versatile tool to transform XML documents to HTML. Chapter 7, "Control," explains control elements in XSLT that allow you to manipulate XML documents. Chapter 8, "Constructing the Result Tree," shows you how to create the output document that you need for your project. Chapter 9, "Combining Templates," explains how templates can be combined together for reuse. Chapter 10, "Extensions," discusses the extension mechanism in XSLT. Part III
The two chapters in Part III examine the usage aspects of XSLT. Chapter 11, "Idioms and Tips," discusses some of the hard and not-so-hard lessons I learned in various XSLT projects. Chapter 12, "A Case Study," discusses the process and the XSLT documents necessary to design a Web site using XML and XSLT. Part IV
Part IV deals with transformation to XML and text documents. Chapter 13, "Transforming to XML and Text," presents examples of transformations from one XML document type to another XML document type. It also explains how to produce text documents with XSLT. Appendixes
Appendix A, "Tools and Resources," lists some of the URLs for XML and XSLT resources online. Appendix B, "Character Sets and Encoding Schemes," provides a simple explanation of character sets and encoding schemes. Appendix C, "XSLT and XPath Reference," provides examples for the elements and functions in XSLT. Once you understood the basic XSLT concepts, you will consult Appendix C often. Acknowledgments
I thank Kuni Katsuya and Glen Kim for being there when the idea for the book first came up. I thank Lucilla, Susan, and (Young) Brian for being the guinea pigs in my XSL tutorial. I thank David Faria for reading one of the first drafts.
I thank my family for supporting me while I worked 7 days a week, more than 12 hours a day. I thank Melissa for her love and support, even though I have been mentally absent for so long. I thank Opheliar for reading the first draft of the manuscript and offering helpful suggestions.
0201711036P04062001
* XML and XSLT fundamentals
* Converting an XML document to a tree
* XPath expressions and context node
* Matching templates and current node
* Control elements in XSLT
* Constructing the result tree and output document
* XSLT idioms and tips for effective use
A complete case study using XML and XSLT to publish a Web site illustrates all the major concepts and techniques in the book. In addition, the CD-ROM provides the code for all the examples in the books, as well as the case study. 0201711036B07092001
Product Details
Would you like to update product info or give feedback on images?
|
|
Share your thoughts with other customers:
|
||||||||||||||||||||||
|
Most Helpful Customer Reviews
16 of 16 people found the following review helpful:
5.0 out of 5 stars
Well written & organized, great learning tool,
By WILLIAM D BRADFORD (Chelmsford, MA United States) - See all my reviews
This review is from: XSLT: Working with XML and HTML (Paperback)
Just to put my two cents in perspective: As an untrained wanna-be hacker, I'm always getting in over my head with programming languages. I know just enough about scripting and XML to get into trouble. The problem with most books for me is that somewhere they assume that I understand something I don't, with the result that I inevitably hit a rather hard wall.No such problem (so far with) with this book. For my purposes, it's one of the most successful programming books I've used. I think it works because: - The author has focused on XML-HTML transformation of web documents, using a simple, non-Microsoft-centric approach. This is exactly what I want to do with my web site. Most books on XSLT try to cover everything, from B2B data to Braille to WAP. - Don't let the name fool you - this guy writes more clearly than most authors with Anglo surnames. He's a joy to read. Serious programmers should note that this is not about server-based enterprise solutions. It's a low tech approach for the rest of us.
17 of 18 people found the following review helpful:
4.0 out of 5 stars
Excellent book for beginners, but with lots of mistakes,
By
Amazon Verified Purchase(What's this?)
This review is from: XSLT: Working with XML and HTML (Paperback)
The only reason I didn't give the book five stars was the incredible number of mistakes in it. I have been studying XSLT for some time now and bought this book to fill out my knowledge and to evaluate it for use by my team of web developers. Khun Yee Fung's approach is much cleaner in many ways from the "XSLT Programmer's Reference." His method of showing how the transformation nodes get copied into the result tree before processing is very enlightening. His writing style is generally clean and his examples are very carefully expanded from simple to complex.
If you are looking for a reference guide then this book is not "it." If you are knowledgeable about XML and are just starting to learn about XSLT, this book will get you up and running quickly. Make sure you take the coding examples with salt, as they and the text contain many mistakes. There are cases where the XSLT programs don't exactly match the example XML. There are cases where the XSLT is missing an important piece (or is subtly wrong). In nearly all cases careful reading of the text should bring you to the proper code, regardless of the examples. I have not studied the code on the included CD to see if the mistakes from the text are reproduced there. Often with a technical book the CD is produced much later in the development cycle so the mistakes may have been caught. If this is so, the web site for the book doesn't mention it.
11 of 12 people found the following review helpful:
5.0 out of 5 stars
Extremely helpful,
By A Customer
Amazon Verified Purchase(What's this?)
This review is from: XSLT: Working with XML and HTML (Paperback)
I could not have gotten through my project without this book. I had a basic understanding of simple location paths but when my project became complex I was stuck until I got this book. This book fully explained location paths in a manner which I could understand. Highly recommended. I also bought Michael Kay's XSLT Programmer's Reference but Fung's book really explains how the XSLT processor works. Kay's book is still good for quick lookup and reference. I'm glad I have both but if I had to choose just one I would choose Fung's because I hadn't found the information anywhere else.
Share your thoughts with other customers: Create your own review
|
|
Suggested Tags from Similar Products(What's this?)Be the first one to add a relevant tag (keyword that's strongly related to this product).
|
|
This product's forum
Active discussions in related forums
Search Customer Discussions
|
Related forums
|