Altova Mailing List Archives


Re: Accessing 2 xml files in xsl

From: "Noah Nordrum" <noah@------------->
To:
Date: 4/18/2000 3:51:00 PM
here was the example David gave.
============================================
xsl:import is for importing stylesheets, ie for structuring your
stylesheet out of smaller modules. So is no use at all for what you want
to do.

if your countries are in countries.xml then just go

<xsl:apply-templates select="document('countries.xml')"/>

and write some templates to transform your file
into the list on your html.

David
============================================

I hope this will partially redeem me :)
also the "Index by Date" link on the xsl-list site is bad
http://www.mulberrytech.com/xsl/xsl-list/archive/maillist.html
"Index by Thread" works though.

Noah

"Selva, Francis" wrote:

> I have 2 xml files out of which one is linked to a xsl file.The xsl file
> produces html output but it has to access both the xml files.Can anyone tell
> me how I can do that?.I remember David saying about xsl:apply-templates
> match=document("test.xml") sometime back but can someone give me an example
> pl?.
>
>  This is just a rough sketch
>
> xml1
>
> <?xml-stylesheet type="text/xsl" href="layout.xsl"?>
> <bwlabels>
>         <header>... </header>
>          <address1>... </address1>
>          <address2>... </address2>
>          <address3>... </address3>
> </bwlabels>
>
> xml2
>
> <layout>
>         <alertmsg>You must enter three or more characters to perform a
> search.</alertmsg>
>         <pr>Projects</pr>
>
>         <productdetails>
>                 <type>Product Search</type>
>                 <pcontent1>Item Number</pcontent1>
>                 <pcontent2>Name</pcontent2>
>                 <pcontent3>Quick Guides</pcontent3>
>                 <pcontent4>Password</pcontent4>
>                 <pcontent5>New Items</pcontent5>
>                 <pcontent6>Work Area</pcontent6>
>                 <pcontent7>Reports</pcontent7>
>                 <pcontent8>Logoff</pcontent8>
>         </productdetails>
> </layout>
>
> I need to use both these xml files in my layout.xsl.
>
> Francis
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.