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

Re: includes

Subject: Re: includes
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 24 Nov 2004 16:19:20 +0000
xsl includes
Hi Tiffany,

> the "stand-alone component" could be xml, htm/html, shtml file.

There's no way for XSLT 1.0 to read a document that isn't at least a
well-formed XML entity. HTML files typically aren't well-formed XML
entities.

> currently, the way i "include" a "stand-alone component" is with
> hardcoding. for example:
>
>         <xsl:text disable-output-escaping="yes"><!--#include
> virtual= "/public/includes/about_side_nav.htm" --></xsl:text>

Presumably the result of your XSLT transformation then gets processed
by some other server-side process, then.

> OR
>
> <xsl:value-of select="/folder name/component name" /> 

I don't understand how this would work at all.

> 1. is there a cool way of combining the output from separate xsl
> files into one browser window?

It depends on how you've structured your XSLT stylesheets, but if they
all use templates with different modes, then you can do something
like:

<!-- A.xsl contains templates with mode="A" -->
<xsl:include href="A.xsl" />
<!-- B.xsl contains templates with mode="B" -->
<xsl:include href="B.xsl" />

<xsl:template match="/">
  <xsl:apply-templates select="." mode="A" />
  <xsl:apply-templates select="." mode="B" />
</xsl:template>

to get a result that combines the result of processing with A.xsl and
B.xsl.

> 2. can you recommend an approach to a dynamic solution for
> "includes"?

I'm still not sure what you mean by "includes", and now I'm not sure
what you mean by a "dynamic solution". A small example would really
help.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

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.