[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Serving pages with LtXML
Is anyone using LtXML to serve web pages? I'm converting most everything on the website I manage into custom XML applications. I've found a neat trick to do it and was wondering if anyone had similiar experiences. When a document is requested, say "http://dork.net/faq". This actually points to "../faq/index.shtml". This file contains a server-side include that executes a script: "<!--#exec cmd='/cgi-bin/writexml mypage.r mypage.xml". This script takes two arguments 1) the control file (*.c) or rule file (*.r) and the XML document (mypage.xml). "writexml" then calls LtXML programs to convert the XML into HTML using the translation files, sending output back to the webserver. What the user sees in the end is only HTML. This avoids having to rely on stylesheets. In addition this script "writexml" can also accept flags like "writexml -d" which tell it to translate ISODATES ("19980101") into "Jan 1st, 1998", and perform sorting "writexml -i" on output from LtXML's 'sgrpg' or 'sgmltrans' that looks like: "index=shoes data=<h1>Some shoes are red</h1>..." "index=foxes data=<h1>Foxes are fast</h1>..." "index=apple data=<h1>The best apples are granny smiths</h1>" The script will take this output (because of the "-i" option) and print back to the client: "<h1>The best apples are granny smiths</h1>" "<h1>Foxes are fast</h1>" "<h1>Some shoes are red</h1>" -- Jason R. Cupp (jcupp@e...) Deasy GeoGraphics The Pennsylvania State University xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|