xsl-list
[Top] [All Lists]

Re: [xsl] Got xml base path in the xslt file

2009-09-16 04:43:20
The solution I mentioned, below would be suitable for XSLT 1.0 environment.

If you are using XSLT 2.0, then the solution which Ken and Mike have
proposed, should be preferred.

On Wed, Sep 16, 2009 at 8:45 AM, Mukul Gandhi 
<gandhi(_dot_)mukul(_at_)gmail(_dot_)com> wrote:
I could think of following strategy to tackle this problem.

You could put XML and XSL files into different folders. Then you could
pass the directory location of XML files, into your stylesheet as a
parameter. Something like following:

<xsl:param name="xmlBase" />

<xsl:for-each select="document(concat($xmlBase, '/', $fileName))">
  ...

I have not tested this, though.



-- 
Regards,
Mukul Gandhi

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--