You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by hg...@cswebmail.com on 2003/03/24 21:01:52 UTC
[SUMMARY] XSLT does not maintain
'format' tags in XML??
The solution:
> change
>
> <xsl:value-of select="//dc:description"/>
>
> to
>
> <xsl:copy-of select="//dc:description"/>
Thanks Florian and Joerg !
Regards,
Holger
On Mon, 24 Mar 2003, Joerg Heinicke wrote:
>
> Hmm, XML, PHP, CR/LF, <br/> - it seems a bit poor
> designed. Why aren't you
> doing the replacing in XSLT?
>
> But at least the solution should be to change
>
> <xsl:value-of select="//dc:description"/>
>
> to
>
> <xsl:copy-of select="//dc:description"/>.
>
> Regards,
>
> Joerg
>
> hgadm@cswebmail.com wrote:
> > Dear all,
> >
> > I have a quite long text in an XML tag <description>
> > with some in-line <br /> tags to format it (the text
> > containing these tags was created by an HTML mask
> after
> > a user input into it[in fact the php script that is
> > processing the mask is replacing CR/LF with <br />])
> >
> > However after XSL transformation, the HTML result
> > doesn't contain the tags [in fact the HTML source
text
> > has the <br /> replaced with CR/LF which is of
course
> > not useful !!].
> >
> > What's wrong with it ??
> >
> > Cheers,
> > Holger
> >
> > XML
> > .
> > .
> > .
> > <dc:description>COPD is a ...range of disease
> > characteristics including:
> > <br />
> > <br />
> > - improvement of FEV1,
> > <br />
> > <br />
> > - improvement of symptoms, ...</dc:description>
> > .
> > .
> > .
> >
> >
> > XSL
> > .
> > .
> > .
> > <I><font color="#00CC00">Description =
> </font></I><br/>
> > <font color="#000000"><xsl:value-of
> > select="//dc:description"/></font>
> > .
> > .
> > .
> >
> > HTML (as it displays in the browser)
> > .
> > .
> > .
> > Description =
> > COPD is a ...range of disease characteristics
> > including: - improvement of FEV1, - improvement of
> > symptoms,
>
> --
>
> System Development
> VIRBUS AG
> Fon +49(0)341-979-7419
> Fax +49(0)341-979-7409
> joerg.heinicke@virbus.de
> www.virbus.de
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
___________________________________________________
The ALL NEW CS2000 from CompuServe
Better! Faster! More Powerful!
250 FREE hours! Sign-on Now!
http://www.compuserve.com/trycsrv/cs2000/webmail/
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: [SUMMARY] XSLT does not maintain
'format' tags in XML??
Posted by Joerg Heinicke <jo...@gmx.de>.
Oh, thanks Ugo, a small but possibly painful mistake ...
Joerg
Ugo Cei wrote:
> hgadm@cswebmail.com wrote:
>
>> The solution:
>>
>>> change
>>>
>>> <xsl:value-of select="//dc:description"/>
>>>
>>> to
>>>
>>> <xsl:copy-of select="//dc:description"/>
>
>
> I don't think this is a good solution. If your input is
>
> <dc:description>first line <br/> second line</dc:description>
>
> the first instruction will produce
>
> first line second line
>
> but the second will produce
>
> <dc:description>first line <br/> second line</dc:description>
>
> In order to produce:
>
> first line <br/> second line
>
> you need to use
>
> <xsl:copy-of select="//dc:description/node()"/>
--
System Development
VIRBUS AG
Fon +49(0)341-979-7419
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org
Re: [SUMMARY] XSLT does not maintain
'format' tags in XML??
Posted by Ugo Cei <u....@cbim.it>.
hgadm@cswebmail.com wrote:
> The solution:
>>change
>>
>><xsl:value-of select="//dc:description"/>
>>
>>to
>>
>><xsl:copy-of select="//dc:description"/>
I don't think this is a good solution. If your input is
<dc:description>first line <br/> second line</dc:description>
the first instruction will produce
first line second line
but the second will produce
<dc:description>first line <br/> second line</dc:description>
In order to produce:
first line <br/> second line
you need to use
<xsl:copy-of select="//dc:description/node()"/>
--
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org