xsl-list
[Top] [All Lists]

RE: RE: Two source documents with one stylesheet

2005-02-16 19:10:23
Thanks. I know I must have done this at some other point, but I couldn't find 
the stylesheet in my archives today with this construction. It seems obvious 
know that you have been kind enough to point it out. Like when you are looking 
for something like a ring of keys and you can't see that you already have it in 
your hand.
-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email



-----Original Message-----
From:     Michael Kay <mike(_at_)saxonica(_dot_)com>
Sent:     Wed, 16 Feb 2005 23:20:57 -0000
To:       <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject:  RE: [xsl] Two source documents with one stylesheet

You can do <xsl:apply-templates select="$doc1/*">, and a template rule that
matches the document element will then be fired. Template rules aren't
specific to a particular document. If you need different rules to process
different documents, use modes.

Michael Kay
http://www.saxonica.com/

 

-----Original Message-----
From: cknell(_at_)onebox(_dot_)com [mailto:cknell(_at_)onebox(_dot_)com] 
Sent: 16 February 2005 22:19
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Two source documents with one stylesheet

I'm working on a project to produce an FO document. The FO 
document will have two fo:simple-page-master elements (one to 
produce portrait output and the other to produce landscape 
output) and will produce three fo:page-sequence elements. The 
input consists of two source documents.

What I hope to do is pass the URIs for these documents to the 
stylesheet as parameters and use them in two document() 
functions inside two variable declarations. Creating the 
variables works without a problem. 

What has got me stuck is how to use the elements in the 
documents defined by the variables. Specifically, I can't use 
a variable in the match attribute of a template and I can't 
think of a way to accomplish this task without that.

Do I have to first merge the two source documents, then 
process them with the stylesheet in a two-pass process, or is 
there a single-pass solution?

-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>