Return-Path: Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 16541 invoked from network); 9 Jan 2001 14:53:57 -0000 Received: from pd9502211.dip.t-dialin.net (HELO router.mgsoft) (217.80.34.17) by h31.sny.collab.net with SMTP; 9 Jan 2001 14:53:57 -0000 Received: from congenio.de (localhost [127.0.0.1]) by router.mgsoft (8.11.0/8.11.0) with ESMTP id f09ErSu23635; Tue, 9 Jan 2001 15:53:28 +0100 X-Authentication-Warning: router.mgsoft: Host localhost [127.0.0.1] claimed to be congenio.de Message-ID: <3A5B25CF.D7189F01@congenio.de> Date: Tue, 09 Jan 2001 15:53:04 +0100 From: "Dr. Uwe Meyer-Gruhl" Organization: congenio Gesellschaft fuer innovative Softwareprojekte mbH X-Mailer: Mozilla 4.7 [de] (WinNT; U) X-Accept-Language: de,de-DE,en MIME-Version: 1.0 To: cocoon-users@xml.apache.org Subject: How to get the URI of an XML document in an XSL stylesheet? Content-Type: multipart/mixed; boundary="------------627619FA43B44A239A574053" X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N --------------627619FA43B44A239A574053 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I have several XML files which are to be presented in either HTML or WML by Cocoon. The problem with WML is that there are severe length restrictions, which I avoid by displaying only a certain aspect at a time. This can be done by using and supplying an "aspekt" parameter in the XSLT stylesheet like this: . . .



Zutaten
Anleitung
Informationen

Alas, I found out that some WAP browsers (like the Nokia) interpret relative URLs starting with a question mark relative to the last but one path component (i.e. the file name). That means if the XML source document was: "http://www.xyz.com/abc/duck.xml" then following the relative link "?aspekt=zutaten" would result in: "http://www.xyz.com/abc/?aspekt=zutaten" instead of "http://www.xyz.com/abc/duck.xml?aspekt=zutaten" as intended. Matter-of-fact, this kind of relative URL is interpreted the "wrong" way by Netscape Navigator and the "right" way by Internet Explorer also. So I guess I have to find a way of generating the source document file name from the stylesheet prepended to the "?aspekt=" part but have been unlucky at finding out how. Is there a function or pre-defined variable in Cocoon or Xalan or a method for that in standard XSLT? Kind regards Dr. Uwe Meyer-Gruhl --------------627619FA43B44A239A574053 Content-Type: text/x-vcard; charset=us-ascii; name="Uwe.Meyer-Gruhl.vcf" Content-Transfer-Encoding: 7bit Content-Description: Visitenkarte f�r Dr. Uwe Meyer-Gruhl Content-Disposition: attachment; filename="Uwe.Meyer-Gruhl.vcf" begin:vcard n:Meyer-Gruhl;Dr. Uwe tel;cell:+49 177 5222668 tel;fax:+49 8205273 tel;home:+49 89 880326 tel;work:+49 89 82908139 x-mozilla-html:TRUE url:http://www.congenio.de org:congenio GmbH adr:;;Herzog-Johann-Str. 22;M�nchen;;81245;GERMANY version:2.1 email;internet:Uwe.Meyer-Gruhl@congenio.de title:Gesch�ftsf�hrer x-mozilla-cpt:;27584 fn:Dr. Uwe Meyer-Gruhl end:vcard --------------627619FA43B44A239A574053--