Skip to Content
Java and XSLT
book

Java and XSLT

by Eric M. Burke
September 2001
Intermediate to advanced
528 pages
13h 46m
English
O'Reilly Media, Inc.
Content preview from Java and XSLT

Another XSLT Example, Using XHTML

Example 2-5 contains XML data from an imaginary scheduling program. A schedule has an owner followed by a list of appointments. Each appointment has a date, start time, end time, subject, location, and optional notes. Needless to say, a true scheduling application probably has a lot more data, such as repeating appointments, alarms, categories, and many other bells and whistles. Assuming that the scheduler stores its data in XML files, we can easily add features later by writing a stylesheet to convert the existing XML files to some new format.

Example 2-5. schedule.xml

<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="schedule.xslt"?> <schedule> <owner> <name> <first>Eric</first> <last>Burke</last> </name> </owner> <appointment> <when> <date month="03" day="15" year="2001"/> <startTime hour="09" minute="30"/> <endTime hour="10" minute="30"/> </when> <subject>Interview potential new hire</subject> <location>Rm 103</location> <note>Ask Bob for an updated resume.</note> </appointment> <appointment> <when> <date month="03" day="15" year="2001"/> <startTime hour="15" minute="30"/> <endTime hour="16" minute="30"/> </when> <subject>Dr. Appointment</subject> <location>1532 Main Street</location> </appointment> <appointment> <when> <date month="03" day="16" year="2001"/> <startTime hour="11" minute="30"/> <endTime hour="12" minute="30"/> </when> <subject>Lunch w/Boss</subject> <location>Pizza Place on First Capitol Drive</location> ...
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.
Start your free trial

You might also like

Learning XSLT

Learning XSLT

Michael Fitzgerald
XSLT

XSLT

Doug Tidwell
XSLT and XPATH: A Guide to XML Transformations

XSLT and XPATH: A Guide to XML Transformations

John Robert Gardner, Zarella L. Rendon

Publisher Resources

ISBN: 0596001436Supplemental ContentCatalog PageErrata