DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: Try this ...

  1. #1
    lionel Guest

    Try this ...


    Hi

    Try transforming this XML with the XSL below

    <GetToDo>
    <PageInfo>
    <RecordCount>3</RecordCount>
    </PageInfo>
    <ROW FeedbackId="1" />
    <ROW FeedbackId="2" />
    <ROW FeedbackId="3" />
    </GetToDo>

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xslutput omit-xml-declaration="yes"/>
    <xsl:template match="/">
    <table class="ToDoTable" cellspacing="0" cellpadding="2">
    <tr>
    <td colspan="7" class="ToDoFooterCell">
    &#160;<span id="spnToDoPageNumbers"/>
    </td>
    </tr>
    </table>
    </xsl:template>
    </xsl:stylesheet>

    I'm performing the transformation with XSL Tester and I get the error "An
    invalid character was found in text content" ONLY when trying to view the
    result on IE 6.0.2600.0000 (works with other browsers). I get the same when
    coding the transformation in VB. It works if I remove the &#160; character,
    but I need it to be there.

    I wish I could use a different browser, in fact I wish not to work with Microsoft
    at all, but that's the standar here ...


  2. #2
    Rick Guest

    Re: Try this ...



    You can add the following to your xsl.

    <!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "&#160;">]>

    Rick


    "lionel" <lionel.orellana@dewr.gov.au> wrote:
    >
    >Hi
    >
    >Try transforming this XML with the XSL below
    >
    ><GetToDo>
    ><PageInfo>
    ><RecordCount>3</RecordCount>
    ></PageInfo>
    ><ROW FeedbackId="1" />
    ><ROW FeedbackId="2" />
    ><ROW FeedbackId="3" />
    ></GetToDo>
    >
    ><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    ><xslutput omit-xml-declaration="yes"/>
    ><xsl:template match="/">
    ><table class="ToDoTable" cellspacing="0" cellpadding="2">
    ><tr>
    ><td colspan="7" class="ToDoFooterCell">
    >*<span id="spnToDoPageNumbers"/>
    ></td>
    ></tr>
    ></table>
    ></xsl:template>
    ></xsl:stylesheet>
    >
    >I'm performing the transformation with XSL Tester and I get the error "An
    >invalid character was found in text content" ONLY when trying to view the
    >result on IE 6.0.2600.0000 (works with other browsers). I get the same when
    >coding the transformation in VB. It works if I remove the * character,
    >but I need it to be there.
    >
    >I wish I could use a different browser, in fact I wish not to work with

    Microsoft
    >at all, but that's the standar here ...
    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links