By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,723 Members | 1,662 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,723 IT Pros & Developers. It's quick & easy.

XHTML & SSI

P: n/a
Hi! I'm not an expert in XSL and XHTML so I need a little help!

I have an XSL file that ends up using the ENTITY (varname) SYSTEM
(file.xhtml) and then calls this variable which in turn outputs the
content in this .xhtml.

The problem is that in the XHTML file I want to do include. I tried
doing a Server Side Include (SSI), but XHTML seems to ignore it. So
how can I do an include on a file from inside an XHTML file?

If you can put a little code snippet for me, that would be great.
Thanks!
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Bond13579 wrote:
The problem is that in the XHTML file I want to do include. I tried
doing a Server Side Include (SSI), but XHTML seems to ignore it. So
how can I do an include on a file from inside an XHTML file?


The same way as absolutely any other file.

You just have to have your server configured to recognise that said file is
one that should be parsed for SSI statements.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 20 '05 #2

P: n/a
On 16 Jul 2004 05:47:20 -0700, ni*************@hotmail.com (Bond13579)
wrote:
Hi! I'm not an expert in XSL and XHTML so I need a little help!

I have an XSL file that ends up using the ENTITY (varname) SYSTEM
(file.xhtml) and then calls this variable which in turn outputs the
content in this .xhtml.

The problem is that in the XHTML file I want to do include. I tried
doing a Server Side Include (SSI), but XHTML seems to ignore it. So
how can I do an include on a file from inside an XHTML file?


I'm not entirely sure I've followed you correctly, so let me first
describe what I think you're trying to do.

You have an XSLT document to map some XML document to XHTML. As part
of your output, you include XHTML content from a separate document
using an XML entity reference. Your resulting XHTML document includes
some server-side includes directives which you'd like the server to
act on.

I assume, then, that whatever is doing your XSLT transformation is
running on your server and serving the resulting XHTML to the client.
You need a way to sneak in the SSI processor between the XSLT
processor and the content being sent off to the client.

How you do this is a server-side issue and thus depends on what server
software you are running. You will probably get a more in-depth answer
if you post your question in one of the newsgroups under:
comp.infosystems.www.servers.*

Just pick the one of the OS on which your web server is running.

As an alternative, you might like to try using an XML entity reference
from your HTML document, too. Your XSLT processor, assuming it "does"
XML properly, should handle that just as well as it did in the XSLT
document. If you want more help with *that* you'll have to find an XML
group, but I don't know any off the top of my head.

Take care,
-Claire
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.