Re: HELP ME! Getting xml filename and node path from diffrent xml doc ument.

Subject: Re: HELP ME! Getting xml filename and node path from diffrent xml doc ument.
From: Oliver Becker <obecker@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Aug 2000 16:25:58 +0200 (MET DST)
Hi Anders,

> How should i solve this problem.
> I have search thru XST faq/ XSLT news, but i cant find anything who can help
> me with this..
> 
> I have two XML sources, one xslt.
> I want to get the document name (ex. document1.xml) from one xml document
> and
> the path (node-path ex. \xml\name) from the other xml document.
> 
> Doing this using document() or other function/method.

It's a little bit difficult to guess what your documents actually look
like. Maybe an example would be very helpful.

It's no problem to open and read an other XML document via the
document function. The parameter (the file name) can be obtained
from your XML source.

Your second question seems to be more problematic.
Am I right in assuming that the XPath expression is part of your
XML source?

Something like
<root>
   <expression path="/foo/bar[@att='value']" />
</root>

XSLT doesn't have a facility to evaluate XPath expressions dynamicly,
i.e. they must be a static part of the stylesheet.

The Saxon processor provides an extension function saxon:evaluate()
that closes this gap.
http://users.iclway.co.uk/mhkay/saxon/extensions.html#evaluate

Hope this helps,
Oliver


/-------------------------------------------------------------------\
|  ob|do        Dipl.Inf. Oliver Becker                             |
|  --+--        E-Mail: obecker@xxxxxxxxxxxxxxxxxxxxxxx             |
|  op|qo        WWW:    http://www.informatik.hu-berlin.de/~obecker |
\-------------------------------------------------------------------/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread