save two xslt into one file

  • Thread starter Thread starter Grey
  • Start date Start date
G

Grey

I have to use two XSLT files to translate two XML files into HTML file respectively. However, I need to combine the two html files into one...HOW to do that??? I cannot change the content of the two XSLT....Can I use stream concept to store the first result and then append the second result into the stream?? If so, How to write to code as I have no ideas on using stream type ???

Million Thanks..
 
I don't understand: you have two input XML files and want one or two
output HTML files?
if you need one output HTML file, you can use one XSLT with the
document() function to access both input files.
 
No. I need to use two XSLT to translate the two XML files as the two XSLT
was created before and I don't allow to change it.
 
I have to use two XSLT files to translate two XML files into HTML file
respectively. However, I need to combine the two html files into one...HOW
to do that??? I cannot change the content of the two XSLT....Can I use
stream concept to store the first result and then append the second result
into the stream?? If so, How to write to code as I have no ideas on using
stream type ???

Million Thanks..



Do those two xslt files produce complete html pages or fragments?
(that is with or without <html>, <head> and <body> tags)

If they produce complete pages, you will have to find a way to isolate
the bodies and paste them together in the order you want.

We usually get html fragments from xslt transforms in a string. Then
we can stick these fragments where we want them in the complete
page. Multiple sets of xml and xslt are no problem this way.

Hans Kesting.
 
This depends on your setup and your needs.

For example:
If you want to produce a html page on that will run on a server and you have
access to the xml and xslt you can create a new page which does the
transformation of the two xml/xslt in the code behind and output it
somewhere on the new page. If the output of the transformation contains
<HTML>,<BODY> and <TITLE> -- tags that you do not wish to have duplicates of
you can use Regex.Replace to eliminate those from the string before output.

greetings,
mortb
 
Back
Top