cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From I-Chung Young <>
Subject Re: Cocoon and dynamic HDML (re-post)
Date Fri, 01 Dec 2000 13:57:59 GMT

	I can't reproduce your problem. I use an example

 <option param="1">1</option>
 <option param="2">2</option>

	with style-sheet

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
<xsl:template match="/">
 <xsl:processing-instruction name="cocoon-format">
<xsl:text><![CDATA[<HDML VERSION="3.1" PUBLIC="TRUE">]]></xsl:text>

<xsl:template match="select">
<xsl:text><![CDATA[<CHOICE TITLE="Test" IKEY="option"
 <xsl:apply-templates select="option"/>

<xsl:template match="option">
<xsl:text><![CDATA[<ce value="]]></xsl:text><xsl:value-of


	and output as 

<CHOICE TITLE="Test" IKEY="option" KEY="op"><ce value="1">1<ce 

	There is no error even all <CE> are in the same line.
I think the problem is HDML syntax error somewhere else.
(I assume you are using UP.simpulator)


> I'm using Cocoon to create HDML through the 'kluge' of using
> TextFormatter and wrapping my output HDML in
> <xsl:text><!CDATA[         ]]></xsl:text> .
> I am trying to dynamically build a choice list, e.g. output HDML that
> looks like (ignoring required attributes)
> <hdml>
> <choice>
>     <ce value="1">1
>     <ce value="2">2
> </choice>
> </hdml>
> I need to extract the <ce> elements attribute value and content from my
> source XML but the CDATA tags prevent me from doing so using
> <xsl:attribute> so I must build up the HDML as strings, e.g. for source
> XML like
> .
> <option param="1">1</option>
> <option param="2">2</option>
> .
> I've been trying the following XSL (there are no linebreaks in the
> stylesheet)
> <xsl:template match="option">
> <xsl:text><![CDATA[<ce value="]]></xsl:text><xsl:value-of
> select="@param"/><xsl:text><![CDATA[">]]></xsl:text><xsl:value-of
> select="."/>
> </xsl:template>
> While this builds HDML that appears fine (looking at the generated HDML
> through an emulators view source), the emulator itself complains that
> '<CE> can have only one line of formatted text' which suggests to me
> that the emulator is not seeing the line breaks that I see looking at
> the source.
> I appreciate any insight.
> Paul
> --
> Paul Madsen
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message