Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Transforming HTML tags >Thread Next - Re: Transforming HTML tags Re: Transforming HTML tagsTo: NULL Date: 5/3/2004 1:26:00 PM
msnews.microsoft.com wrote:
> I have an XML data with HTML tags. When I transform this file, the resultant
> HTML displays the html tags not the formatting intended by these tags.
> I am sure this is very easy but I don't know how to solve this problem.
> Here is the XML file;
>
> <?xml version="1.0" encoding="windows-1252"?>
> <?xml-stylesheet type='text/xsl' href='lr_detail.xsl'?>
> <bestand id="96341" ugl_nr="96">
> <datum>19.11.1974</datum>
> <ordnungsziffer>1</ordnungsziffer>
> <ueberschrift>Verordnung über Zuständigkeiten nach dem Gesetz zum Schutz
> gegen Fluglärm</ueberschrift>
> <details bes_id="96341">
> <detail id="1986796">
> <typ/>
> <bezeichnung>0</bezeichnung>
> <ueberschrift/>
> <text><p class=lrueberschrift>Verordnung<BR>
> über Zuständigkeiten nach dem <BR>
> Gesetz zum Schutz gegen Fluglärm</P>
> </B><P> </P>
> <B><P ALIGN="CENTER">Vom 19. November 1974</B>(Fn <A
> HREF="#FN1">1</A>)</P>
> <P> </P>
> <P> </P>
> <P>Auf Grund des § 5 Abs. 1 des Ersten Vereinfachungsgesetzes vom 23.
> Juli 1957 (GV. NW. S. 189)(Fn <A HREF="#FN2">2</A>), zuletzt
> geändert durch Gesetz vom 18. Mai 1971 (GV. NW. S. 146), wird nach Anhörung
> des Ausschusses für Wohnungs- und Städtebau des Landtags
> verordnet:</P>
> <P> </P>
> <P> </P>
>
> </text>
> </detail>
> </details>
> </bestand>
>
> And this XSL code is supposed to display "text" element's value;
> <tr><td colspan="2"><xsl:value-of
> select="bestand/details/detail/text"/></td></tr>
You could try
<xsl:value-of select="bestand/details/detail/text"
disable-output-escaping="true" />
that should work with IE/MSXML but be warned that not every XSLT engine
supports that, for instance with Mozilla it is not supported.
A better approach is the embed the HTML not escaped but as XHTML markup
in your XML, that way you can process it with templates
--
Martin Honnen
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
