OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Serving pages with LtXML

[ Lists Home | Date Index | Thread Index ]
  • From: "Jason R. Cupp" <jcupp@essc.psu.edu>
  • To: XML-DEV <xml-dev@ic.ac.uk>
  • Date: Fri, 23 Jan 1998 02:27:09 -0800

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

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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS