xsl-list
[Top] [All Lists]

RE: generate output html from 2 xml files

2004-02-17 05:21:56
Yes, this is possible.  To use multiple XML files you implement the
document() function.  To do this create a variable as such:

<xsl:variable name="format" select="document('format.xml')/>

Within your template you would call the variable and then treat it in
the same way you would if you were calling for data in the standard
document flow.  For example... <img src="{$format/root/logo/image}"
alt="{$format/root/logo/text}"/> would replace the XPath with the name
of the image and the text that goes along with it.  I'm assuming that
you would be using one of these two XML files as the main document used
by the processor in the transformation process.  If this is not the case
then just create another variable using interview.xml and use it in the
same manner as format.xml.

Hope this helps!

M:D

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Markus Hanel
Sent: Tuesday, February 17, 2004 4:50 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] generate output html from 2 xml files

Hello,
 I am trying to show a logo from a file: format.xml and some forms from
a
file: interview.xml with one xsl file to produce output html. Is this
possible?



interview.xml

<root>
  <form>
  <form>
  <form>
  <form>
</root>

format.xml

<root>
  <logo>
    <text>some text</text>
    <image>one image</image>
    ...
  </logo>
</root>

Regards,
markus


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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