[xsl] combining multiple documents

Subject: [xsl] combining multiple documents
From: Steven Ericsson-Zenith <steven@xxxxxxxxxxxxx>
Date: Wed, 23 Jan 2008 17:14:13 -0800
This question relates to my comments a month or two ago. I have a document:

main.xml

<?xml-stylesheet ... >
<doc file="ext.xml">

	<content>
	...
	</content>

</doc>

And another using the same schema:

ext.xml

<?xml-stylesheet ... >
<doc>

	<content>
	...
	</content>

</doc>

and I have an XSL transformation that understands everything in <doc> except the file attribute. The transform works on files without the file attribute.

I had hoped that the sequence

...
	<apply-template/>
	<apply-template select="doc(@file)"/>
...

In the XSL transform would do the trick, but it does not. The transformation of main.xml returns the transformed ext.xml and the content of main.xml is ignored.

Michael suggested earlier that the transformation of the @file (ext.xml in this case) would have to reach into the "parent" document explicitly to pull out the definitions (my wording, not his).

I've tried a number of things but have not been able to solve the problem. I am missing something obvious?

Sincerely,
Steven

Current Thread