[daisy] customizing template for particular document type
Wojciech Ciesielski
ccmail at interia.pl
Mon Feb 4 10:50:30 CST 2008
Marc Portier wrote:
>
>> What am I doing wrong? :-/
>>
>
>
> have you checked if the text is available in the xml input allright?
> (suggestion: use xsl:copy-of select="/" and then view the source)
No, it's not OK. There is not plain text - I believe it's because that
@inlined param set to false:
<ns:parts>
<ns:part typeId="16" size="4" mimeType="text/plain"
dataChangedInVersion="5" label="PlainTextEmailContent"
name="PlainTextEmailContent" daisyHtml="false" *inlined="false"* />
<ns:part typeId="17" size="306" mimeType="text/xml"
dataChangedInVersion="7" label="HtmlEmailContent"
name="HtmlEmailContent" daisyHtml="true" inlined="true">
<html>
<body>
<p>Dear ${user.firstName}</p>
....
</body>
</html>
</ns:part>
</ns:parts>
>
> and as a general note: pls don't make your requests into a quiz/riddle:
>
> <xsl:when test="@name = 'PlainTextEmailContent'">
> <xsl:value-of select="'this works - to see if xsl:when works'" />
>
> So did it? We're left to guessing...
You're right, my mistake. Yes - it worked so I knew, that this xsl:when
clause was triggered
>
> If it did you could first replace the value-of/@select="." with a
> copy-of to see what is in the xml input at that stage
>
> and specially check if the @inlined is set
It's not working - there's inlined = false. Where do I change this?
There's no such field in part/document definition forms... I didn't
figured it out from this page
<http://cocoondev.org/daisydocs-2_1/373-cd/194-cd/420-cd.html> you've
provided - I am trying to display this from within daisy wiki by using
custom xsl for my document type:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:d="http://outerx.org/daisy/1.0">
<xsl:import href="daisyskin:xslt/document-to-html.xsl"/>
<xsl:template match="d:document">
<h1 class="daisy-document-name"><xsl:value-of select="@name"/></h1>
<h2>Plain text contents:</h2>
<xsl:apply-templates select="d:parts/d:part[@name='PlainTextEmailContent']"/>
<h2>HTML contents:</h2>
<xsl:apply-templates select="d:parts/d:part[@name='HtmlEmailContent']"/>
</xsl:template>
</xsl:stylesheet>
Thanks a lot for assistance.
Regards,
Wojtek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cocoondev.org/pipermail/daisy/attachments/20080204/182e3791/attachment-0001.htm
More information about the daisy
mailing list