cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schmitt, Christian" <Christian.Schm...@Dresdner-Bank.com>
Subject AW: how to build dynamic HDML?
Date Tue, 28 Nov 2000 14:35:39 GMT
Paul,
may be I'm totally wrong here, but why don't you try:

<xsl:template match="option">
  <ce>
    <xsl:attribute name="param" select="@param"/>
    <xsl:value-of select="."/>
  </ce>
</xsl:template>

or even shorter:

<xsl:template match="option">
  <xsl:copy-of select="."/>
</xsl:template>


Hth,
Christian


> -----Urspr√ľngliche Nachricht-----
> Von: Paul Madsen [mailto:paul.madsen@coventus.com]
> Gesendet am: Dienstag, 28. November 2000 15:08
> An: cocoon-users@xml.apache.org
> Betreff: how to build dynamic HDML?
> 
> 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
> 
> <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 Madsen
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Mime
View raw message