XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
space monkeySubject: Newbie question: How do you include an html file into XSL??
Author: space monkey
Date: 06 Oct 2005 11:32 AM
I have a header.html and a leftnav.html file I'm trying to include into my XSL file. The key here is they are not "well formed" at all and there are 120 sites I need to do this for. Its to provide branding for search results.

<xsl:copy-of select="document('http://mydomainsomewhere.com/header.html')" />


I have this working for simple well formed html BUT my html is not well formed and I don't want or have time to go correct 120+ sites.

I'd like a way to handle badly formed html. I've tried putting CDATA tags around the html and so far that doesn't work

Does anyone know a good way to do this? Or am up a certain creek without a certain instrument?

I really appreciate the help! Thanks!

Postnext
(Deleted User) Subject: Newbie question: How do you include an html file into XSL??
Author: (Deleted User)
Date: 06 Oct 2005 12:42 PM
You will probably have to use XSLT 2. The "unparsed-text" instruction
will let you treat your html as a string.

Here is the description:
http://www.w3.org/TR/xslt20/#unparsed-text

Posttop
space monkeySubject: Newbie question: How do you include an html file into XSL??
Author: space monkey
Date: 06 Oct 2005 02:43 PM
Unfortunately the Google appliance we have apparently isn't set up for 2.0.
I did get it to kind of work using javascript.
<script language="javascript" src="{$myhref}/includes/header.js"></script>

Where header.js is just an html version set into document.write commands. Yucky for sure but its almost working.

It has a problem with my image paths for some reason. Even the absolute path doesn't fix it but I'll get it this way I'm sure.


Thanks for your help!



 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.