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

How to add a new media type to link to a stylesheet

Subject: How to add a new media type to link to a stylesheet
From: Gina.Hua@xxxxxxxx
Date: Mon, 10 Jul 2000 16:10:09 -0700
xsl media

Hi everybody,

We are testing with Palm III, and we keep getting error message says
"org.apache.cocoon.processor.ProcessorException:Could not associated stylesheet
to document: no matching stylesheet for explorer at ...". Any help will be
appreciated.

Here is what we have done:

1. Added the statement "browser.13 = simple=MOZILLA/1." to the cocoon.properties
file in a right order.

browser.0 = explorer=MSIE
browser.1 = pocketexplorer=MSPIE
browser.2 = handweb=HandHTTP
browser.3 = avantgo=AvantGo
browser.4 = imode=DoCoMo
browser.5 = opera=Opera
browser.6 = lynx=Lynx
browser.7 = java=Java
browser.8 = wap=Nokia
browser.9 = wap=UP
browser.10 = wap=Wapalizer
browser.11 = mozilla5=Mozilla/5
browser.12 = mozilla5=Netscape6/
browser.13 = simple=MOZILLA/1.
browser.14 = netscape=Mozilla

2. Added stylesheet statement to the testing .xml file:

<?xml version="1.0"?>
<?xml-stylesheet href="../xsl/simple.xsl" type="text/xsl" media="simple"?>
<?xml-stylesheet href="../xsl/wap.xsl" type="text/xsl" media="wap"?>
<?cocoon-process type="xslt"?>
<html>
<head>
     <title>DM Work Management Logon</title>
</head>
.....

3. Created a new ../xsl/simple/xsl file:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
    <xsl:apply-templates/>
</xsl:template>


<xsl:template match="*[not(self::link) and not(self::input[@type = 'button'])
and not(self::img)] | text() | @*">
    <xsl:if test="not(self::span[@style])">  <!-- this is here because putting
it in the 'match' pattern does not remove the text value in the 'span' tag-->
         <xsl:copy>
              <xsl:apply-templates select="@*[(name() != 'class') and (name() !=
 'style') and (name() != 'onclick')]"/>
              <xsl:apply-templates/>
         </xsl:copy>
    </xsl:if>
</xsl:template>

</xsl:stylesheet>

Thanks,

Gina



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.