cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <tcu...@dff.st>
Subject what is up with the attributes? bug or just stupid?
Date Thu, 07 Dec 2000 01:11:05 GMT
It can't be easier:

XML/XSP:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
 <page>
  <title>Testing <xsp:expr>new Date()</xsp:expr></title>
  <content type="test">Hi</content>
 </page>
</xsp:page>

XSL:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template match="/">
  <html>
   <body>
    <xsl:apply-templates/>
   </body>
  </html>
 </xsl:template>

<xsl:template match="@*|node()" priority="-2">
  <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
</xsl:template>

<xsl:template match="text()" priority="-1"><xsl:value-of
select="."/></xsl:template>

</xsl:stylesheet>

Am I blind? I get an error as long as <content> (or any
other tag) has an attribute. Without - no problem.

I always get:
 Error creating the resource
 Error in XPath
 source org.apache.cocoon.ProcessingException
 description org.apache.cocoon.ProcessingException: Error in XPath

Sorry if it seems to be an XSLT question - but I thought
it should work like this, shouldn't it?
--
Torsten


Mime
View raw message