cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett McLaughlin" <bmcla...@algx.net>
Subject Partial XSLT support?
Date Wed, 08 Dec 1999 18:21:57 GMT
Is there only a subset of XSLT support?  For example, although my XML and
XSL conform to specification, I cannot get an <xsl:apply-templates
select=".//<element-name>"> to work.

XML File:

<?xml version="1.0"?>
<?xml-stylesheet href="xsl/portal-html.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>

<Portal:Page xmlns:Portal="http://someurl.com">
  <!-- User Specific Information -->
  <Portal:User>
  </Portal:User>

  <!-- Global Preferences Information -->
  <Portal:Preferences>
   <Portal:widgetColor></Portal:widgetColor>
   <Portal:widgetHighlightColor></Portal:widgetHighlightColor>
   <Portal:trimColor>#006699</Portal:trimColor>
   <Portal:trimFontColor>Silver</Portal:trimFontColor>
   <Portal:fontFace>Arial</Portal:fontFace>
  </Portal:Prefereces>

  <!-- Screen preferences information -->
  <Portal:ScreenPreferences>
   <Portal:Screen>
    <Portal:screenTitle>Portal</Portal:screenTitle>
    <Portal:screenColor>#FFCC66</Portal:screenColor>
   </Portal:Screen>
  </Portal:ScreenPreferences>

  <!-- Now deal with the actual outputted content -->
  <Portal:Content>
   <Portal:Header>
    Header
   </Portal:Header>
   <Portal:Body>
     Body
   </Portal:Body>
   <Portal:Footer>
     Footer
   </Portal:Footer>
  <Portal:Content>

</Portal:Page>
----------------------------------------------------------------------------
-----------
XSL File:

<?xml version="1.0"?>

<!-- Written by Brett McLaughlin "bmclaugh@algx.net" -->

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

  <xsl:template match="Portal:Page">
   <xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction>
   <html>
    <head>
     <title>
      Allegiance Portal -
     </title>
    </head>
    <body bgcolor="#ffffff" marginwidth="5" marginheight="5" topmargin="5"
leftmargin="5">
     <xsl:apply-templates select=".//Portal:Content"/>
    </body>
   </html>
  </xsl:template>

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

The word Content never is printed, and it should be.  I know this looks like
an XSL/XSLT question, but I verified in the spec that this should work, and
am unsure if it is a Cocoon problem.  If I have something wrong in mx XSL
please let me know, and I'm sorry ;-)

Thanks,
Brett


Mime
View raw message