Serving pages with LtXML

Jason R. Cupp jcupp at essc.psu.edu
Fri Jan 23 15:22:03 GMT 1998


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 at essc.psu.edu)
Deasy GeoGraphics
The Pennsylvania State University

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list