[daisy] Include html-part in document type styling

André Ulrich andre.ulrich at stud.uni-goettingen.de
Tue Dec 19 09:46:50 CST 2006


Thanks for your tips, I now succeeded - Daisy is great! ;-)

Paul Focke wrote:
> On Monday 18 December 2006 20:08, André Ulrich wrote:
> I would like to know if it is possible to include the content of a
> document-part inside the document-view by defining a document style?
> Therefore I created a document which contains embedable html as a
> document-part. The problem is how to access this content to get it copy
> into the document style?
>   
>
> As far as I understand you have a documentType (MyDocType) with a couple of 
> parts (HtmlPartA & HtmlPartB).  You wish to display these parts when you view 
> the document. Well normally both those parts should be displayed by the 
> document styling.  Have a look around for xslt/document-to-html.xsl in the 
> default skin.
>   
Jepp, when they are daisy-html parts they get displayed automatically, 
the problem was to include custom html elements.
> Other scenario.  You have two documentTypes (DocTypeA & DocTypeB) which each 
> have a HtmlPart. Now, when you look at DocTypeA you wish to see both 
> HtmlParts (from A & B) based on some kind of rule.  If you wish to obtain 
> this behaviour than you better have a look at 
> Document info aggregation : 
> http://cocoondev.org/daisydocs-2_0/daisywiki/general/g1/273.html
> And document publishing : 
> http://cocoondev.org/daisydocs-2_0/repository/general/194.html
Solution was: I had to set the "inlineParts" attribute for my html-part 
within the publisher and of course set the mime-type to text/xml (not 
text/html !!!) in order to display it. Then include the content within 
the document-styling by calling <xsl:copy-of select="html/." /> ready ;-)

André


More information about the daisy mailing list