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

RE: import css file via xslt ->xhtml

Subject: RE: import css file via xslt ->xhtml
From: Florent Georges <darkman_spam@xxxxxxxx>
Date: Mon, 22 May 2006 19:36:47 +0200 (CEST)
xhtml import
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>&#10;</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

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.