cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kazuhiro Sakai <ksa...@brijapan.com>
Subject Re: Xinclude problem. failed processing? Help!
Date Tue, 14 Nov 2000 00:18:33 GMT
Hi.

I guess you have to include following PI,

<?cocoon-process type="xinclude"?>

before your xslt PI. So your XML would be,

<?xml version="1.0"?>
<?xml-stylesheet href="/stylesheets/simple.xsl" type="text/xsl"?>
<?cocoon-process type="xinclude"?>
<?cocoon-process type="xslt"?>

something like above.

Hope this will help.

At 14:02 00/11/13 -0700, you wrote:
>I have simplified this situation way down and still can't figure it out.
>I have an xml file which calls a stylesheet.  This stylesheet sets up PIs
>for xslt processing and xinclude processing and then outputs an xinclude
>element.  Even though the Xinclude processor is definately being called
>(you can see the comment) it ignores the include element.  This is
>cocoon-1.8.  BTW, I did read the FAQ re ignored PIs but this is different
>since the PI is NOT being ignored, it just isn't working and there's
>nothing in the logs to indicate why.
>
>I have the xml file
>
>simple.xml
><?xml version="1.0"?>
><?xml-stylesheet href="/stylesheets/simple.xsl" type="text/xsl"?>
><?cocoon-process type="xslt"?>
>
><Document>nothing</Document>
>
>
>I have the stylesheet
>simple.xsl
><?xml version="1.0"?>
><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>version="1.0">
>
>   <xsl:template match="/">
>     <xsl:processing-instruction name="xml-stylesheet">
>       href="/stylesheets/debug.xsl" type="text/xsl"
>     </xsl:processing-instruction>
>     <xsl:processing-instruction name="cocoon-process">
>       type="xinclude"
>     </xsl:processing-instruction>
>     <xsl:processing-instruction name="cocoon-process">
>       type="xslt"
>     </xsl:processing-instruction>
>
>     <Document xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
>       <include xinclude:parse="xml"
>xinclude:href="http://localhost/menu.data"/>
>     </Document>
>   </xsl:template>
></xsl:stylesheet>
>
>
>Simple.xsl should (and does) output the PIs and an include tag (I have
>also tried using <xinclude:include> with the same symptoms).  Cocoon
>should then process it again.  The "debug.xsl" is an xsl that just outputs
>all tags AND comments and PIs.  The output I get is
>
>output (manually indented for clarity)
>
><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
>"http://www.w3.org/TR/REC-html40/strict.dtd">
><?xml-stylesheet href="/stylesheets/debug.xsl" type="text/xsl"?>
>
><Document xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
>   <include xinclude:href="http://localhost/menu.data"
>xinclude:parse="xml"></include>
>   <!--Processed by XInclude-->
></Document>
><!-- This page was served in 70 milliseconds by Cocoon 1.8 -->
>
>The interesting thing is the comment I get saying XInclude was PROCESSED!
>But it didn't "see" the include!  I also verified that xinclude works when
>called directly from simple.xml (that is, when the include element is put
>in the first pass, it works)
>
>Any ideas what I'm doing wrong?


有限会社ビー・アール・アイ
システムアドミニストレータ
酒井和広

Email: kazuhiro@japan.com
Tel: 0995-65-8746



Mime
View raw message