Try this ...


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

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 ...
    >



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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center