|
Subject: RE: [xsl] import css file via xslt ->xhtml From: Florent Georges <darkman_spam@xxxxxxxx> Date: Mon, 22 May 2006 19:36:47 +0200 (CEST) |
Rick Roen wrote:
Hi
> <style type="text/css"> @import "salesdoc.css"; </style>
This (the "@import") is plain text for XSLT. You can use
unparsed-text() to read a file as a string:
~> cat import-css.xsl
<xsl:transform
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="/">
<style type="text/css">
<xsl:text> </xsl:text>
<xsl:copy-of
select="unparsed-text('import-css.css')"/>
</style>
</xsl:template>
</xsl:transform>
~> cat import-css.css
body {
color: #333;
}
~> saxon import-css.xsl import-css.xsl
<style type="text/css">
body {
color: #333;
}
</style>
Regards,
--drkm
___________________________________________________________________________
Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement vos services prifiris : virifiez vos nouveaux mails, lancez vos recherches et suivez l'actualiti en temps riel.
Rendez-vous sur http://fr.yahoo.com/set
| Current Thread |
|---|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] import css file via xslt ->xh, Rick Roen | Thread | RE: [xsl] import css file via xslt , Rick Roen |
| [xsl] import css file via xslt ->xh, Rick Roen | Date | RE: [xsl] import css file via xslt , Rick Roen |
| Month |