Subject: RE: [xsl] Getting current XML filename with Xalan From: "Crowers, Steve" <scrowers@xxxxxxxxxxxx> Date: Thu, 19 Jul 2001 11:27:04 -0400 |
from within your stylesheet, define a parameter like follows: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:param name="SourceURI" select="''"/> ... </xsl:stylesheet> from the command line pass in the URI like follows: java org.apache.xalan.xslt.Process -IN <someXmlDoc> -PARAM SourceURI <someXmlDoc> and within your stylesheet, refer to the variable you set: e.g. - <xsl:value-of select="$SourceURI"/> There are also methods of passing parameters via the TRAX API. Most of this is described in the Xalan docs... Hope this helps. Steve Crowers Software Engineer Liberate Technologies 2 Walnut Grove, Suite 200 Horsham, PA 19044 Phone: 215-773-9400 x 9514 Fax: 215-773-9401 scrowers@xxxxxxxxxxxx http://www.liberate.com -----Original Message----- From: Xavier Defrang [mailto:xavier@xxxxxxxxxxxx] Sent: Thursday, July 19, 2001 11:14 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Getting current XML filename with Xalan How could I do so? And how could I get this special value from within the XSLT? It doesn't look like I may define some sort of xsl:variable from the command line of the Xalan XSLT processor... Xavier Defrang Perceval R&D Team xavier@xxxxxxxxxxxx ------------------------------------------------- Perceval Technologies SA/NV Tel: +32-2-6409194 Rue Tenbosch, 9 Fax: +32-2-6403154 B-1000 Brussels http://www.perceval.net BELGIUM info@xxxxxxxxxxxx ------------------------------------------------- On Thu, 19 Jul 2001, Crowers, Steve wrote: > I don't believe so. However, a work-around would be to pass the source doc > to the stylesheet via a parameter. > > > Steve Crowers > Software Engineer > > > Liberate Technologies > 2 Walnut Grove, > Suite 200 > Horsham, PA 19044 > Phone: 215-773-9400 x 9514 > Fax: 215-773-9401 > scrowers@xxxxxxxxxxxx > http://www.liberate.com > > > > -----Original Message----- > From: Xavier Defrang [mailto:xavier@xxxxxxxxxxxx] > Sent: Thursday, July 19, 2001 10:00 AM > To: Mulburrytech's XSL Mailing List > Subject: [xsl] Getting current XML filename with Xalan > > > > Hello, > > I've read on some FAQ that there was no standard way in an XSLT stylesheet > to get the name of the XML file being currently processed. I've read that > Saxon provides a proprietary system-id() function that returns the URI of > the actual document... I'm using xalan-j2.0.1, is there any function that > returns such information? > > Regards, > > Xavier Defrang > Perceval R&D Team > xavier@xxxxxxxxxxxx > > ------------------------------------------------- > Perceval Technologies SA/NV Tel: +32-2-6409194 > Rue Tenbosch, 9 Fax: +32-2-6403154 > B-1000 Brussels http://www.perceval.net > BELGIUM info@xxxxxxxxxxxx > ------------------------------------------------- > > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Getting current XML filen, Myriam_Midy | Thread | SV: SV: [xsl] PDF creation using FO, Klosa Uwe |
RES: [xsl] Namespace, Carlos Durand Silves | Date | RE: [xsl] parent -child, Heather Lindsay |
Month |