[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Empty object
Josh Canfield wrote:
If your output is being generated as you describe then there is a bug in your xsl processing stack (xml reader, processor, serializer). The more plausible cause is that your xsl code is mucking with the character. Without some sample xsl code that demonstrates the problem it's impossible to figure out what's wrong.Josh thanks for the timely response. Below is my xsl <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!--xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/--> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/> <xsl:template match="/"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>YOU ROCK</title> </head> <body> <xsl:apply-templates select="//FORMATTED/TABLE"/> </body> </html> </xsl:template> <xsl:template match="TABLE"> <table> <xsl:for-each select="@*"> <xsl:choose> <xsl:when test="name() = 'BORDER'"> <xsl:attribute name="border"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'CELLSPACING'"> <xsl:attribute name="cellspacing"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'CELLPADDING'"> <xsl:attribute name="cellpadding"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'WIDTH'"> <xsl:attribute name="width"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'STYLE'"> <xsl:attribute name="style"><xsl:value-of select="."/></xsl:attribute> </xsl:when> </xsl:choose> </xsl:for-each> <xsl:apply-templates/> </table> </xsl:template> <xsl:template match="DPROW"> <tr> <xsl:apply-templates/> </tr> </xsl:template> <xsl:template match="OBJECT"> <!--xsl:preserve-space elements="*"/--> <td> <xsl:for-each select="@*"> <xsl:choose> <xsl:when test="name() = 'ALIGN'"> <xsl:attribute name="align"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'STYLE'"> <xsl:attribute name="style"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'WIDTH'"> <xsl:attribute name="width"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'HEIGHT'"> <xsl:attribute name="height"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'NAME'"> <xsl:attribute name="name"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'TYPE'"> <xsl:attribute name="type"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'VALIGN'"> <xsl:attribute name="valign"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'COLSPAN'"> <xsl:attribute name="colspan"><xsl:value-of select="."/></xsl:attribute> </xsl:when> <xsl:when test="name() = 'ROWSPAN'"> <xsl:attribute name="rowspan"><xsl:value-of select="."/></xsl:attribute> </xsl:when> </xsl:choose> </xsl:for-each> <xsl:apply-templates /> </td> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|