xsl-list
[Top] [All Lists]

Re: includes

2004-11-24 09:19:20
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/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



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