Subject: Re: [xsl] need help with xhtml output From: David Carlisle <davidc@xxxxxxxxx> Date: Wed, 4 Jun 2003 09:44:46 +0100 |
> 1. Outputting character entities. there is no standard way to do this in XSL 1 (XSL2 draft has just introduced a suggested possibility) Fortunately though you don't need to do it as every conforming xhtml system to which you are going to pass the result will understand the character data or character references and doesn't need the entities. > 2. Forcing a close tag for elements Usual advice is to make sure there is some white space in the element content. > </xsl:text></script>" seems like such a hack. Is there a better way? No, although it is possible to automatically transform an html generating stylesheet to an xhtml one, see the html2xhtml.xsl stylesheet available in http://www.w3.org/TR/2003/WD-MathML2-20030411/mathml-source.zip > All the elements that the template headers inserts get an extraneous > xmlns="" attribute. What is the best way to deal with that? You need to generate elements in the xhtml namespace not no-namespace. The above stylesheet modifies all literal result elements and xsl:element instructions in the original stylesheet to make sure they default to xhtml. But normally if your html generating stylesheet is using literal result elements, you just need to stick xmlns="http://www.w3.org/1999/xhtml" onto teh xsl:stylesheet top level element and they will all default into xhtml. David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] need help with xhtml output, Guy McArthur | Thread | RE: [xsl] need help with xhtml outp, Jarno . Elovirta |
Re: [xsl] Re: Duplicates, David Carlisle | Date | [xsl] XSLT processor, Fatih TURKMEN |
Month |