Home > Domino Tips > Developer > Other > How to apply XSL style sheets to XML views
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

OTHER

How to apply XSL style sheets to XML views


Ben Rodway
02.06.2007
Rating: -2.14- (out of 5)


Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


In this tip, I will show you an easy way to apply XSL (Extensible Style Language) style sheets to an XML view without the pain of creating numerous view templates.

If you have any XML views in your application, chances are you will be applying an XSL style sheet to them -- using complicated JavaScript routines. For presentation's sake, there is an easier way.

For example, let's say you have one XML view and six XSL style sheets. In this example, you will use a page to store your XSL.

First, create a form to be used as your view template. The form should be either HTML or text/XML. The form will be opened with a URL like this:
http://server/db.nsf/myform?ReadForm&view=XMLVIEW1&xsl=xslpage1

Your embedded view will be XMLVIEW, which is a formula computed using @URLQueryString("view").

At the top of the form, you will define the XML details -- including which style sheet to apply. Your computed value will be the @WebDbName of your database, plus @URLQueryString("XSL"), as shown below:

The XML style sheet line tells the browser to pre-format your XML with the XSL page you specified. ...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
XML and Web Services for Lotus Notes Domino
Create an RSS feed in Notes/Domino 8 with XML
Verify scheduled agent status with Domino Extensible Language (DXL)
Top 10 Lotus Notes Domino programming and development tips of 2007
A bevy of Notes/Domino development tips
Loading XML from JavaScript
Top 10 Notes/Domino developer tips of 2006
A smorgasbord of Notes/Domino development tips
Converting XML files into Lotus Notes documents
Finding the properties of a doclinked Lotus Notes document
How to override default Lotus Notes print settings

Other
Create a dynamic user-driven navigator for a Notes/Domino application
Comparing replicas on clustered Lotus Domino servers
Creating a Lotus Notes view column categorized by month
Using the XMLHTTP object for integration with Domino or any RDBMS back end
Hiding field properties/data from DocProperties box
Export a view to Excel without coding
Prevent document deletion if there are response documents
Switching between test IDs quickly
AddParameter to a NotesXSLTransFormer
Using DXL (Domino XML) to review/modify documents

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


How you store the XSL in the database is up to you, but you could make it accessible to advanced users to enable them to manipulate data without needing to create any more views.

To finish, pass the name of the XSL file in the URL Query String and the browser does the rest.

Do you have comments on this tip? Let us know.

Related information from SearchDomino.com:

  • Learning Guide: Extensible Markup Language
  • Reference Center: XML/Web services tips and resources

    This tip was submitted to the SearchDomino.com tip library by member Ben Rodway. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

    Rate this Tip
    To rate tips, you must be a member of SearchDomino.com.
    Register now to start rating these tips. Log in if you are already a member.




    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
    HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts