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 68555 invoked from network); 28 Jun 2000 09:38:58 -0000 Received: from frankfurt.denic.de (HELO notes.denic.de) (194.246.96.101) by locus.apache.org with SMTP; 28 Jun 2000 09:38:58 -0000 Received: from denic.de ([192.168.0.187]) by notes.denic.de (Lotus Domino Version 5.0.2c (Intl)) with ESMTP id 2000062811375513:1080 ; Wed, 28 Jun 2000 11:37:55 +0200 Sender: ulim Message-ID: <3959C82E.A52E0C7B@denic.de> Date: Wed, 28 Jun 2000 11:41:02 +0200 From: Ulrich Mayring Organization: DENIC eG X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.12-32 i686) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-users@xml.apache.org Subject: Re: access xml filename References: X-MIMETrack: Itemize by SMTP Server on notes/Denic(Version 5.0.2c (Intl)|08 Februar 2000) at 28.06.2000 11:37:55, Serialize by Router on notes/Denic(Version 5.0.2c (Intl)|08 Februar 2000) at 28.06.2000 11:38:23, Serialize complete at 28.06.2000 11:38:23 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Torsten Curdt wrote: > > How can I access the filename of the xml document > from within the XSL !? You need to pass it into the stylesheet like myxml.xml, then you can access it via XPath. Thus you need to find the filename in your XML/XSP page, e.g. like this: XSPUtil.baseName(XSPUtil.baseName(XSPUtil.fileComponent(normalize(request.getPathInfo())))) This is just one of several ways to go about it. I don't remember why I did it like this, but it worked ages ago. Today you can probably use the util taglib instead. You might need to define the method normalize, it does basic sanity-checking: if (string == null) return ""; else return string; Ulrich -- Ulrich Mayring DENIC eG, Systementwicklung