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

Re: HELP ME! Getting xml filename and node path from diffren

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)
diffren
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

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.