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

Re: Using doc( ) to get a second input file

Subject: Re: Using doc( ) to get a second input file
From: "G. Ken Holman g.ken.holman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Apr 2015 20:21:30 -0000
Re:  Using doc( ) to get a second input file
At 2015-04-14 20:15 +0000, Craig Sampson craig.sampson@xxxxxxx wrote:
I've tried to solve the problem two different ways, but neither works. First I tried adding a xpath specification to the doc function so that the returned XML would start at the element I was interested in, like so:

<xsl:variable name="myActionSet"

select="doc('file://sashq/root/pub/pubs_xiswork/sascrs/prod/v16/eclipse/workspace/castest/xml/actions.xml')//actionSet[@id='abc']"/>

but that caused the function to fail and not fetch the second file.

That should have worked! If you spelled the element incorrectly you would have successfully returned zero nodes, but if your XPath address is correct, then I cannot see why the function would fail. What error do you get?


I also tried a fragment specification "#actionSet" but this also failed.

Yes, I would expect that to fail as that is not XPath syntax.


I then tried to kick the second input files root element out of my root template with a test for ancestor-or-self::casActions and a test for descendant-or-self::casActions. But neither of these tests worked on the fetched second file.

Remember the document element is a direct child of the root node, so you don't need to go further.


Any help would be appreciated in solving this problem.

Go back to your attempts to use XPath after the doc() function and try and figure out what is going on there.


I hope this helps.

. . . . . . Ken


-- Check our site for free XML, XSLT, XSL-FO and UBL developer resources | Free 5-hour lecture: http://www.CraneSoftwrights.com/links/video.htm | Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ | G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx | Google+ profile: http://plus.google.com/+GKenHolman-Crane/about | Legal business disclaimers: http://www.CraneSoftwrights.com/legal |


--- This email has been checked for viruses by Avast antivirus software. http://www.avast.com

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.