[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Multiple Input

Subject: RE: Multiple Input
From: "Richard Lander" <rlander@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Nov 1999 22:03:36 -0500
xsl multiple inputs
 Richard,

Thanks. I now see the error in my ways. I was using

 <xsl:copy-of select="*"/>

instead of

<xsl:apply-templates/>

I can't imagine why I didn't try that in the first place. I have since tried
it and it works great.

As an old employer used to say to me ... 'Got it? ... Keep it!'

Thanks,

Richard.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Richard Reich
Sent: Friday, November 19, 1999 8:26 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: RE: Multiple Input


"Now, I'm assuming that the document function copies your document directly
to the result tree and that you cannot do much with it. If I'm wrong, I'd be
happy to find out."

That's what I at first thought too, but I'm delighted to say it ain't so.
The function returns the document node (or fragment) specified by the URI.
You can do anything you want with it.  It's hugely useful.  You can even use
XSL documents as server pages to generate dynamic content.

-r

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Richard Lander
> Sent: Friday, November 19, 1999 4:15 PM
> To: xsl-list@xxxxxxxxxxxxxxxx
> Subject: RE: Multiple Input
>
>
>  Jon,
>
> Given the following document and stylesheet, you'll end up with a DOC
> document that will include the foo.xml and bar.xml, as if they
> existed there
> in the first place. You can then run a transformation on that document to
> convert the both documents, as one, to HTML.
>
> Now, I'm assuming that the document function copies your document directly
> to the result tree and that you cannot do much with it. If I'm
> wrong, I'd be
> happy to find out.
>
> Try something like:
>
> <?xml version="1.0"?>
> <DOC>
> <REF url="foo.xml"/>
> <REF url="bar.xml"/>
> </DOC>
>
> <?xml version='1.0' standalone='no'?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
> <xsl:template match="/">
>  <xsl:apply-templates/>
> </xsl:template>
>
> <xsl:template match="DOC">
>  <DOC>
>  <xsl:apply-templates/> <!-- an xsl:copy-of element would probably work
> better, but this is fine -->
>  </DOC>
> </xsl:template>
>
> <xsl:template match="REF">
>   <xsl:for-each select="document(@url)">
>     <xsl:copy-of select="*"/>
>   </xsl:for-each>
> </xsl:template>
>
> </xsl:stylesheet>
>
> I hope that helps,
>
> Richard.
> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Jon Wynacht
> Sent: Friday, November 19, 1999 6:38 PM
> To: xsl-list@xxxxxxxxxxxxxxxx
> Subject: Multiple Input
>
>
> Any way to have multiple inputs for one .xsl?
>
> Say I have foo.xml and bar.xml. I need the contents of both for
> foobar.html
> and it uses foobar.xsl, one process, preferably using LotusXSL.
>
> Is this possible?
>
> Thanks,
>
> Jon
>
> ---------------------------------------------
> Jon Wynacht
> Web Developer - Worldwide Field Productivity
> Cisco Systems
> 408-527-5261
> jwynacht@xxxxxxxxx
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.