About stylesheet href

Subject: About stylesheet href
From: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
Date: Tue, 26 Jan 1999 20:58:01 -0500
Hi J-P

I made an error in the last message. I made several trial and found that
Jade do not support sysids defined in a catalog. It has to be a storage
location.

In fact, I discovered that XML stylesheets share the same weakeness.
xml:stylesheet href is a URL and therefore is location dependant.

The catalog mechanis was brought to provide a location independence to
identifiers. The catalog is providing a certain indirection to real
storages. Thus, your document contain identifiers that are location
independent and can then be transported. If, in the catalog you are using
relative path like "../common/MyImage.jpeg" you can even move the whole
collection without having to redo your catalog.

So it seeems that the stylesheet PI do not have this location independence
or maybe I am making a error. Am I? (to other guys on this list).

In the SGMLKit I implemented an other way that indeed work.

to provide location independance, with the sgmlKit you don't include a PI.
Instead, in the SCRIPT directory (located under the root directory where the
SGMLKit is installed), you update the SCRIPTS file. That file is a bit like
catalog but includes COMMAND tags. You associate a DOCTYPE to a Jade command
line with two markups. This way, all documents having this doctype are
associated to this command line. It is more economical than to redo each
time the same thing. A SCRIPTS file entry looks like:

COMMAND <DOCTYPE="-//Free Text Project//DTD Play//EN"> <script = jade -t
rtf -o $DOCVIEW -d "$SCRIPT_DIR/play/play.dsl" >

So each time you select a document with that DOCTYPE the Jade command line
is used to render it. This is experimental stuff but it is working in the
last version of the SGMLKit. The above line means that the document is
rendered in the docview and that the script is located in the play directory
itself located under the Scripts directory. You can also use an absolute
path to indicate the script location. The -o parameter is optional.

Anyway, I'll look at what can be done with the stylesheet PI. What about
this:
<?xml:stylesheet href="<catalog>sysid" type="text/dsssl" format="tex"?>

So, it the preprocessor encounter the <catalog> tag in href, it look for:

SYSTEM sysid "dir1/dir2/script.dsl" then replace the href value by
"dir1/dir2/script.dsl"

So the dsssl engine would receive the following PI:
<?xml:stylesheet href="dir1/dir2/script.dsl" type="text/dsssl"
format="tex"?>

and would work OK.

What do you think of this solution?

Regards
Didier PH Martin
mailto:martind@xxxxxxxxxxxxx
http://www.netfolder.com


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread