Java and XSLT

Example List

Check http://www.javaxslt.com for updates.
Directory / File NameNumNotes
examples  
  build.xml-Main Ant build file for all examples
  exampleList.html-List of all examples
  README.txt-Installation instructions
  chapters  
    presidents.dtd1-2DTD for presidents.xml
    presidents.xml1-1List of presidents
    presidentsToCSV.xslt-Converts presidents.xml to CSV format
    chap1  
      helloWorld.xhtml-XHTML Basics sidebar example
      library.dtd-Validation for library.xml
      library.xml1-3Data for a book collection
      src  
        chap1  
          Book.java-Represents a book in a library
          JdomToDom.java-One way to convert a JDOM tree to DOM
          Library.java-Represents a library
          LibraryDOMCreator.java1-4XML generation using DOM
          LibraryJDOMCreator.java1-5XML generation using JDOM
          Publisher.java-Represents a publisher
    chap2  
      attribSet.xslt-Example of <xsl:attribute-set>
      discussionForumHome.xml2-1Prototype home page
      discussionForumHome.xslt2-2Prototype home page stylesheet
      library.xml-Used with links.xslt
      links.xslt-Shows Attribute Value Templates
      schedule.xml2-5Personal schedule/appointments
      schedule.xslt2-6Display the schedule as XHTML
      skeleton.xslt2-4Skeleton XSLT stylesheet
      sorting.xslt2-9Looping and sorting examples
      xpathExamples.xslt2-8Example XPath location paths
    chap3  
      choose.xslt3-2Example of <xsl:choose>
      conditional.xslt3-1<xsl:if> examples
      familyTree.xml3-4A family tree example
      familyTree.xslt3-5Stylesheet for familyTree.xml
      identityTransformation.xslt3-11Identity transformation stylesheet
      includeDemo.xslt-Shows how to use <xsl:include> and <xsl:import>
      log.xml3-10Log file before transformation
      modes.xslt3-6Using template modes
      namedTemplate.xslt3-3Calling a named template
      nameFormatting.xslt3-7String formatting functions
      numberFormatting.xml3-8Sample data to demonstrate number formatting
      numberFormatting.xslt3-9Number formatting functions
      pageElements.xslt-Used with includeDemo.xslt
      schemaChange.xslt-Used with Example 3-10
      stringFunctions.xml-Various XPath string functions
      stringFunctions.xslt-Various XPath string functions
      team.xml-Used with Example 3-3
      antdoc  
        antBuild.xml-Sample Ant build file from Ant itself
        antdoc.xslt3-14XSLT stylesheet to format Ant build files
        tomcatBuild.xml-Sample Ant build file from Tomcat
    chap4  
      web.xml-Deployment descriptor for the chap4 web app
      docroot  
        index.html-Home page for the chap4 web app
        schedule.jsp4-2Generates a TV schedule using JSP
        schedule.xml4-5XML for schedule web page
        schedule.xslt4-6Generates the schedule HTML web page
      src  
        chap4  
          Schedule.java-Java class representing the schedule
          ScheduleJDOM.java4-4Produces a JDOM Document representing a TV schedule
          ScheduleServlet.java4-1Generates a TV schedule using println() statements
          Show.java-Helper class representing an individual TV show
    chap5  
      csvToHTMLTable.xslt5-9Converts a CSV file to an HTML table
      presidents.csv-US presidents in CSV format
      simple.xml-A simple XML test
      simple.xslt-A simple XSLT test
      stylesheetParameter.xml-Shows how to pass a parameter from Java
      stylesheetParameter.xslt-Shows how to pass a parameter from Java
      images  
        sample.gif-Used with the parameter example
      src  
        chap5  
          JaxpParameter.java-Shows how to pass an XSLT parameter using Java
          SimpleJaxp.java5-3Using JAXP 1.1
          SimpleSaxon.java5-2Using SAXON 5.5.1
          SimpleXalan1.java5-1Using Xalan 1
          Streams.java5-4JAXP StreamSource and StreamResult
    chap6  
      web.xml6-2Deployment descriptor for splash screen web app
      docroot  
        index.html-Home page for the chap6 web app
      src  
        chap6  
          PersonalData.java6-6A Java data helper class
          PersonalDataCachedServlet.java6-10Modified version of PersonalDataServlet
          PersonalDataServlet.java6-8Servlet that displays the two personal data screens
          PersonalDataXML.java6-7Converts PersonalData into XML using DOM
          SplashScreenServlet.java6-1Shows a splash screen
      xslt  
        confirmPersonalData.xslt6-5Generates the "Confirm Personal Data" page
        editPersonalData.xslt6-4Generates the "Edit Personal Data" page
        sample.xml6-3Example XML data
    chap8  
      web.xml8-3Deployment descriptor for the chap8 web app
      dependentobject  
        Address.java8-13Sample dependent object
        addressDO.xml8-14Data representing an address
        dependentObject.xslt8-15Rudimentary XSLT code generator
      docroot  
        company.xml-Used to test servlet filters
        home.xml-Used to test servlet filters
        i18n.html-Used to test servlet filters
        index.html-Used to test servlet filters
        jobs.xml-Used to test servlet filters
        products.xml-Used to test servlet filters
      i18n  
        directory.xml8-16XML data file
        directory_basic.xslt8-17XSLT stylesheet logic shared by English and Spanish
        directory_en.xslt8-18English stylesheet
        directory_es.xslt8-19Spanish stylesheet
      src  
        chap8  
          LanguageDemo.java8-24An internationalized servlet
          Mailbox.java-Demonstrates session tracking
          MailboxDOMProducer.java-Demonstrates session tracking
          MailboxFactory.java-Demonstrates session tracking
          MailboxServlet.java-Demonstrates session tracking
          MailFolder.java-Demonstrates session tracking
          MessageHeader.java-Demonstrates session tracking
          TemplateServlet.java8-4Drives the XSLT transformation
      webinf  
        xml  
          company.xml-Used to test TemplateServlet
          exampleMailbox.xml-Used to test TemplateServlet
          home.xml8-1Used to test TemplateServlet
          jobs.xml-Used to test TemplateServlet
          numbers_chinese.xml-Chinese XML data file
          numbers_english.xml8-21English XML data file
          numbers_spanish.xml8-20Spanish XML data file
          products.xml-Used to test TemplateServlet
        xslt  
          mailbox.xslt-Used to test session tracking
          numbers_chinese.xslt-Chinese stylesheet
          numbers_english.xslt-English stylesheet
          numbers_spanish.xslt8-22Spanish stylesheet
          shopping.xslt-Used to demonstrate session tracking
          templatePage.xslt8-2Generates page header and navigation bar
    chap9  
      aidan.xml9-5Simple test to show how JUnit works.
      aidanCondensed.xml9-7Output from example 9-5 after applying condensePerson.xslt.
      build.xml9-4Sample Ant buildfile.
      condensed.dtd9-8A trivial DTD used for unit testing.
      condensePerson.xslt9-6Transforms an XML file into a more concise format.
      john.xml-Another sample XML file used by the unit test.
      johnCondensed.xml-A condensed version of john.xml.
      test.properties-Configures the unit test.
      src  
        chap9  
          SampleUnitTest.java9-9An example JUnit test.
    chap10  
      web.xml10-3Deployment descriptor.
      docroot  
        index.xhtml-XHTML home page for movie theater example.
      sample_requests  
        sample_request_ericsson_R320s.txt-Example HTTP request from a phone simulator.
        sample_request_ericsson_R380s.txt-Example HTTP request from a phone simulator.
        sample_request_ericsson_R520m.txt-Example HTTP request from a phone simulator.
        sample_request_motorola_simulator.txt-Example HTTP request from a phone simulator.
        sample_request_nokia_6210.txt-Example HTTP request from a phone simulator.
        sample_request_nokia_7110.txt-Example HTTP request from a phone simulator.
        sample_request_nokia_blueprint.txt-Example HTTP request from a phone simulator.
        sample_request_openwave_4.1.2.txt-Example HTTP request from a phone simulator.
      src  
        chap10  
          MovieServlet.java10-9Servlet that drives the WML example.
      webinf  
        xml  
          movies.dtd10-4DTD for movie theater example.
          movies.xml10-5Movie theater data.
        xslt  
          wml  
            home.xslt10-10XSLT for the home page.
            showtimes.xslt10-12Lists showtimes for a particular theater.
            theaters.xslt10-11Creates a list of theaters in a city.
          xhtml  
            home.xslt-Creates the XHTML version of the home page.
            showtimes.xslt-Creates the XHTML version of the showtimes page.
            theaters.xslt-Creates the XHTML version of the movie theater page.
      wml_prototypes  
        cities.wml10-6WML home page; displays list of cities.
        example_output_cities.wml-Sample output from a transformation.
        example_output_showtimes.wml-Sample output from a transformation.
        example_output_theaters.wml-Sample output from a transformation.
        helloworld.wml-A simple WML example.
        stl_theaters.wml10-7Movie theaters in St. Louis.
        st_charles18.wml10-8Showtimes for a specific theater.
  common  
    src  
      com  
        oreilly  
          javaxslt  
            swingtrans  
              ErrorListenerModel.java9-10Swing table model to display JAXP errors.
              SwingTransformer.java9-11Entry point into the Swing XSLT transformer app.
              TransformerWindow.java9-12Shows the result of an XSLT transformation.
              XMLOutputPanel.java9-13Shows XML output in a scrolling text area.
            util  
              AbstractXMLReader.java5-5Custom SAX reader
              BufferedHttpResponseWrapper.java8-10Captures output, used with a response filter
              BufferedServletOutputStream.java8-9Captures output, used with a response filter
              CSVXMLReader.java5-7CSV file parser
              DOMUtil.java-Misc DOM utilities.
              ResultCache.java9-15Caches a transformation result.
              SimpleCSVProcessor.java5-8CSV file parser
              Stopwatch.java-Utility class for performance metrics.
              StylesheetCache.java5-10XSLT stylesheet cache
              StylesheetFilter.java8-11Servlet filter for XSLT transformations
  discussion  
    forum.mdb-MS Access database for the discussion forum.
    web.xml7-39Deployment descriptor.
    design  
      mysql_forum_dump.txt7-17MySQL database contents.
    docroot  
      forum.css7-1CSS file used by all pages on the discussion forum.
      index.html-The home page for the forum web app.
    prototype  
      home.xhtml7-2Forum home page.
      home.xml7-3Home page XML data.
      javaprog_jan2001.xhtml--
      postMsg.xhtml--
      postMsg.xml7-5Prototype XML for posting a message.
      replyToMsg.xhtml--
      viewMonth.xml7-4Prototype XML to view a month of messages.
      viewMsg.xhtml7-6Prototype XML for viewing a message.
      viewMsg.xml--
    src  
      com  
        oreilly  
          forum  
            ForumConfig.java7-15Constants and configuration information for the app.
            adapter  
              DataAdapter.java7-16Abstraction around a database.
              DataException.java--
            domain  
              BoardSummary.java--
              BoardSummaryImpl.java--
              DateUtil.java--
              DayMonthYear.java--
              Message.java7-13Java class representing a message.
              MessageImpl.java--
              MessageSummary.java7-12Java class representing a message summary.
              MessageSummaryImpl.java--
              MessageTree.java7-14Java class that organizes messages into a tree data structure.
              MonthYear.java--
            fakeimpl  
              BoardSummaryImpl.java--
              FakeDataAdapter.java--
            jdbcimpl  
              DBUtil.java7-18JDBC utility functions.
              JdbcDataAdapter.java7-19JDBC implementation of the back-end data source.
            servlet  
              ErrorRenderer.java7-28Shows error messages.
              ForumServlet.java7-25The single servlet used in the discussion forum.
              HomeRenderer.java7-32Renders the home page.
              HomeReqHandler.java7-31Handles requests on the home page.
              PostMsgRenderer.java7-38Shows the post message page.
              PostMsgReqHandler.java7-37Handles a request to post a message.
              Renderer.java7-27Base class for page renderers.
              ReqHandler.java7-26Request handler base class.
              ReqHandlerRegistry.java7-30Locates the appropriate request handler for an inbound request.
              ViewMonthRenderer.java7-34Displays messages for a given month in a given board.
              ViewMonthReqHandler.java7-33Handles requests from the view month page.
              ViewMsgRenderer.java7-36Displays a web page for a message.
              ViewMsgReqHandler.java7-35Handles requests to view messages.
              XSLTRenderHelper.java7-29Does the actual XSLT transformations.
            xml  
              BoardSummaryJDOM.java7-23Produces XML for the board summary page.
              HomeJDOM.java7-20Produces XML for the home page.
              PostMessageJDOM.java7-24Produces XML for posting a new message.
              ViewMessageJDOM.java7-22Produces XML for a message view.
              ViewMonthJDOM.java7-21Produces XML for a monthly view.
    xslt  
      home.xslt7-7Home page XSLT stylesheet.
      postMsg.xslt7-10XSLT for the post/reply message page.
      utils.xslt7-8Reusable utility functions.
      viewMonth.xslt7-9XSLT for the view month page.
      viewMsg.xslt--
  lib  
    crimson_1.1.jar-Apache's Crimson XML parser
    jaxp_1.1.jar-Sun's Java API for XML Processing
    jdom_beta6.jar-JDOM
    junit_3.7.jar-JUnit
    mm.mysql-2.0.4-bin.jar-MySQL JDBC Driver
    README.txt-Overview of the distribution.
    servlet_2.3.jar-Sun's Servlet API
    xalan_2.1.jar-Xalan XSLT processor

Last updated $Revision: 1.2 $