[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Getting current XML filename with Xalan

Subject: RE: Getting current XML filename with Xalan
From: "Crowers, Steve" <scrowers@xxxxxxxxxxxx>
Date: Thu, 19 Jul 2001 11:27:04 -0400
xalan filename
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:  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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.