LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject:

Re: XML->XSL->HTML, um... servlet?

From:

J-P Theberge <[log in to unmask]>

Reply-To:

General discussion of Extensible Markup Language <[log in to unmask]>

Date:

Sun, 14 Mar 1999 13:55:59 -0500

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (47 lines)


"John E. Simpson" <[log in to unmask]> writes:

 >
> The downside is that I've got to maintain TWO copies of my XML documents:
> the raw XML itself, and the HTMLized form. It also means that I can't
> simply update the XML document instances and have the changes immediately
> reflected in a browser.

Here the shell script I use with jade exactly for that.
The html page is created the first time there is a request for the xml doc.

#!/bin/bash

SP_CHARSET_FIXED="YES"
SP_ENCODING="XML"
JADE=/usr/local/bin/jade
SGML_DIR=/usr/share/sgml
CATALOG=${SGML_DIR}/catalog
XMLDCL=${SGML_DIR}/xml.dcl
HTMLEQUIV=$(echo ${PATH_TRANSLATED} | sed s/\.xml$/.html/)
LOGFILE=$(echo ${DOCUMENT_ROOT} | sed s/htdocs/logs/)/jade.log

echo "Content-type: text/html"
echo
echo "++++++ $(date)" >> ${LOGFILE}

if [ ! -e ${HTMLEQUIV} ] || [ ${PATH_TRANSLATED} -nt ${HTMLEQUIV} ]
    then
        ${JADE} -2 -tsgml -c${CATALOG} ${XMLDCL} ${PATH_TRANSLATED} \
        2>>${LOGFILE} > ${HTMLEQUIV}
    else
        echo "Html document already exists" >> ${LOGFILE}
fi

cat ${HTMLEQUIV}

-------------------------------------------------------------------
And here the lines to add to apache config file:

AddType text/xml xml
Action text/xml /cgi-bin/xmlparse

Hope that help

--
JP Theberge
[log in to unmask]


Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager