[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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

Subject: Re: [xsl] 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

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"


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