Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: problem with xhtml-tags after transformNode >Thread Next - Re: problem with xhtml-tags after transformNode Re: problem with xhtml-tags after transformNodeTo: NULL Date: 4/11/2008 1:04:00 PM Joerk wrote: > <xsl:for-each select="Rechtsmittel"> > <span style="font-family:Arial; font-size:12pt; "> As your 'Rechtsmittel' element can contain arbitrary XHTML I would not use a 'span' element as the container, rather a 'div' element. But that is more a question of proper HTML use and not of XML/XSLT. > <xsl:apply-templates /> > </span> > </xsl:for-each> The xsl:apply-templates is fine but you also need templates to process any elements in the XHTML namespace e.g. <xsl:template match="xhtml:*" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xsl:element name="{local-name()}" namespace=""> <xsl:apply-templates select="@* | node()"/> </xsl:element> </xsl:template> and for attributes <xsl:template match="xhtml:*/@*" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xsl:copy/> </xsl:template> The first template above takes XHTML elements and transforms them to HTML elements in no namespace. Alternatively if you want your stylesheet to create XHTML you could use xsl:copy-of <xsl:template match="xhtml:*" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <xsl:copy-of select="."/> </xsl:template> -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
